Class: LockstepSdk::ApHeaderInfoModel

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

Overview

Aggregated Accounts Payable information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ ApHeaderInfoModel

Initialize the ApHeaderInfoModel 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
54
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 25

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @base_currency_code = params.dig(:base_currency_code)
    @report_date = params.dig(:report_date)
    @report_period = params.dig(:report_period)
    @total_vendors = params.dig(:total_vendors)
    @total_bills = params.dig(:total_bills)
    @total_billed_amount = params.dig(:total_billed_amount)
    @total_advance_payments = params.dig(:total_advance_payments)
    @total_paid = params.dig(:total_paid)
    @total_ap_amount = params.dig(:total_ap_amount)
    @total_bills_paid = params.dig(:total_bills_paid)
    @total_bills_past_due = params.dig(:total_bills_past_due)
    @total_bills90_days_past_due = params.dig(:total_bills90_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_ap = params.dig(:percentage_of_total_ap)
    @total_billed_amount_current_year = params.dig(:total_billed_amount_current_year)
    @total_billed_amount_previous_year = params.dig(:total_billed_amount_previous_year)
    @total_paid_amount_current_year = params.dig(:total_paid_amount_current_year)
    @percentage_of_total_ap90_days_past_due = params.dig(:percentage_of_total_ap90_days_past_due)
    @vendors_paid_past_thirty_days = params.dig(:vendors_paid_past_thirty_days)
    @amount_paid_past_thirty_days = params.dig(:amount_paid_past_thirty_days)
    @advance_payment_amount_past_thirty_days = params.dig(:advance_payment_amount_past_thirty_days)
    @bills_paid_past_thirty_days = params.dig(:bills_paid_past_thirty_days)
    @billing_vendors_past_thirty_days = params.dig(:billing_vendors_past_thirty_days)
    @amount_billed_past_thirty_days = params.dig(:amount_billed_past_thirty_days)
    @amount_due_past_thirty_days = params.dig(:amount_due_past_thirty_days)
    @bills_past_thirty_days = params.dig(:bills_past_thirty_days)
end

Instance Attribute Details

#advance_payment_amount_past_thirty_daysDouble

Returns The amount in advance from the payments made over the past thirty days.

Returns:

  • (Double)

    The amount in advance from the payments made over the past thirty days.



146
147
148
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 146

def advance_payment_amount_past_thirty_days
  @advance_payment_amount_past_thirty_days
end

#amount_billed_past_thirty_daysDouble

Returns The total amount billed over the past thirty days.

Returns:

  • (Double)

    The total amount billed over the past thirty days.



158
159
160
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 158

def amount_billed_past_thirty_days
  @amount_billed_past_thirty_days
end

#amount_due_past_thirty_daysDouble

Returns The amount outstanding on the bills received over the past thirty days.

Returns:

  • (Double)

    The amount outstanding on the bills received over the past thirty days.



162
163
164
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 162

def amount_due_past_thirty_days
  @amount_due_past_thirty_days
end

#amount_paid_past_thirty_daysDouble

Returns The total amount paid over the past thirty days.

Returns:

  • (Double)

    The total amount paid over the past thirty days.



142
143
144
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 142

def amount_paid_past_thirty_days
  @amount_paid_past_thirty_days
end

#base_currency_codeString

Returns The base currency code of the group account.

Returns:

  • (String)

    The base currency code of the group account



62
63
64
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 62

def base_currency_code
  @base_currency_code
end

#billing_vendors_past_thirty_daysInt32

Returns The number of vendors that sent bills over the the past thirty days.

Returns:

  • (Int32)

    The number of vendors that sent bills over the the past thirty days.



154
155
156
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 154

def billing_vendors_past_thirty_days
  @billing_vendors_past_thirty_days
end

#bills_paid_past_thirty_daysInt32

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

Returns:

  • (Int32)

    The number of bills paid over the past thirty days.



150
151
152
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 150

def bills_paid_past_thirty_days
  @bills_paid_past_thirty_days
end

#bills_past_thirty_daysInt32

Returns The number of bills received over the past thirty days.

Returns:

  • (Int32)

    The number of bills received over the past thirty days.



166
167
168
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 166

def bills_past_thirty_days
  @bills_past_thirty_days
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).



58
59
60
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 58

def group_key
  @group_key
end

#percentage_of_total_apDouble

Returns Portion of Total AP that is Past due.

Returns:

  • (Double)

    Portion of Total AP that is Past due.



118
119
120
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 118

def percentage_of_total_ap
  @percentage_of_total_ap
end

#percentage_of_total_ap90_days_past_dueDouble

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

Returns:

  • (Double)

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



134
135
136
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 134

def percentage_of_total_ap90_days_past_due
  @percentage_of_total_ap90_days_past_due
end

#report_dateDate-time

Returns The date of the report.

Returns:

  • (Date-time)

    The date of the report



66
67
68
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 66

def report_date
  @report_date
end

#report_periodDate-time

Returns The date of the report.

Returns:

  • (Date-time)

    The date of the report



70
71
72
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 70

def report_period
  @report_period
end

#total_advance_paymentsDouble

