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
-
#base_currency_code ⇒ String
The base currency code of the group.
-
#base_currency_payment_amount ⇒ Double
The payment amount in the group’s base currency.
-
#base_currency_unapplied_amount ⇒ Double
The unapplied amount in the group’s base currency.
-
#company_ids ⇒ Uuid
The ids of the company for the associated invoices.
-
#company_names ⇒ String
The names of the company for the associated invoices.
-
#currency_code ⇒ String
The currency code of the payment.
-
#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).
-
#modified ⇒ Date-time
The modified date of the payment.
-
#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.
-
#supports_erp_pdf_retrieval ⇒ Boolean
Specific payments have support for pdf retrieval from their respective erp.
-
#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 47 48 49 50 51 52 |
# 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) @currency_code = params.dig(:currency_code) @payment_amount = params.dig(:payment_amount) @unapplied_amount = params.dig(:unapplied_amount) @base_currency_code = params.dig(:base_currency_code) @base_currency_payment_amount = params.dig(:base_currency_payment_amount) @base_currency_unapplied_amount = params.dig(:base_currency_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) @supports_erp_pdf_retrieval = params.dig(:supports_erp_pdf_retrieval) @customer_ids = params.dig(:customer_ids) @customer_names = params.dig(:customer_names) @company_ids = params.dig(:company_ids) @company_names = params.dig(:company_names) @modified = params.dig(:modified) end |
Instance Attribute Details
#base_currency_code ⇒ String
Returns The base currency code of the group.
96 97 98 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 96 def base_currency_code @base_currency_code end |
#base_currency_payment_amount ⇒ Double
Returns The payment amount in the group’s base currency.
100 101 102 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 100 def base_currency_payment_amount @base_currency_payment_amount end |
#base_currency_unapplied_amount ⇒ Double
Returns The unapplied amount in the group’s base currency.
104 105 106 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 104 def base_currency_unapplied_amount @base_currency_unapplied_amount end |
#company_ids ⇒ Uuid
Returns The ids of the company for the associated invoices.
148 149 150 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 148 def company_ids @company_ids end |
#company_names ⇒ String
Returns The names of the company for the associated invoices.
152 153 154 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 152 def company_names @company_names end |
#currency_code ⇒ String
Returns The currency code of the payment.
84 85 86 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 84 def currency_code @currency_code end |
#customer_ids ⇒ Uuid
Returns The ids of the customer for the associated invoices.
140 141 142 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 140 def customer_ids @customer_ids end |
#customer_names ⇒ String
Returns The names of the customer for the associated invoices.
144 145 146 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 144 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).
56 57 58 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 56 def group_key @group_key end |
#invoice_count ⇒ Int32
Returns The number of invoices associated to this payment.
112 113 114 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 112 def invoice_count @invoice_count end |
#invoice_id_list ⇒ Uuid
Returns The ids of the invoices associated to this payment.
124 125 126 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 124 def invoice_id_list @invoice_id_list end |
#invoice_list ⇒ String
Returns The reference codes of the invoices associated to this payment.
120 121 122 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 120 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.
108 109 110 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 108 def is_open @is_open end |
#memo_text ⇒ String
Returns Memo or reference text (ex. memo field on a check).
64 65 66 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 64 def memo_text @memo_text end |
#modified ⇒ Date-time
Returns The modified date of the payment.
156 157 158 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 156 def modified @modified end |
#payment_amount ⇒ Double
Returns Total amount of this payment.
88 89 90 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 88 def payment_amount @payment_amount end |
#payment_company_id ⇒ Uuid
Returns The id of the company for this payment.
128 129 130 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 128 def payment_company_id @payment_company_id end |
#payment_company_name ⇒ String
Returns The name of the company for this payment.
132 133 134 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 132 def payment_company_name @payment_company_name end |
#payment_date ⇒ Date
Returns The date of this payment.
80 81 82 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 80 def payment_date @payment_date end |
#payment_id ⇒ Uuid
Returns The id of the payment.
60 61 62 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 60 def payment_id @payment_id end |
#payment_type ⇒ String
Returns The type of payment, AR Payment or AP Payment.
76 77 78 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 76 def payment_type @payment_type end |
#reference_code ⇒ String
Returns Reference code for the payment for the given Erp system.
68 69 70 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 68 def reference_code @reference_code end |
#supports_erp_pdf_retrieval ⇒ Boolean
Returns Specific payments have support for pdf retrieval from their respective erp. When this flag is true, an additional call to Payments/id/pdf can be made to retrieve a pdf directly from the erp.
136 137 138 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 136 def supports_erp_pdf_retrieval @supports_erp_pdf_retrieval end |
#tender_type ⇒ String
Returns The tender type of payment (Cash, Check, etc.).
72 73 74 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 72 def tender_type @tender_type end |
#total_payments_applied ⇒ Double
Returns The number of payments applied to this payment.
116 117 118 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 116 def total_payments_applied @total_payments_applied end |
#unapplied_amount ⇒ Double
Returns Unapplied balance of this payment.
92 93 94 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 92 def unapplied_amount @unapplied_amount end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 160 def as_json(={}) { 'groupKey' => @group_key, 'paymentId' => @payment_id, 'memoText' => @memo_text, 'referenceCode' => @reference_code, 'tenderType' => @tender_type, 'paymentType' => @payment_type, 'paymentDate' => @payment_date, 'currencyCode' => @currency_code, 'paymentAmount' => @payment_amount, 'unappliedAmount' => @unapplied_amount, 'baseCurrencyCode' => @base_currency_code, 'baseCurrencyPaymentAmount' => @base_currency_payment_amount, 'baseCurrencyUnappliedAmount' => @base_currency_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, 'supportsErpPdfRetrieval' => @supports_erp_pdf_retrieval, 'customerIds' => @customer_ids, 'customerNames' => @customer_names, 'companyIds' => @company_ids, 'companyNames' => @company_names, 'modified' => @modified, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
193 194 195 |
# File 'lib/lockstep_sdk/models/payment_summary_model.rb', line 193 def to_json(*) "[#{as_json(*).to_json(*)}]" end |