Class: LockstepSdk::ArHeaderInfoModel
- Inherits:
-
Object
- Object
- LockstepSdk::ArHeaderInfoModel
- Defined in:
- lib/lockstep_sdk/models/ar_header_info_model.rb
Overview
Aggregated Accounts Receivable information.
Instance Attribute Summary collapse
-
#dso ⇒ Double
Daily sales outstanding.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#percentage_of_total_ar ⇒ Double
Portion of Total AR that is Past due.
-
#percentage_of_total_ar90_days_past_due ⇒ Double
Portion of Total AR that is 90+ days Past due.
-
#report_period ⇒ Date
The date of the report.
-
#total_ar_amount ⇒ Double
The total accounts receivable amount.
-
#total_collected ⇒ Double
The total amount of collected payments.
-
#total_collected_past_thirty_days ⇒ Int32
The total amount of payments received in the last 30 days.
-
#total_customers ⇒ Int32
The total number of customers.
-
#total_invoice_amount_current_year ⇒ Double
The total amount invoiced, due this year.
-
#total_invoice_amount_previous_year ⇒ Double
The total amount invoiced, due last year.
-
#total_invoiced_amount ⇒ Double
The total amount invoiced.
-
#total_invoices ⇒ Int32
The total number of invoices.
-
#total_invoices90_days_past_due ⇒ Int32
The number of past due invoices for the last 90 days.
-
#total_invoices_paid ⇒ Int32
The number of paid invoices.
-
#total_invoices_paid_past_thirty_days ⇒ Int32
The total amount of Invoices paid in the last 30 days.
-
#total_invoices_past_due ⇒ Int32
The number of past due invoices.
-
#total_past_due_amount ⇒ Double
The total amount past due.
-
#total_past_due_amount90_days ⇒ Double
The total past due for the past 90 days.
-
#total_payment_amount_current_year ⇒ Double
The total of all payments received this year.
-
#total_unapplied_payments ⇒ Double
The total number of unapplied payments.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ ArHeaderInfoModel
constructor
Initialize the ArHeaderInfoModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ ArHeaderInfoModel
Initialize the ArHeaderInfoModel using the provided prototype
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 28 def initialize(params = {}) @group_key = params.dig(:group_key) @report_period = params.dig(:report_period) @total_customers = params.dig(:total_customers) @total_invoices = params.dig(:total_invoices) @total_invoiced_amount = params.dig(:total_invoiced_amount) @total_unapplied_payments = params.dig(:total_unapplied_payments) @total_collected = params.dig(:total_collected) @total_ar_amount = params.dig(:total_ar_amount) @total_invoices_paid = params.dig(:total_invoices_paid) @total_invoices_past_due = params.dig(:total_invoices_past_due) @total_invoices90_days_past_due = params.dig(:total_invoices90_days_past_due) @total_past_due_amount = params.dig(:total_past_due_amount) @total_past_due_amount90_days = params.dig(:total_past_due_amount90_days) @percentage_of_total_ar = params.dig(:percentage_of_total_ar) @dso = params.dig(:dso) @total_invoice_amount_current_year = params.dig(:total_invoice_amount_current_year) @total_invoice_amount_previous_year = params.dig(:total_invoice_amount_previous_year) @total_payment_amount_current_year = params.dig(:total_payment_amount_current_year) @total_collected_past_thirty_days = params.dig(:total_collected_past_thirty_days) @total_invoices_paid_past_thirty_days = params.dig(:total_invoices_paid_past_thirty_days) @percentage_of_total_ar90_days_past_due = params.dig(:percentage_of_total_ar90_days_past_due) end |
Instance Attribute Details
#dso ⇒ Double
Returns Daily sales outstanding.
110 111 112 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 110 def dso @dso 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).
54 55 56 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 54 def group_key @group_key end |
#percentage_of_total_ar ⇒ Double
Returns Portion of Total AR that is Past due.
106 107 108 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 106 def percentage_of_total_ar @percentage_of_total_ar end |
#percentage_of_total_ar90_days_past_due ⇒ Double
Returns Portion of Total AR that is 90+ days Past due.
134 135 136 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 134 def percentage_of_total_ar90_days_past_due @percentage_of_total_ar90_days_past_due end |
#report_period ⇒ Date
Returns The date of the report.
58 59 60 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 58 def report_period @report_period end |
#total_ar_amount ⇒ Double
Returns The total accounts receivable amount.
82 83 84 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 82 def total_ar_amount @total_ar_amount end |
#total_collected ⇒ Double
Returns The total amount of collected payments.
78 79 80 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 78 def total_collected @total_collected end |
#total_collected_past_thirty_days ⇒ Int32
Returns The total amount of payments received in the last 30 days.
126 127 128 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 126 def total_collected_past_thirty_days @total_collected_past_thirty_days end |
#total_customers ⇒ Int32
Returns The total number of customers.
62 63 64 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 62 def total_customers @total_customers end |
#total_invoice_amount_current_year ⇒ Double
Returns The total amount invoiced, due this year.
114 115 116 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 114 def total_invoice_amount_current_year @total_invoice_amount_current_year end |
#total_invoice_amount_previous_year ⇒ Double
Returns The total amount invoiced, due last year.
118 119 120 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 118 def total_invoice_amount_previous_year @total_invoice_amount_previous_year end |
#total_invoiced_amount ⇒ Double
Returns The total amount invoiced.
70 71 72 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 70 def total_invoiced_amount @total_invoiced_amount end |
#total_invoices ⇒ Int32
Returns The total number of invoices.
66 67 68 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 66 def total_invoices @total_invoices end |
#total_invoices90_days_past_due ⇒ Int32
Returns The number of past due invoices for the last 90 days.
94 95 96 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 94 def total_invoices90_days_past_due @total_invoices90_days_past_due end |
#total_invoices_paid ⇒ Int32
Returns The number of paid invoices.
86 87 88 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 86 def total_invoices_paid @total_invoices_paid end |
#total_invoices_paid_past_thirty_days ⇒ Int32
Returns The total amount of Invoices paid in the last 30 days.
130 131 132 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 130 def total_invoices_paid_past_thirty_days @total_invoices_paid_past_thirty_days end |
#total_invoices_past_due ⇒ Int32
Returns The number of past due invoices.
90 91 92 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 90 def total_invoices_past_due @total_invoices_past_due end |
#total_past_due_amount ⇒ Double
Returns The total amount past due.
98 99 100 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 98 def total_past_due_amount @total_past_due_amount end |
#total_past_due_amount90_days ⇒ Double
Returns The total past due for the past 90 days.
102 103 104 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 102 def total_past_due_amount90_days @total_past_due_amount90_days end |
#total_payment_amount_current_year ⇒ Double
Returns The total of all payments received this year.
122 123 124 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 122 def total_payment_amount_current_year @total_payment_amount_current_year end |
#total_unapplied_payments ⇒ Double
Returns The total number of unapplied payments.
74 75 76 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 74 def total_unapplied_payments @total_unapplied_payments end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 138 def as_json(={}) { 'groupKey' => @group_key, 'reportPeriod' => @report_period, 'totalCustomers' => @total_customers, 'totalInvoices' => @total_invoices, 'totalInvoicedAmount' => @total_invoiced_amount, 'totalUnappliedPayments' => @total_unapplied_payments, 'totalCollected' => @total_collected, 'totalArAmount' => @total_ar_amount, 'totalInvoicesPaid' => @total_invoices_paid, 'totalInvoicesPastDue' => @total_invoices_past_due, 'totalInvoices90DaysPastDue' => @total_invoices90_days_past_due, 'totalPastDueAmount' => @total_past_due_amount, 'totalPastDueAmount90Days' => @total_past_due_amount90_days, 'percentageOfTotalAr' => @percentage_of_total_ar, 'dso' => @dso, 'totalInvoiceAmountCurrentYear' => @total_invoice_amount_current_year, 'totalInvoiceAmountPreviousYear' => @total_invoice_amount_previous_year, 'totalPaymentAmountCurrentYear' => @total_payment_amount_current_year, 'totalCollectedPastThirtyDays' => @total_collected_past_thirty_days, 'totalInvoicesPaidPastThirtyDays' => @total_invoices_paid_past_thirty_days, 'percentageOfTotalAr90DaysPastDue' => @percentage_of_total_ar90_days_past_due, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
166 167 168 |
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 166 def to_json(*) "[#{as_json(*).to_json(*)}]" end |