Class: LockstepSdk::ArHeaderInfoModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/ar_header_info_model.rb

Overview

Aggregated Accounts Receivable information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ ArHeaderInfoModel

Initialize the ArHeaderInfoModel 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
50
51
52
53
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 25

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)
    @percentage_of_total_ar90_days_past_due = params.dig(:percentage_of_total_ar90_days_past_due)
    @customers_paid_past_thirty_days = params.dig(:customers_paid_past_thirty_days)
    @amount_collected_past_thirty_days = params.dig(:amount_collected_past_thirty_days)
    @unapplied_amount_past_thirty_days = params.dig(:unapplied_amount_past_thirty_days)
    @invoices_paid_past_thirty_days = params.dig(:invoices_paid_past_thirty_days)
    @customers_invoiced_past_thirty_days = params.dig(:customers_invoiced_past_thirty_days)
    @amount_invoiced_past_thirty_days = params.dig(:amount_invoiced_past_thirty_days)
    @amount_due_past_thirty_days = params.dig(:amount_due_past_thirty_days)
    @invoices_past_thirty_days = params.dig(:invoices_past_thirty_days)
end

Instance Attribute Details

#amount_collected_past_thirty_daysDouble

Returns The total amount collected over the past thirty days.

Returns:

  • (Double)

    The total amount collected over the past thirty days.



137
138
139
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 137

def amount_collected_past_thirty_days
  @amount_collected_past_thirty_days
end

#amount_due_past_thirty_daysDouble

Returns The amount outstanding on the invoices invoiced over the past thirty days.

Returns:

  • (Double)

    The amount outstanding on the invoices invoiced over the past thirty days.



157
158
159
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 157

def amount_due_past_thirty_days
  @amount_due_past_thirty_days
end

#amount_invoiced_past_thirty_daysDouble

Returns The total amount invoiced over the past thirty days.

Returns:

  • (Double)

    The total amount invoiced over the past thirty days.



153
154
155
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 153

def amount_invoiced_past_thirty_days
  @amount_invoiced_past_thirty_days
end

#customers_invoiced_past_thirty_daysInt32

Returns The number of customers invoiced over the the past thirty days.

Returns:

  • (Int32)

    The number of customers invoiced over the the past thirty days.



149
150
151
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 149

def customers_invoiced_past_thirty_days
  @customers_invoiced_past_thirty_days
end

#customers_paid_past_thirty_daysInt32

Returns The number of customers who paid within the past thirty days.

Returns:

  • (Int32)

    The number of customers who paid within the past thirty days.



133
134
135
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 133

def customers_paid_past_thirty_days
  @customers_paid_past_thirty_days
end

#dsoDouble

Returns Daily sales outstanding.

Returns:

  • (Double)

    Daily sales outstanding.



113
114
115
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 113

def dso
  @dso
end

#group_keyUuid

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).

Returns:

  • (Uuid)

    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).



57
58
59
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 57

def group_key
  @group_key
end

#invoices_paid_past_thirty_daysInt32

Returns The number of invoices paid over the past thirty days.

Returns:

  • (Int32)

    The number of invoices paid over the past thirty days.



145
146
147
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 145

def invoices_paid_past_thirty_days
  @invoices_paid_past_thirty_days
end

#invoices_past_thirty_daysInt32

Returns The number of invoices invoiced over the past thirty days.

Returns:

  • (Int32)

    The number of invoices invoiced over the past thirty days.



161
162
163
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 161

def invoices_past_thirty_days
  @invoices_past_thirty_days
end

#percentage_of_total_arDouble

Returns Portion of Total AR that is Past due.

Returns:

  • (Double)

    Portion of Total AR that is Past due.



109
110
111
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 109

def percentage_of_total_ar
  @percentage_of_total_ar
end

#percentage_of_total_ar90_days_past_dueDouble

Returns Portion of Total AR that is 90+ days Past due.

Returns:

  • (Double)

    Portion of Total AR that is 90+ days Past due.



129
130
131
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 129

def percentage_of_total_ar90_days_past_due
  @percentage_of_total_ar90_days_past_due
end

#report_periodDate

Returns The date of the report.

Returns:

  • (Date)

    The date of the report



61
62
63
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 61

def report_period
  @report_period
end

#total_ar_amountDouble

Returns The total accounts receivable amount.

Returns:

  • (Double)

    The total accounts receivable amount.



85
86
87
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 85

