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
-
#base_currency_code ⇒ String
The group’s base currency code.
-
#base_currency_invoice_amount ⇒ Double
The invoice amount in the group’s base currency.
-
#base_currency_outstanding_balance ⇒ Double
The outstanding balance amount in the group’s base currency.
-
#currency_code ⇒ String
The currency code for the invoice.
-
#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_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_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.
-
#modified ⇒ Date-time
The modified date of the 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_count ⇒ Int32
The number of payments associated to 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.
-
#supports_erp_pdf_retrieval ⇒ Boolean
Specific invoices have support for pdf retrieval from their respective erp.
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
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 25 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) @invoice_closed_date = params.dig(:invoice_closed_date) @customer_name = params.dig(:customer_name) @status = params.dig(:status) @payment_due_date = params.dig(:payment_due_date) @currency_code = params.dig(:currency_code) @invoice_amount = params.dig(:invoice_amount) @outstanding_balance = params.dig(:outstanding_balance) @base_currency_code = params.dig(:base_currency_code) @base_currency_invoice_amount = params.dig(:base_currency_invoice_amount) @base_currency_outstanding_balance = params.dig(:base_currency_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_count = params.dig(:payment_count) @supports_erp_pdf_retrieval = params.dig(:supports_erp_pdf_retrieval) @payment_numbers = params.dig(:payment_numbers) @payment_ids = params.dig(:payment_ids) @modified = params.dig(:modified) end |
Instance Attribute Details
#base_currency_code ⇒ String
101 102 103 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 101 def base_currency_code @base_currency_code end |
#base_currency_invoice_amount ⇒ Double
105 106 107 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 105 def base_currency_invoice_amount @base_currency_invoice_amount end |
#base_currency_outstanding_balance ⇒ Double
109 110 111 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 109 def base_currency_outstanding_balance @base_currency_outstanding_balance end |
#currency_code ⇒ String
89 90 91 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 89 def currency_code @currency_code end |
#customer_id ⇒ Uuid
57 58 59 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 57 def customer_id @customer_id end |
#customer_name ⇒ String
77 78 79 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 77 def customer_name @customer_name end |
#days_past_due ⇒ Int32
121 122 123 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 121 def days_past_due @days_past_due end |
#group_key ⇒ Uuid
53 54 55 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 53 def group_key @group_key end |
#invoice_amount ⇒ Double
93 94 95 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 93 def invoice_amount @invoice_amount end |
#invoice_closed_date ⇒ Date
73 74 75 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 73 def invoice_closed_date @invoice_closed_date end |
#invoice_date ⇒ Date
69 70 71 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 69 def invoice_date @invoice_date end |
#invoice_id ⇒ Uuid
61 62 63 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 61 def invoice_id @invoice_id end |
#invoice_number ⇒ String
65 66 67 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 65 def invoice_number @invoice_number end |
#invoice_type_code ⇒ String
113 114 115 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 113 def invoice_type_code @invoice_type_code end |
#modified ⇒ Date-time
141 142 143 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 141 def modified @modified end |
#newest_activity ⇒ Date
117 118 119 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 117 def newest_activity @newest_activity end |
#outstanding_balance ⇒ Double
97 98 99 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 97 def outstanding_balance @outstanding_balance end |
#payment_count ⇒ Int32
125 126 127 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 125 def payment_count @payment_count end |
#payment_due_date ⇒ Date
85 86 87 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 85 def payment_due_date @payment_due_date end |
#payment_ids ⇒ Uuid
137 138 139 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 137 def payment_ids @payment_ids end |
#payment_numbers ⇒ String
133 134 135 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 133 def payment_numbers @payment_numbers end |
#status ⇒ String
81 82 83 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 81 def status @status end |
#supports_erp_pdf_retrieval ⇒ Boolean
129 130 131 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 129 def supports_erp_pdf_retrieval @supports_erp_pdf_retrieval end |
Instance Method Details
#as_json(options = {}) ⇒ object
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 145 def as_json(={}) { 'groupKey' => @group_key, 'customerId' => @customer_id, 'invoiceId' => @invoice_id, 'invoiceNumber' => @invoice_number, 'invoiceDate' => @invoice_date, 'invoiceClosedDate' => @invoice_closed_date, 'customerName' => @customer_name, 'status' => @status, 'paymentDueDate' => @payment_due_date, 'currencyCode' => @currency_code, 'invoiceAmount' => @invoice_amount, 'outstandingBalance' => @outstanding_balance, 'baseCurrencyCode' => @base_currency_code, 'baseCurrencyInvoiceAmount' => @base_currency_invoice_amount, 'baseCurrencyOutstandingBalance' => @base_currency_outstanding_balance, 'invoiceTypeCode' => @invoice_type_code, 'newestActivity' => @newest_activity, 'daysPastDue' => @days_past_due, 'paymentCount' => @payment_count, 'supportsErpPdfRetrieval' => @supports_erp_pdf_retrieval, 'paymentNumbers' => @payment_numbers, 'paymentIds' => @payment_ids, 'modified' => @modified, } end |
#to_json(*options) ⇒ String
175 176 177 |
# File 'lib/lockstep_sdk/models/invoice_summary_model.rb', line 175 def to_json(*) "[#{as_json(*).to_json(*)}]" end |