Class: LockstepSdk::PaymentSummaryModel
- Inherits:
-
Object
- Object
- LockstepSdk::PaymentSummaryModel
- Defined in:
- lib/lockstep_sdk/models/payment_summary_model.rb
Overview
Contains summary information for a Payment
Instance Attribute Summary collapse
-
#customer_id ⇒ Uuid
The id of the customer for this payment.
-
#customer_name ⇒ String
The name of the customer for this payment.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#invoice_count ⇒ Int32
The number of invoices associated to this payment.
-
#invoice_id_list ⇒ Uuid
The ids of the invoices associated to this payment.
-
#invoice_list ⇒ String
The reference codes of the invoices associated to this payment.
-
#memo_text ⇒ String
Memo or reference text (ex. memo field on a check).
-
#payment_amount ⇒ Double
Total amount of this payment.
-
#payment_date ⇒ Date
The date of this payment.
-
#payment_id ⇒ Uuid
The id of the payment.
-
#payment_type ⇒ String
The type of payment, Payment or AP Payment.
-
#reference_code ⇒ String
Reference code for the payment for the given Erp system.
-
#total_payments_applied ⇒ Double
The number of payments applied to this payment.
-
#unapplied_amount ⇒ Double
Unapplied balance of this payment.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ PaymentSummaryModel
constructor
Initialize the PaymentSummaryModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ PaymentSummaryModel
Initialize the PaymentSummaryModel using the provided prototype
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 28 def initialize(params = {}) @group_key = params.dig(:group_key) @payment_id = params.dig(:payment_id) @memo_text = params.dig(:memo_text) @reference_code = params.dig(:reference_code) @payment_type = params.dig(:payment_type) @payment_date = params.dig(:payment_date) @payment_amount = params.dig(:payment_amount) @unapplied_amount = params.dig(:unapplied_amount) @invoice_count = params.dig(:invoice_count) @total_payments_applied = params.dig(:total_payments_applied) @invoice_list = params.dig(:invoice_list) @invoice_id_list = params.dig(:invoice_id_list) @customer_name = params.dig(:customer_name) @customer_id = params.dig(:customer_id) end |
Instance Attribute Details
#customer_id ⇒ Uuid
Returns The id of the customer for this payment.
99 100 101 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 99 def customer_id @customer_id end |
#customer_name ⇒ String
Returns The name of the customer for this payment.
95 96 97 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 95 def customer_name @customer_name 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).
47 48 49 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 47 def group_key @group_key end |
#invoice_count ⇒ Int32
Returns The number of invoices associated to this payment.
79 80 81 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 79 def invoice_count @invoice_count end |
#invoice_id_list ⇒ Uuid
Returns The ids of the invoices associated to this payment.
91 92 93 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 91 def invoice_id_list @invoice_id_list end |
#invoice_list ⇒ String
Returns The reference codes of the invoices associated to this payment.
87 88 89 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 87 def invoice_list @invoice_list end |
#memo_text ⇒ String
Returns Memo or reference text (ex. memo field on a check).
55 56 57 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 55 def memo_text @memo_text end |
#payment_amount ⇒ Double
Returns Total amount of this payment.
71 72 73 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 71 def payment_amount @payment_amount end |
#payment_date ⇒ Date
Returns The date of this payment.
67 68 69 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 67 def payment_date @payment_date end |
#payment_id ⇒ Uuid
Returns The id of the payment.
51 52 53 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 51 def payment_id @payment_id end |
#payment_type ⇒ String
Returns The type of payment, Payment or AP Payment.
63 64 65 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 63 def payment_type @payment_type end |
#reference_code ⇒ String
Returns Reference code for the payment for the given Erp system.
59 60 61 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 59 def reference_code @reference_code end |
#total_payments_applied ⇒ Double
Returns The number of payments applied to this payment.
83 84 85 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 83 def total_payments_applied @total_payments_applied end |
#unapplied_amount ⇒ Double
Returns Unapplied balance of this payment.
75 76 77 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 75 def unapplied_amount @unapplied_amount end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 103 def as_json(={}) { 'groupKey' => @group_key, 'paymentId' => @payment_id, 'memoText' => @memo_text, 'referenceCode' => @reference_code, 'paymentType' => @payment_type, 'paymentDate' => @payment_date, 'paymentAmount' => @payment_amount, 'unappliedAmount' => @unapplied_amount, 'invoiceCount' => @invoice_count, 'totalPaymentsApplied' => @total_payments_applied, 'invoiceList' => @invoice_list, 'invoiceIdList' => @invoice_id_list, 'customerName' => @customer_name, 'customerId' => @customer_id, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
124 125 126 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 124 def to_json(*) "[#{as_json(*).to_json(*)}]" end |