Class: LockstepSdk::InvoiceSummaryModel
- Inherits:
-
Object
- Object
- LockstepSdk::InvoiceSummaryModel
- Defined in:
- lib/lockstep_sdk/models/invoice_summary_model.rb
Overview
Contains summarized data for an invoice
Instance Attribute Summary collapse
-
#customer_id ⇒ Uuid
The ID number of the counterparty for the invoice, for example, a customer or vendor.
-
#customer_name ⇒ String
The name of the counterparty for the invoice, for example, a customer or vendor.
-
#days_past_due ⇒ Int32
The number of days this Invoice is past due.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#invoice_amount ⇒ Double
The total amount of the Invoice.
-
#invoice_date ⇒ Date
The reporting date for this invoice.
-
#invoice_id ⇒ Uuid
The unique ID number of this invoice.
-
#invoice_number ⇒ String
A reference code that is used to identify this invoice.
-
#invoice_type_code ⇒ String
A code identifying the type of this Invoice.
-
#newest_activity ⇒ Date
The date stamp for the newest Activity on this Invoice.
-
#outstanding_balance ⇒ Double
The remaining balance value of this invoice.
-
#payment_due_date ⇒ Date
The due date of the invoice.
-
#payment_ids ⇒ Uuid
The ids of the payments associated to this invoice.
-
#payment_numbers ⇒ String
The memo text of the payments associated to this invoice.
-
#status ⇒ String
The status of the invoice.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ InvoiceSummaryModel
constructor
Initialize the InvoiceSummaryModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ InvoiceSummaryModel
Initialize the InvoiceSummaryModel using the provided prototype
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 26 def initialize(params = {}) @group_key = params.dig(:group_key) @customer_id = params.dig(:customer_id) @invoice_id = params.dig(:invoice_id) @invoice_number = params.dig(:invoice_number) @invoice_date = params.dig(:invoice_date) @customer_name = params.dig(:customer_name) @status = params.dig(:status) @payment_due_date = params.dig(:payment_due_date) @invoice_amount = params.dig(:invoice_amount) @outstanding_balance = params.dig(:outstanding_balance) @invoice_type_code = params.dig(:invoice_type_code) @newest_activity = params.dig(:newest_activity) @days_past_due = params.dig(:days_past_due) @payment_numbers = params.dig(:payment_numbers) @payment_ids = params.dig(:payment_ids) end |
Instance Attribute Details
#customer_id ⇒ Uuid
Returns The ID number of the counterparty for the invoice, for example, a customer or vendor.
47 48 49 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 47 def customer_id @customer_id end |
#customer_name ⇒ String
Returns The name of the counterparty for the invoice, for example, a customer or vendor.
55 56 57 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 55 def customer_name @customer_name end |
#days_past_due ⇒ Int32
Returns The number of days this Invoice is past due.
69 70 71 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 69 def days_past_due @days_past_due 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_summary_model.rb', line 45 def group_key @group_key end |
#invoice_amount ⇒ Double
Returns The total amount of the Invoice.
61 62 63 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 61 def invoice_amount @invoice_amount end |
#invoice_date ⇒ Date
Returns The reporting date for this invoice.
53 54 55 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 53 def invoice_date @invoice_date end |
#invoice_id ⇒ Uuid
Returns The unique ID number of this invoice.
49 50 51 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 49 def invoice_id @invoice_id end |
#invoice_number ⇒ String
Returns A reference code that is used to identify this invoice. The meaning of this field is specific to the ERP or accounting system used by the user.
51 52 53 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 51 def invoice_number @invoice_number end |
#invoice_type_code ⇒ String
Returns A code identifying the type of this Invoice.
65 66 67 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 65 def invoice_type_code @invoice_type_code end |
#newest_activity ⇒ Date
Returns The date stamp for the newest Activity on this Invoice.
67 68 69 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 67 def newest_activity @newest_activity end |
#outstanding_balance ⇒ Double
Returns The remaining balance value of this invoice.
63 64 65 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 63 def outstanding_balance @outstanding_balance end |
#payment_due_date ⇒ Date
Returns The due date of the invoice.
59 60 61 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 59 def payment_due_date @payment_due_date end |
#payment_ids ⇒ Uuid
Returns The ids of the payments associated to this invoice.
73 74 75 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 73 def payment_ids @payment_ids end |
#payment_numbers ⇒ String
Returns The memo text of the payments associated to this invoice.
71 72 73 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 71 def payment_numbers @payment_numbers end |
#status ⇒ String
Returns The status of the invoice.
57 58 59 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 57 def status @status end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 76 def as_json(={}) { 'groupKey' => @group_key, 'customerId' => @customer_id, 'invoiceId' => @invoice_id, 'invoiceNumber' => @invoice_number, 'invoiceDate' => @invoice_date, 'customerName' => @customer_name, 'status' => @status, 'paymentDueDate' => @payment_due_date, 'invoiceAmount' => @invoice_amount, 'outstandingBalance' => @outstanding_balance, 'invoiceTypeCode' => @invoice_type_code, 'newestActivity' => @newest_activity, 'daysPastDue' => @days_past_due, 'paymentNumbers' => @payment_numbers, 'paymentIds' => @payment_ids, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
97 98 99 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 97 def to_json(*) "[#{as_json(*).to_json(*)}]" end |