Class: LockstepSdk::PaymentDetailHeaderModel
- Inherits:
-
Object
- Object
- LockstepSdk::PaymentDetailHeaderModel
- Defined in:
- lib/lockstep_sdk/models/payment_detail_header_model.rb
Overview
Contains group level payment data.
Instance Attribute Summary collapse
-
#amount_collected ⇒ Double
The total amount collected.
-
#customer_count ⇒ Int32
The total number of Customers.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#open_invoice_count ⇒ Int32
The number of open invoices.
-
#paid_invoice_count ⇒ Int32
The number of paid invoices.
-
#unapplied_amount ⇒ Double
The total unapplied amount.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ PaymentDetailHeaderModel
constructor
Initialize the PaymentDetailHeaderModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ PaymentDetailHeaderModel
Initialize the PaymentDetailHeaderModel using the provided prototype
28 29 30 31 32 33 34 35 |
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 28 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_collected ⇒ Double
Returns The total amount collected.
47 48 49 |
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 47 def amount_collected @amount_collected end |
#customer_count ⇒ Int32
Returns The total number of Customers.
43 44 45 |
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 43 def customer_count @customer_count end |
#group_key ⇒ Uuid
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).
39 40 41 |
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 39 def group_key @group_key end |
#open_invoice_count ⇒ Int32
Returns The number of open invoices.
59 60 61 |
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 59 def open_invoice_count @open_invoice_count end |
#paid_invoice_count ⇒ Int32
Returns The number of paid invoices.
55 56 57 |
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 55 def paid_invoice_count @paid_invoice_count end |
#unapplied_amount ⇒ Double
Returns The total unapplied amount.
51 52 53 |
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 51 def unapplied_amount @unapplied_amount end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
63 64 65 66 67 68 69 70 71 72 |
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 63 def as_json(={}) { '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.
76 77 78 |
# File 'lib/lockstep_sdk/models/payment_detail_header_model.rb', line 76 def to_json(*) "[#{as_json(*).to_json(*)}]" end |