Class: LockstepSdk::InvoicePaymentDetailModel
- Inherits:
-
Object
- Object
- LockstepSdk::InvoicePaymentDetailModel
- Defined in:
- lib/lockstep_sdk/models/invoice_payment_detail_model.rb
Overview
View to return Payment Detail information for a given Invoice record.
Instance Attribute Summary collapse
-
#apply_to_invoice_date ⇒ Date
Date Payment applied to Invoice.
-
#base_currency_code ⇒ String
The base currency code of the group.
-
#base_currency_payment_amount ⇒ Double
The total value of this Payment in the group’s base currency.
-
#base_currency_payment_applied_amount ⇒ Double
Amount applied to Invoice in the group’s base currency.
-
#base_currency_unapplied_amount ⇒ Double
The remaining balance value of this Payment in the group’s base currency.
-
#company_id ⇒ Uuid
The ID number of the Company (CompanyType = “Customer”) that created this Payment.
-
#currency_code ⇒ String
The payment’s currency code.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#invoice_id ⇒ Uuid
The database id of the invoice.
-
#payment_amount ⇒ Double
The total value of this Payment.
-
#payment_applied_amount ⇒ Double
Amount applied to Invoice.
-
#payment_applied_id ⇒ Uuid
The unique identifier of this PaymentApplied record.
-
#payment_id ⇒ Uuid
The database id of the Payment.
-
#reference_code ⇒ String
An additional reference code that is sometimes used to identify this Payment.
-
#unapplied_amount ⇒ Double
The remaining balance value of this Payment.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ InvoicePaymentDetailModel
constructor
Initialize the InvoicePaymentDetailModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ InvoicePaymentDetailModel
Initialize the InvoicePaymentDetailModel using the provided prototype
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 25 def initialize(params = {}) @group_key = params.dig(:group_key) @base_currency_code = params.dig(:base_currency_code) @currency_code = params.dig(:currency_code) @payment_applied_id = params.dig(:payment_applied_id) @invoice_id = params.dig(:invoice_id) @payment_id = params.dig(:payment_id) @apply_to_invoice_date = params.dig(:apply_to_invoice_date) @payment_applied_amount = params.dig(:payment_applied_amount) @base_currency_payment_applied_amount = params.dig(:base_currency_payment_applied_amount) @reference_code = params.dig(:reference_code) @company_id = params.dig(:company_id) @payment_amount = params.dig(:payment_amount) @unapplied_amount = params.dig(:unapplied_amount) @base_currency_payment_amount = params.dig(:base_currency_payment_amount) @base_currency_unapplied_amount = params.dig(:base_currency_unapplied_amount) end |
Instance Attribute Details
#apply_to_invoice_date ⇒ Date
Returns Date Payment applied to Invoice.
69 70 71 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 69 def apply_to_invoice_date @apply_to_invoice_date end |
#base_currency_code ⇒ String
Returns The base currency code of the group.
49 50 51 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 49 def base_currency_code @base_currency_code end |
#base_currency_payment_amount ⇒ Double
Returns The total value of this Payment in the group’s base currency.
97 98 99 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 97 def base_currency_payment_amount @base_currency_payment_amount end |
#base_currency_payment_applied_amount ⇒ Double
Returns Amount applied to Invoice in the group’s base currency.
77 78 79 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 77 def base_currency_payment_applied_amount @base_currency_payment_applied_amount end |
#base_currency_unapplied_amount ⇒ Double
Returns The remaining balance value of this Payment in the group’s base currency.
101 102 103 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 101 def base_currency_unapplied_amount @base_currency_unapplied_amount end |
#company_id ⇒ Uuid
Returns The ID number of the Company (CompanyType = “Customer”) that created this Payment.
85 86 87 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 85 def company_id @company_id end |
#currency_code ⇒ String
Returns The payment’s currency code.
53 54 55 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 53 def currency_code @currency_code 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).
45 46 47 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 45 def group_key @group_key end |
#invoice_id ⇒ Uuid
Returns The database id of the invoice.
61 62 63 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 61 def invoice_id @invoice_id end |
#payment_amount ⇒ Double
Returns The total value of this Payment.
89 90 91 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 89 def payment_amount @payment_amount end |
#payment_applied_amount ⇒ Double
Returns Amount applied to Invoice.
73 74 75 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 73 def payment_applied_amount @payment_applied_amount end |
#payment_applied_id ⇒ Uuid
Returns The unique identifier of this PaymentApplied record.
57 58 59 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 57 def payment_applied_id @payment_applied_id end |
#payment_id ⇒ Uuid
Returns The database id of the Payment.
65 66 67 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 65 def payment_id @payment_id end |
#reference_code ⇒ String
Returns An additional reference code that is sometimes used to identify this Payment. The meaning of this field is specific to the ERP or accounting system used by the user.
81 82 83 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 81 def reference_code @reference_code end |
#unapplied_amount ⇒ Double
Returns The remaining balance value of this Payment.
93 94 95 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 93 def unapplied_amount @unapplied_amount end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 105 def as_json(={}) { 'groupKey' => @group_key, 'baseCurrencyCode' => @base_currency_code, 'currencyCode' => @currency_code, 'paymentAppliedId' => @payment_applied_id, 'invoiceId' => @invoice_id, 'paymentId' => @payment_id, 'applyToInvoiceDate' => @apply_to_invoice_date, 'paymentAppliedAmount' => @payment_applied_amount, 'baseCurrencyPaymentAppliedAmount' => @base_currency_payment_applied_amount, 'referenceCode' => @reference_code, 'companyId' => @company_id, 'paymentAmount' => @payment_amount, 'unappliedAmount' => @unapplied_amount, 'baseCurrencyPaymentAmount' => @base_currency_payment_amount, 'baseCurrencyUnappliedAmount' => @base_currency_unapplied_amount, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
127 128 129 |
# File 'lib/lockstep_sdk/models/invoice_payment_detail_model.rb', line 127 def to_json(*) "[#{as_json(*).to_json(*)}]" end |