Returns The total number of advance payments.

Returns:

  • (Double)

    The total number of advance payments.



86
87
88
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 86

def total_advance_payments
  @total_advance_payments
end

#total_ap_amountDouble

Returns The total accounts payable amount.

Returns:

  • (Double)

    The total accounts payable amount.



94
95
96
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 94

def total_ap_amount
  @total_ap_amount
end

#total_billed_amountDouble

Returns The total amount billed.

Returns:

  • (Double)

    The total amount billed.



82
83
84
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 82

def total_billed_amount
  @total_billed_amount
end

#total_billed_amount_current_yearDouble

Returns The total amount billed, due this year.

Returns:

  • (Double)

    The total amount billed, due this year.



122
123
124
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 122

def total_billed_amount_current_year
  @total_billed_amount_current_year
end

#total_billed_amount_previous_yearDouble

Returns The total amount billed, due last year.

Returns:

  • (Double)

    The total amount billed, due last year.



126
127
128
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 126

def total_billed_amount_previous_year
  @total_billed_amount_previous_year
end

#total_billsInt32

Returns The total number of bills.

Returns:

  • (Int32)

    The total number of bills.



78
79
80
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 78

def total_bills
  @total_bills
end

#total_bills90_days_past_dueInt32

Returns The number of bills 90+ days past due.

Returns:

  • (Int32)

    The number of bills 90+ days past due.



106
107
108
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 106

def total_bills90_days_past_due
  @total_bills90_days_past_due
end

#total_bills_paidInt32

Returns The number of paid bills.

Returns:

  • (Int32)

    The number of paid bills.



98
99
100
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 98

def total_bills_paid
  @total_bills_paid
end

#total_bills_past_dueInt32

Returns The number of past due bills.

Returns:

  • (Int32)

    The number of past due bills.



102
103
104
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 102

def total_bills_past_due
  @total_bills_past_due
end

#total_paidDouble

Returns The total amount paid.

Returns:

  • (Double)

    The total amount paid.



90
91
92
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 90

def total_paid
  @total_paid
end

#total_paid_amount_current_yearDouble

Returns The total of all payments made this year.

Returns:

  • (Double)

    The total of all payments made this year.



130
131
132
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 130

def total_paid_amount_current_year
  @total_paid_amount_current_year
end

#total_past_due_amountDouble

Returns The total amount past due.

Returns:

  • (Double)

    The total amount past due.



110
111
112
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 110

def total_past_due_amount
  @total_past_due_amount
end

#total_past_due_amount90_daysDouble

Returns The total amount for bills 90+ days past due.

Returns:

  • (Double)

    The total amount for bills 90+ days past due.



114
115
116
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 114

def total_past_due_amount90_days
  @total_past_due_amount90_days
end

#total_vendorsInt32

Returns The total number of vendors.

Returns:

  • (Int32)

    The total number of vendors.



74
75
76
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 74

def total_vendors
  @total_vendors
end

#vendors_paid_past_thirty_daysInt32

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

Returns:

  • (Int32)

    The number of vendors who were paid within the past thirty days.



138
139
140
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 138

def vendors_paid_past_thirty_days
  @vendors_paid_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



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
196
197
198
199
200
201
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 170

def as_json(options={})
    {
        'groupKey' => @group_key,
        'baseCurrencyCode' => @base_currency_code,
        'reportDate' => @report_date,
        'reportPeriod' => @report_period,
        'totalVendors' => @total_vendors,
        'totalBills' => @total_bills,
        'totalBilledAmount' => @total_billed_amount,
        'totalAdvancePayments' => @total_advance_payments,
        'totalPaid' => @total_paid,
        'totalApAmount' => @total_ap_amount,
        'totalBillsPaid' => @total_bills_paid,
        'totalBillsPastDue' => @total_bills_past_due,
        'totalBills90DaysPastDue' => @total_bills90_days_past_due,
        'totalPastDueAmount' => @total_past_due_amount,
        'totalPastDueAmount90Days' => @total_past_due_amount90_days,
        'percentageOfTotalAp' => @percentage_of_total_ap,
        'totalBilledAmountCurrentYear' => @total_billed_amount_current_year,
        'totalBilledAmountPreviousYear' => @total_billed_amount_previous_year,
        'totalPaidAmountCurrentYear' => @total_paid_amount_current_year,
        'percentageOfTotalAp90DaysPastDue' => @percentage_of_total_ap90_days_past_due,
        'vendorsPaidPastThirtyDays' => @vendors_paid_past_thirty_days,
        'amountPaidPastThirtyDays' => @amount_paid_past_thirty_days,
        'advancePaymentAmountPastThirtyDays' => @advance_payment_amount_past_thirty_days,
        'billsPaidPastThirtyDays' => @bills_paid_past_thirty_days,
        'billingVendorsPastThirtyDays' => @billing_vendors_past_thirty_days,
        'amountBilledPastThirtyDays' => @amount_billed_past_thirty_days,
        'amountDuePastThirtyDays' => @amount_due_past_thirty_days,
        'billsPastThirtyDays' => @bills_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



205
206
207
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 205

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