Class: LockstepSdk::PaymentDetailHeaderModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/payment_detail_header_model.rb

Overview

Contains group level payment data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ PaymentDetailHeaderModel

Initialize the PaymentDetailHeaderModel using the provided prototype



25
26
27
28
29
30
31
32
33
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 25

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @base_currency_code = params.dig(:base_currency_code)
    @customer_count = params.dig(:customer_count)
    @amount_collected = params.dig(:amount_collected)
    @unapplied_amount = params.dig(:unapplied_amount)
    @paid_invoice_count = params.dig(:paid_invoice_count)
    @open_invoice_count = params.dig(:open_invoice_count)
end

Instance Attribute Details

#amount_collectedDouble



49
50
51
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 49

def amount_collected
  @amount_collected
end

#base_currency_codeString



41
42
43
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 41

def base_currency_code
  @base_currency_code
end

#customer_countInt32



45
46
47
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 45

def customer_count
  @customer_count
end

#group_keyUuid



37
38
39
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 37

def group_key
  @group_key
end

#open_invoice_countInt32



61
62
63
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 61

def open_invoice_count
  @open_invoice_count
end


57
58
59
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 57

def paid_invoice_count
  @paid_invoice_count
end

#unapplied_amountDouble



53
54
55
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 53

def unapplied_amount
  @unapplied_amount
end

Instance Method Details

#as_json(options = {}) ⇒ object



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 65

def as_json(options={})
    {
        'groupKey' => @group_key,
        'baseCurrencyCode' => @base_currency_code,
        'customerCount' => @customer_count,
        'amountCollected' => @amount_collected,
        'unappliedAmount' => @unapplied_amount,
        'paidInvoiceCount' => @paid_invoice_count,
        'openInvoiceCount' => @open_invoice_count,
    }
end

#to_json(*options) ⇒ String



79
80
81
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 79

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end