Class: LockstepSdk::TransactionDetailModel
- Inherits:
-
Object
- Object
- LockstepSdk::TransactionDetailModel
- Defined in:
- lib/lockstep_sdk/models/transaction_detail_model.rb
Overview
Represents transaction detail information associated to a transaction. This can either be Invoices which are paid with a Credit Memo or Payment transaction, or Credit Memos or Payments used as payment for an Invoice transaction.
Instance Attribute Summary collapse
-
#base_currency_code ⇒ String
The base currency code of the group.
-
#base_currency_outstanding_amount ⇒ Double
The remaining balance of this transaction detail in the group’s base currency.
-
#base_currency_transaction_amount ⇒ Double
The total value of this transaction detail, inclusive or all taxes and line items in the group’s base currency.
-
#currency_code ⇒ String
The currency code of the transaction.
-
#group_key ⇒ Uuid
Group account transaction detail is associated with.
-
#outstanding_amount ⇒ Double
The remaining balance of this transaction detail.
-
#reference_number ⇒ String
An additional reference number that is sometimes used to identify a transaction detail.
-
#supports_erp_pdf_retrieval ⇒ Boolean
Specific transactions have support for pdf retrieval from their respective erp.
-
#transaction_amount ⇒ Double
The total value of this transaction detail, inclusive or all taxes and line items.
-
#transaction_date ⇒ Date-time
The date when a transaction detail record was reported.
-
#transaction_detail_applied_id ⇒ Uuid
The unique ID of the entity applying the transaction to the transaction detail record.
-
#transaction_detail_id ⇒ Uuid
The unique ID of the transaction detail record.
-
#transaction_id ⇒ Uuid
The unique ID of the transaction record.
-
#transaction_invoice_date ⇒ Date-time
The date of the invoice associated to the transaction detail record.
-
#transaction_sub_type ⇒ String
Additional type categorization of the transaction.
-
#transaction_type ⇒ String
The type of the transaction detail record.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ TransactionDetailModel
constructor
Initialize the TransactionDetailModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ TransactionDetailModel
Initialize the TransactionDetailModel using the provided prototype
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 26 def initialize(params = {}) @group_key = params.dig(:group_key) @base_currency_code = params.dig(:base_currency_code) @reference_number = params.dig(:reference_number) @transaction_detail_id = params.dig(:transaction_detail_id) @transaction_detail_applied_id = params.dig(:transaction_detail_applied_id) @transaction_id = params.dig(:transaction_id) @transaction_type = params.dig(:transaction_type) @transaction_sub_type = params.dig(:transaction_sub_type) @transaction_date = params.dig(:transaction_date) @transaction_invoice_date = params.dig(:transaction_invoice_date) @currency_code = params.dig(:currency_code) @transaction_amount = params.dig(:transaction_amount) @outstanding_amount = params.dig(:outstanding_amount) @base_currency_transaction_amount = params.dig(:base_currency_transaction_amount) @base_currency_outstanding_amount = params.dig(:base_currency_outstanding_amount) @supports_erp_pdf_retrieval = params.dig(:supports_erp_pdf_retrieval) end |
Instance Attribute Details
#base_currency_code ⇒ String
Returns The base currency code of the group.
51 52 53 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 51 def base_currency_code @base_currency_code end |
#base_currency_outstanding_amount ⇒ Double
Returns The remaining balance of this transaction detail in the group’s base currency.
103 104 105 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 103 def base_currency_outstanding_amount @base_currency_outstanding_amount end |
#base_currency_transaction_amount ⇒ Double
Returns The total value of this transaction detail, inclusive or all taxes and line items in the group’s base currency.
99 100 101 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 99 def base_currency_transaction_amount @base_currency_transaction_amount end |
#currency_code ⇒ String
Returns The currency code of the transaction.
87 88 89 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 87 def currency_code @currency_code end |
#group_key ⇒ Uuid
Returns Group account transaction detail is associated with.
47 48 49 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 47 def group_key @group_key end |
#outstanding_amount ⇒ Double
Returns The remaining balance of this transaction detail.
95 96 97 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 95 def outstanding_amount @outstanding_amount end |
#reference_number ⇒ String
Returns An additional reference number that is sometimes used to identify a transaction detail. The meaning of this field is specific to the ERP or accounting system used by the user.
55 56 57 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 55 def reference_number @reference_number end |
#supports_erp_pdf_retrieval ⇒ Boolean
Returns Specific transactions have support for pdf retrieval from their respective erp. When this flag is true, an additional call to Invoices/id/pdf or Payments/id/pdf can be made to retrieve a pdf directly from the erp.
107 108 109 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 107 def supports_erp_pdf_retrieval @supports_erp_pdf_retrieval end |
#transaction_amount ⇒ Double
Returns The total value of this transaction detail, inclusive or all taxes and line items.
91 92 93 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 91 def transaction_amount @transaction_amount end |
#transaction_date ⇒ Date-time
Returns The date when a transaction detail record was reported.
79 80 81 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 79 def transaction_date @transaction_date end |
#transaction_detail_applied_id ⇒ Uuid
Returns The unique ID of the entity applying the transaction to the transaction detail record.
63 64 65 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 63 def transaction_detail_applied_id @transaction_detail_applied_id end |
#transaction_detail_id ⇒ Uuid
Returns The unique ID of the transaction detail record.
59 60 61 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 59 def transaction_detail_id @transaction_detail_id end |
#transaction_id ⇒ Uuid
Returns The unique ID of the transaction record.
67 68 69 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 67 def transaction_id @transaction_id end |
#transaction_invoice_date ⇒ Date-time
Returns The date of the invoice associated to the transaction detail record.
83 84 85 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 83 def transaction_invoice_date @transaction_invoice_date end |
#transaction_sub_type ⇒ String
Returns Additional type categorization of the transaction.
75 76 77 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 75 def transaction_sub_type @transaction_sub_type end |
#transaction_type ⇒ String
Returns The type of the transaction detail record. Recognized Invoice types are: * ‘AR Invoice` - Represents an invoice sent by Company to the Customer * `AP Invoice` - Represents an invoice sent by Vendor to the Company * `AR Credit Memo` - Represents a credit memo generated by Company given to Customer * `AP Credit Memo` - Represents a credit memo generated by Vendor given to Company Recognized PaymentType values are: * `AR Payment` - A payment made by a Customer to the Company * `AP Payment` - A payment made by the Company to a Vendor.
71 72 73 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 71 def transaction_type @transaction_type end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 111 def as_json(={}) { 'groupKey' => @group_key, 'baseCurrencyCode' => @base_currency_code, 'referenceNumber' => @reference_number, 'transactionDetailId' => @transaction_detail_id, 'transactionDetailAppliedId' => @transaction_detail_applied_id, 'transactionId' => @transaction_id, 'transactionType' => @transaction_type, 'transactionSubType' => @transaction_sub_type, 'transactionDate' => @transaction_date, 'transactionInvoiceDate' => @transaction_invoice_date, 'currencyCode' => @currency_code, 'transactionAmount' => @transaction_amount, 'outstandingAmount' => @outstanding_amount, 'baseCurrencyTransactionAmount' => @base_currency_transaction_amount, 'baseCurrencyOutstandingAmount' => @base_currency_outstanding_amount, 'supportsErpPdfRetrieval' => @supports_erp_pdf_retrieval, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
134 135 136 |
# File 'lib/lockstep_sdk/models/transaction_detail_model.rb', line 134 def to_json(*) "[#{as_json(*options).to_json(*options)}]" end |