def total_ar_amount
  @total_ar_amount
end

#total_collectedDouble

Returns The total amount of collected payments.

Returns:

  • (Double)

    The total amount of collected payments.



81
82
83
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 81

def total_collected
  @total_collected
end

#total_customersInt32

Returns The total number of customers.

Returns:

  • (Int32)

    The total number of customers.



65
66
67
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 65

def total_customers
  @total_customers
end

#total_invoice_amount_current_yearDouble

Returns The total amount invoiced, due this year.

Returns:

  • (Double)

    The total amount invoiced, due this year.



117
118
119
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 117

def total_invoice_amount_current_year
  @total_invoice_amount_current_year
end

#total_invoice_amount_previous_yearDouble

Returns The total amount invoiced, due last year.

Returns:

  • (Double)

    The total amount invoiced, due last year.



121
122
123
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 121

def total_invoice_amount_previous_year
  @total_invoice_amount_previous_year
end

#total_invoiced_amountDouble

Returns The total amount invoiced.

Returns:

  • (Double)

    The total amount invoiced.



73
74
75
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 73

def total_invoiced_amount
  @total_invoiced_amount
end

#total_invoicesInt32

Returns The total number of invoices.

Returns:

  • (Int32)

    The total number of invoices.



69
70
71
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 69

def total_invoices
  @total_invoices
end

#total_invoices90_days_past_dueInt32

Returns The number of past due invoices for the last 90 days.

Returns:

  • (Int32)

    The number of past due invoices for the last 90 days.



97
98
99
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 97

def total_invoices90_days_past_due
  @total_invoices90_days_past_due
end

#total_invoices_paidInt32

Returns The number of paid invoices.

Returns:

  • (Int32)

    The number of paid invoices.



89
90
91
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 89

def total_invoices_paid
  @total_invoices_paid
end

#total_invoices_past_dueInt32

Returns The number of past due invoices.

Returns:

  • (Int32)

    The number of past due invoices.



93
94
95
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 93

def total_invoices_past_due
  @total_invoices_past_due
end

#total_past_due_amountDouble

Returns The total amount past due.

Returns:

  • (Double)

    The total amount past due.



101
102
103
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 101

def total_past_due_amount
  @total_past_due_amount
end

#total_past_due_amount90_daysDouble

Returns The total past due for the past 90 days.

Returns:

  • (Double)

    The total past due for the past 90 days.



105
106
107
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 105

def total_past_due_amount90_days
  @total_past_due_amount90_days
end

#total_payment_amount_current_yearDouble

Returns The total of all payments received this year.

Returns:

  • (Double)

    The total of all payments received this year.



125
126
127
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 125

def total_payment_amount_current_year
  @total_payment_amount_current_year
end

#total_unapplied_paymentsDouble

Returns The total number of unapplied payments.

Returns:

  • (Double)

    The total number of unapplied payments.



77
78
79
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 77

def total_unapplied_payments
  @total_unapplied_payments
end

#unapplied_amount_past_thirty_daysDouble

Returns The amount unapplied from the payments collected over the past thirty days.

Returns:

  • (Double)

    The amount unapplied from the payments collected over the past thirty days.



141
142
143
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 141

def unapplied_amount_past_thirty_days
  @unapplied_amount_past_thirty_days
end

Instance Method Details

#as_json(options = {}) ⇒ object

Returns This object as a JSON key-value structure.

Returns:

  • (object)

    This object as a JSON key-value structure



165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 165

def as_json(options={})
    {
        '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,
        'percentageOfTotalAr90DaysPastDue' => @percentage_of_total_ar90_days_past_due,
        'customersPaidPastThirtyDays' => @customers_paid_past_thirty_days,
        'amountCollectedPastThirtyDays' => @amount_collected_past_thirty_days,
        'unappliedAmountPastThirtyDays' => @unapplied_amount_past_thirty_days,
        'invoicesPaidPastThirtyDays' => @invoices_paid_past_thirty_days,
        'customersInvoicedPastThirtyDays' => @customers_invoiced_past_thirty_days,
        'amountInvoicedPastThirtyDays' => @amount_invoiced_past_thirty_days,
        'amountDuePastThirtyDays' => @amount_due_past_thirty_days,
        'invoicesPastThirtyDays' => @invoices_past_thirty_days,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



199
200
201
# File 'lib/lockstep_sdk/models/ar_header_info_model.rb', line 199

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end