Class: LockstepSdk::InvoiceHistoryModel
- Inherits:
-
Object
- Object
- LockstepSdk::InvoiceHistoryModel
- Defined in:
- lib/lockstep_sdk/models/invoice_history_model.rb
Overview
An Invoice represents a bill sent from one company to another. The Lockstep Platform tracks changes to each Invoice so that you can observe the changes over time. You can view the InvoiceHistory list to monitor and observe the changes of this Invoice and track the dates when changes occurred.
Instance Attribute Summary collapse
-
#app_enrollment_id ⇒ Uuid
The AppEnrollmentId of the application that imported this record.
-
#company_id ⇒ Uuid
The ID number of the company that created this invoice.
-
#created ⇒ Date-time
The date on which this invoice record was created.
-
#created_user_id ⇒ Uuid
The ID number of the user who created this invoice.
-
#currency_code ⇒ String
The three-character ISO 4217 currency code used for this invoice.
-
#customer_id ⇒ Uuid
The ID number of the counterparty for the invoice, for example, a customer or vendor.
-
#discount_amount ⇒ Double
The total discounts given by the seller to the buyer on this invoice.
-
#discount_date ⇒ Date
The date when discounts were adjusted for this invoice.
-
#erp_key ⇒ String
The unique ID of this record as it was known in its originating financial system.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#imported_date ⇒ Date-time
The date and time when this record was imported from the user’s ERP or accounting system.
-
#invoice_closed_date ⇒ Date
The date when the invoice was closed and finalized after completion of all payments and delivery of all products and services.
-
#invoice_date ⇒ Date
The reporting date for this invoice.
-
#invoice_history_id ⇒ Uuid
The unique ID number of this invoice history entry.
-
#invoice_id ⇒ Uuid
The unique ID of the Invoice represented by this history entry.
-
#invoice_status_code ⇒ String
A code identifying the status of this invoice.
-
#invoice_type_code ⇒ String
A code identifying the type of this invoice.
-
#modified ⇒ Date-time
The date on which this invoice record was last modified.
-
#modified_user_id ⇒ Uuid
The ID number of the user who most recently modified this invoice.
-
#outstanding_balance_amount ⇒ Double
The remaining balance value of this invoice.
-
#payment_due_date ⇒ Date
The date when the remaining outstanding balance is due.
-
#posted_date ⇒ Date
The date when this invoice posted to the company’s general ledger.
-
#primary_bill_to_address_id ⇒ Uuid
The ID number of the invoice’s bill-to address.
-
#primary_origin_address_id ⇒ Uuid
The ID number of the invoice’s origination address.
-
#primary_ship_to_address_id ⇒ Uuid
The ID number of the invoice’s ship-to address.
-
#purchase_order_code ⇒ String
The purchase order code as it exists in the user’s ERP or accounting system.
-
#reference_code ⇒ String
An additional reference code that is sometimes used to identify this invoice.
-
#sales_tax_amount ⇒ Double
The total sales (or transactional) tax calculated for this invoice.
-
#salesperson_code ⇒ String
A code identifying the salesperson responsible for writing this invoice.
-
#salesperson_name ⇒ String
A string identifying the salesperson responsible for writing this invoice.
-
#special_terms ⇒ String
If the customer negotiated any special terms different from the standard terms above, describe them here.
-
#terms_code ⇒ String
A code identifying the terms given to the purchaser.
-
#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 = {}) ⇒ InvoiceHistoryModel
constructor
Initialize the InvoiceHistoryModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ InvoiceHistoryModel
Initialize the InvoiceHistoryModel using the provided prototype
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 53 54 55 56 57 58 59 60 61 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 27 def initialize(params = {}) @group_key = params.dig(:group_key) @invoice_history_id = params.dig(:invoice_history_id) @invoice_id = params.dig(:invoice_id) @company_id = params.dig(:company_id) @customer_id = params.dig(:customer_id) @erp_key = params.dig(:erp_key) @purchase_order_code = params.dig(:purchase_order_code) @reference_code = params.dig(:reference_code) @salesperson_code = params.dig(:salesperson_code) @salesperson_name = params.dig(:salesperson_name) @invoice_type_code = params.dig(:invoice_type_code) @invoice_status_code = params.dig(:invoice_status_code) @terms_code = params.dig(:terms_code) @special_terms = params.dig(:special_terms) @currency_code = params.dig(:currency_code) @total_amount = params.dig(:total_amount) @sales_tax_amount = params.dig(:sales_tax_amount) @discount_amount = params.dig(:discount_amount) @outstanding_balance_amount = params.dig(:outstanding_balance_amount) @invoice_date = params.dig(:invoice_date) @discount_date = params.dig(:discount_date) @posted_date = params.dig(:posted_date) @invoice_closed_date = params.dig(:invoice_closed_date) @payment_due_date = params.dig(:payment_due_date) @imported_date = params.dig(:imported_date) @primary_origin_address_id = params.dig(:primary_origin_address_id) @primary_bill_to_address_id = params.dig(:primary_bill_to_address_id) @primary_ship_to_address_id = params.dig(:primary_ship_to_address_id) @created = params.dig(:created) @created_user_id = params.dig(:created_user_id) @modified = params.dig(:modified) @modified_user_id = params.dig(:modified_user_id) @app_enrollment_id = params.dig(:app_enrollment_id) end |
Instance Attribute Details
#app_enrollment_id ⇒ Uuid
Returns The AppEnrollmentId of the application that imported this record. For accounts with more than one financial system connected, this field identifies the originating financial system that produced this record. This value is null if this record was not loaded from an external ERP or financial system.
193 194 195 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 193 def app_enrollment_id @app_enrollment_id end |
#company_id ⇒ Uuid
Returns The ID number of the company that created this invoice.
77 78 79 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 77 def company_id @company_id end |
#created ⇒ Date-time
Returns The date on which this invoice record was created.
177 178 179 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 177 def created @created end |
#created_user_id ⇒ Uuid
Returns The ID number of the user who created this invoice.
181 182 183 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 181 def created_user_id @created_user_id end |
#currency_code ⇒ String
Returns The three-character ISO 4217 currency code used for this invoice. This will be validated by the /api/v1/definitions/currencies data set.
121 122 123 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 121 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.
81 82 83 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 81 def customer_id @customer_id end |
#discount_amount ⇒ Double
Returns The total discounts given by the seller to the buyer on this invoice.
133 134 135 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 133 def discount_amount @discount_amount end |
#discount_date ⇒ Date
Returns The date when discounts were adjusted for this invoice.
145 146 147 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 145 def discount_date @discount_date end |
#erp_key ⇒ String
Returns The unique ID of this record as it was known in its originating financial system. If this company record was imported from a financial system, it will have the value ErpKey set to the original primary key number of the record as it was known in the originating financial system. If this record was not imported, this value will be null. For more information, see [Identity Columns](developer.lockstep.io/docs/identity-columns).
85 86 87 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 85 def erp_key @erp_key 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).
65 66 67 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 65 def group_key @group_key end |
#imported_date ⇒ Date-time
Returns The date and time when this record was imported from the user’s ERP or accounting system.
161 162 163 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 161 def imported_date @imported_date end |
#invoice_closed_date ⇒ Date
Returns The date when the invoice was closed and finalized after completion of all payments and delivery of all products and services.
153 154 155 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 153 def invoice_closed_date @invoice_closed_date end |
#invoice_date ⇒ Date
Returns The reporting date for this invoice.
141 142 143 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 141 def invoice_date @invoice_date end |
#invoice_history_id ⇒ Uuid
Returns The unique ID number of this invoice history entry.
69 70 71 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 69 def invoice_history_id @invoice_history_id end |
#invoice_id ⇒ Uuid
Returns The unique ID of the Invoice represented by this history entry. This ID was automatically assigned by Lockstep to the Invoice record when it was added to the Lockstep platform. For the ID of this record in its originating financial system, see ErpKey.
73 74 75 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 73 def invoice_id @invoice_id end |
#invoice_status_code ⇒ String
Returns A code identifying the status of this invoice.
109 110 111 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 109 def invoice_status_code @invoice_status_code end |
#invoice_type_code ⇒ String
Returns A code identifying the type of this invoice.
105 106 107 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 105 def invoice_type_code @invoice_type_code end |
#modified ⇒ Date-time
Returns The date on which this invoice record was last modified.
185 186 187 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 185 def modified @modified end |
#modified_user_id ⇒ Uuid
Returns The ID number of the user who most recently modified this invoice.
189 190 191 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 189 def modified_user_id @modified_user_id end |
#outstanding_balance_amount ⇒ Double
Returns The remaining balance value of this invoice.
137 138 139 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 137 def outstanding_balance_amount @outstanding_balance_amount end |
#payment_due_date ⇒ Date
Returns The date when the remaining outstanding balance is due.
157 158 159 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 157 def payment_due_date @payment_due_date end |
#posted_date ⇒ Date
Returns The date when this invoice posted to the company’s general ledger.
149 150 151 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 149 def posted_date @posted_date end |
#primary_bill_to_address_id ⇒ Uuid
Returns The ID number of the invoice’s bill-to address.
169 170 171 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 169 def primary_bill_to_address_id @primary_bill_to_address_id end |
#primary_origin_address_id ⇒ Uuid
Returns The ID number of the invoice’s origination address.
165 166 167 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 165 def primary_origin_address_id @primary_origin_address_id end |
#primary_ship_to_address_id ⇒ Uuid
Returns The ID number of the invoice’s ship-to address.
173 174 175 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 173 def primary_ship_to_address_id @primary_ship_to_address_id end |
#purchase_order_code ⇒ String
Returns The purchase order code as it exists in the user’s ERP or accounting system.
89 90 91 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 89 def purchase_order_code @purchase_order_code 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.
93 94 95 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 93 def reference_code @reference_code end |
#sales_tax_amount ⇒ Double
Returns The total sales (or transactional) tax calculated for this invoice.
129 130 131 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 129 def sales_tax_amount @sales_tax_amount end |
#salesperson_code ⇒ String
Returns A code identifying the salesperson responsible for writing this invoice.
97 98 99 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 97 def salesperson_code @salesperson_code end |
#salesperson_name ⇒ String
Returns A string identifying the salesperson responsible for writing this invoice.
101 102 103 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 101 def salesperson_name @salesperson_name end |
#special_terms ⇒ String
Returns If the customer negotiated any special terms different from the standard terms above, describe them here.
117 118 119 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 117 def special_terms @special_terms end |
#terms_code ⇒ String
Returns A code identifying the terms given to the purchaser.
113 114 115 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 113 def terms_code @terms_code end |
#total_amount ⇒ Double
Returns The total value of this invoice, inclusive of all taxes and line items.
125 126 127 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 125 def total_amount @total_amount end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 197 def as_json(={}) { 'groupKey' => @group_key, 'invoiceHistoryId' => @invoice_history_id, 'invoiceId' => @invoice_id, 'companyId' => @company_id, 'customerId' => @customer_id, 'erpKey' => @erp_key, 'purchaseOrderCode' => @purchase_order_code, 'referenceCode' => @reference_code, 'salespersonCode' => @salesperson_code, 'salespersonName' => @salesperson_name, 'invoiceTypeCode' => @invoice_type_code, 'invoiceStatusCode' => @invoice_status_code, 'termsCode' => @terms_code, 'specialTerms' => @special_terms, 'currencyCode' => @currency_code, 'totalAmount' => @total_amount, 'salesTaxAmount' => @sales_tax_amount, 'discountAmount' => @discount_amount, 'outstandingBalanceAmount' => @outstanding_balance_amount, 'invoiceDate' => @invoice_date, 'discountDate' => @discount_date, 'postedDate' => @posted_date, 'invoiceClosedDate' => @invoice_closed_date, 'paymentDueDate' => @payment_due_date, 'importedDate' => @imported_date, 'primaryOriginAddressId' => @primary_origin_address_id, 'primaryBillToAddressId' => @primary_bill_to_address_id, 'primaryShipToAddressId' => @primary_ship_to_address_id, 'created' => @created, 'createdUserId' => @created_user_id, 'modified' => @modified, 'modifiedUserId' => @modified_user_id, 'appEnrollmentId' => @app_enrollment_id, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
237 238 239 |
# File 'lib/lockstep_sdk/models/invoice_history_model.rb', line 237 def to_json(*) "[#{as_json(*).to_json(*)}]" end |