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
-
#company_ids ⇒ Uuid
The ids of the company for the associated invoices.
-
#company_names ⇒ String
The names of the company for the associated invoices.
-
#customer_ids ⇒ Uuid
The ids of the customer for the associated invoices.
-
#customer_names ⇒ String
The names of the customer for the associated invoices.
-
#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.
-
#is_open ⇒ Boolean
True if this payment includes some unassigned amount that has not yet been applied to an invoice.
-
#memo_text ⇒ String
Memo or reference text (ex. memo field on a check).
-
#payment_amount ⇒ Double
Total amount of this payment.
-
#payment_company_id ⇒ Uuid
The id of the company for this payment.
-
#payment_company_name ⇒ String
The name of the company for 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, AR Payment or AP Payment.
-
#reference_code ⇒ String
Reference code for the payment for the given Erp system.
-
#tender_type ⇒ String
The tender type of payment (Cash, Check, etc.).
-
#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
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 25 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) @tender_type = params.dig(:tender_type) @payment_type = params.dig(:payment_type) @payment_date = params.dig(:payment_date) @payment_amount = params.dig(:payment_amount) @unapplied_amount = params.dig(:unapplied_amount) @is_open = params.dig(:is_open) @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) @payment_company_id = params.dig(:payment_company_id) @payment_company_name = params.dig(:payment_company_name) @customer_ids = params.dig(:customer_ids) @customer_names = params.dig(:customer_names) @company_ids = params.dig(:company_ids) @company_names = params.dig(:company_names) end |
Instance Attribute Details
#company_ids ⇒ Uuid
Returns The ids of the company for the associated invoices.
122 123 124 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 122 def company_ids @company_ids end |
#company_names ⇒ String
Returns The names of the company for the associated invoices.
126 127 128 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 126 def company_names @company_names end |
#customer_ids ⇒ Uuid
Returns The ids of the customer for the associated invoices.
114 115 116 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 114 def customer_ids @customer_ids end |
#customer_names ⇒ String
Returns The names of the customer for the associated invoices.
118 119 120 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 118 def customer_names @customer_names 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).
50 51 52 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 50 def group_key @group_key end |
#invoice_count ⇒ Int32
Returns The number of invoices associated to this payment.
90 91 92 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 90 def invoice_count @invoice_count end |
#invoice_id_list ⇒ Uuid
Returns The ids of the invoices associated to this payment.
102 103 104 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 102 def invoice_id_list @invoice_id_list end |
#invoice_list ⇒ String
Returns The reference codes of the invoices associated to this payment.
98 99 100 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 98 def invoice_list @invoice_list end |
#is_open ⇒ Boolean
Returns True if this payment includes some unassigned amount that has not yet been applied to an invoice. If this value is true, the field UnappliedAmount will be nonzero.
86 87 88 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 86 def is_open @is_open end |
#memo_text ⇒ String
Returns Memo or reference text (ex. memo field on a check).
58 59 60 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 58 def memo_text @memo_text end |
#payment_amount ⇒ Double
Returns Total amount of this payment.
78 79 80 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 78 def payment_amount @payment_amount end |
#payment_company_id ⇒ Uuid
Returns The id of the company for this payment.
106 107 108 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 106 def payment_company_id @payment_company_id end |
#payment_company_name ⇒ String
Returns The name of the company for this payment.
110 111 112 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 110 def payment_company_name @payment_company_name end |
#payment_date ⇒ Date
Returns The date of this payment.
74 75 76 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 74 def payment_date @payment_date end |
#payment_id ⇒ Uuid
Returns The id of the payment.
54 55 56 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 54 def payment_id @payment_id end |
#payment_type ⇒ String
Returns The type of payment, AR Payment or AP Payment.
70 71 72 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 70 def payment_type @payment_type end |
#reference_code ⇒ String
Returns Reference code for the payment for the given Erp system.
62 63 64 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 62 def reference_code @reference_code end |
#tender_type ⇒ String
Returns The tender type of payment (Cash, Check, etc.).
66 67 68 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 66 def tender_type @tender_type end |
#total_payments_applied ⇒ Double
Returns The number of payments applied to this payment.
94 95 96 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 94 def total_payments_applied @total_payments_applied end |
#unapplied_amount ⇒ Double
Returns Unapplied balance of this payment.
82 83 84 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 82 def unapplied_amount @unapplied_amount end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 130 def as_json(={}) { 'groupKey' => @group_key, 'paymentId' => @payment_id, 'memoText' => @memo_text, 'referenceCode' => @reference_code, 'tenderType' => @tender_type, 'paymentType' => @payment_type, 'paymentDate' => @payment_date, 'paymentAmount' => @payment_amount, 'unappliedAmount' => @unapplied_amount, 'isOpen' => @is_open, 'invoiceCount' => @invoice_count, 'totalPaymentsApplied' => @total_payments_applied, 'invoiceList' => @invoice_list, 'invoiceIdList' => @invoice_id_list, 'paymentCompanyId' => @payment_company_id, 'paymentCompanyName' => @payment_company_name, 'customerIds' => @customer_ids, 'customerNames' => @customer_names, 'companyIds' => @company_ids, 'companyNames' => @company_names, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
157 158 159 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 157 def to_json(*) "[#{as_json(*).to_json(*)}]" end |