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
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 25

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @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

Returns The total amount collected.

Returns:

  • (Double)

    The total amount collected.



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

def amount_collected
  @amount_collected
end

#customer_countInt32

Returns The total number of Customers.

Returns:

  • (Int32)

    The total number of Customers.



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

def customer_count
  @customer_count
end

#group_keyUuid

Returns The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).

Returns:

  • (Uuid)

    The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).



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

def group_key
  @group_key
end

#open_invoice_countInt32

Returns The number of open invoices.

Returns:

  • (Int32)

    The number of open invoices.



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

def open_invoice_count
  @open_invoice_count
end

Returns The number of paid invoices.

Returns:

  • (Int32)

    The number of paid invoices.



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

def paid_invoice_count
  @paid_invoice_count
end

#unapplied_amountDouble

Returns The total unapplied amount.

Returns:

  • (Double)

    The total unapplied amount.



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

def unapplied_amount
  @unapplied_amount
end

Instance Method Details

#as_json(options = {}) ⇒ object

Returns This object as a JSON key-value structure.

Returns:

  • (object)

    This object as a JSON key-value structure



60
61
62
63
64
65
66
67
68
69
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 60

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

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



73
74
75
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 73

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