Class: LockstepSdk::CreditMemoInvoiceModel
- Inherits:
-
Object
- Object
- LockstepSdk::CreditMemoInvoiceModel
- Defined in:
- lib/lockstep_sdk/models/credit_memo_invoice_model.rb
Overview
Contains information about a credit memo invoice
Instance Attribute Summary collapse
-
#apply_to_invoice_date ⇒ Date
Date invoice applied to credit memo.
-
#base_currency_code ⇒ String
The base currency code of the group.
-
#base_currency_credit_memo_applied_amount ⇒ Double
The amount applied to credit memo in the group’s base currency.
-
#base_currency_outstanding_balance_amount ⇒ Double
The remaining balance value of this invoice in the group’s base currency.
-
#base_currency_total_amount ⇒ Double
The total value of this invoice, inclusive of all taxes and line items in the group’s base currency.
-
#company_id ⇒ Uuid
The ID number of the company that created this invoice.
-
#credit_memo_applied_amount ⇒ Double
Amount applied to credit memo.
-
#credit_memo_applied_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#credit_memo_invoice_id ⇒ Uuid
The id of the credit memo invoice.
-
#currency_code ⇒ String
The currency code of the credit memo invoice.
-
#customer_id ⇒ Uuid
The ID number of the counterparty for the invoice, for example, a customer or vendor.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#invoice_id ⇒ Uuid
The id of the invoice.
-
#invoice_status_code ⇒ String
A code identifying the status of this invoice.
-
#outstanding_balance_amount ⇒ Double
The remaining balance value of this invoice.
-
#reference_code ⇒ String
An additional reference code that is sometimes used to identify this invoice.
-
#total_amount ⇒ Double
The total value of this invoice, inclusive of all taxes and line items.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ CreditMemoInvoiceModel
constructor
Initialize the CreditMemoInvoiceModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ CreditMemoInvoiceModel
Initialize the CreditMemoInvoiceModel using the provided prototype
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_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) @credit_memo_applied_id = params.dig(:credit_memo_applied_id) @invoice_id = params.dig(:invoice_id) @credit_memo_invoice_id = params.dig(:credit_memo_invoice_id) @apply_to_invoice_date = params.dig(:apply_to_invoice_date) @credit_memo_applied_amount = params.dig(:credit_memo_applied_amount) @base_currency_credit_memo_applied_amount = params.dig(:base_currency_credit_memo_applied_amount) @reference_code = params.dig(:reference_code) @company_id = params.dig(:company_id) @customer_id = params.dig(:customer_id) @invoice_status_code = params.dig(:invoice_status_code) @total_amount = params.dig(:total_amount) @outstanding_balance_amount = params.dig(:outstanding_balance_amount) @base_currency_total_amount = params.dig(:base_currency_total_amount) @base_currency_outstanding_balance_amount = params.dig(:base_currency_outstanding_balance_amount) end |
Instance Attribute Details
#apply_to_invoice_date ⇒ Date
Returns Date invoice applied to credit memo.
71 72 73 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 71 def apply_to_invoice_date @apply_to_invoice_date end |
#base_currency_code ⇒ String
Returns The base currency code of the group.
51 52 53 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 51 def base_currency_code @base_currency_code end |
#base_currency_credit_memo_applied_amount ⇒ Double
Returns The amount applied to credit memo in the group’s base currency.
79 80 81 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 79 def base_currency_credit_memo_applied_amount @base_currency_credit_memo_applied_amount end |
#base_currency_outstanding_balance_amount ⇒ Double
Returns The remaining balance value of this invoice in the group’s base currency.
111 112 113 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 111 def base_currency_outstanding_balance_amount @base_currency_outstanding_balance_amount end |
#base_currency_total_amount ⇒ Double
Returns The total value of this invoice, inclusive of all taxes and line items in the group’s base currency.
107 108 109 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 107 def base_currency_total_amount @base_currency_total_amount end |
#company_id ⇒ Uuid
Returns The ID number of the company that created this invoice.
87 88 89 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 87 def company_id @company_id end |
#credit_memo_applied_amount ⇒ Double
Returns Amount applied to credit memo.
75 76 77 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 75 def credit_memo_applied_amount @credit_memo_applied_amount end |
#credit_memo_applied_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
59 60 61 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 59 def credit_memo_applied_id @credit_memo_applied_id end |
#credit_memo_invoice_id ⇒ Uuid
Returns The id of the credit memo invoice.
67 68 69 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 67 def credit_memo_invoice_id @credit_memo_invoice_id end |
#currency_code ⇒ String
Returns The currency code of the credit memo invoice.
55 56 57 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 55 def currency_code @currency_code end |
#customer_id ⇒ Uuid
Returns The ID number of the counterparty for the invoice, for example, a customer or vendor.
91 92 93 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 91 def customer_id @customer_id 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/credit_memo_invoice_model.rb', line 47 def group_key @group_key end |
#invoice_id ⇒ Uuid
Returns The id of the invoice.
63 64 65 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 63 def invoice_id @invoice_id end |
#invoice_status_code ⇒ String
Returns A code identifying the status of this invoice.
95 96 97 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 95 def invoice_status_code @invoice_status_code end |
#outstanding_balance_amount ⇒ Double
Returns The remaining balance value of this invoice.
103 104 105 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 103 def outstanding_balance_amount @outstanding_balance_amount end |
#reference_code ⇒ String
Returns An additional reference code that is sometimes used to identify this invoice. The meaning of this field is specific to the ERP or accounting system used by the user.
83 84 85 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 83 def reference_code @reference_code end |
#total_amount ⇒ Double
Returns The total value of this invoice, inclusive of all taxes and line items.
99 100 101 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 99 def total_amount @total_amount end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 115 def as_json(={}) { 'groupKey' => @group_key, 'baseCurrencyCode' => @base_currency_code, 'currencyCode' => @currency_code, 'creditMemoAppliedId' => @credit_memo_applied_id, 'invoiceId' => @invoice_id, 'creditMemoInvoiceId' => @credit_memo_invoice_id, 'applyToInvoiceDate' => @apply_to_invoice_date, 'creditMemoAppliedAmount' => @credit_memo_applied_amount, 'baseCurrencyCreditMemoAppliedAmount' => @base_currency_credit_memo_applied_amount, 'referenceCode' => @reference_code, 'companyId' => @company_id, 'customerId' => @customer_id, 'invoiceStatusCode' => @invoice_status_code, 'totalAmount' => @total_amount, 'outstandingBalanceAmount' => @outstanding_balance_amount, 'baseCurrencyTotalAmount' => @base_currency_total_amount, 'baseCurrencyOutstandingBalanceAmount' => @base_currency_outstanding_balance_amount, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
139 140 141 |
# File 'lib/lockstep_sdk/models/credit_memo_invoice_model.rb', line 139 def to_json(*) "[#{as_json(*options).to_json(*options)}]" end |