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

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @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.



136
137
138
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 136

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.



148
149
150
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 148

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.



152
153
154
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 152

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.



132
133
134
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 132

def amount_paid_past_thirty_days
  @amount_paid_past_thirty_days
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.



144
145
146
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 144

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.



140
141
142
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 140

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.



156
157
158
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 156

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



56
57
58
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 56

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.



108
109
110
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 108

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.



124
125
126
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 124

def percentage_of_total_ap90_days_past_due
  @percentage_of_total_ap90_days_past_due
end

#report_periodDate-time

Returns The date of the report.

Returns:

  • (Date-time)

    The date of the report



60
61
62
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 60

def report_period
  @report_period
end

#total_advance_paymentsDouble

Returns The total number of advance payments.

Returns:

  • (Double)

    The total number of advance payments.



76
77
78
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 76

def total_advance_payments
  @total_advance_payments
end

#total_ap_amountDouble

Returns The total accounts payable amount.

Returns:

  • (Double)

    The total accounts payable amount.



84
85
86
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 84

def total_ap_amount
  @total_ap_amount
end

#total_billed_amountDouble

Returns The total amount billed.

Returns:

  • (Double)

    The total amount billed.



72
73
74
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 72

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.



112
113
114
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 112

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.



116
117
118
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 116

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.



68
69
70
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 68

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.



96
97
98
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 96

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.



88
89
90
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 88

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.



92
93
94
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 92

def total_bills_past_due
  @total_bills_past_due
end

#total_paidDouble

Returns The total amount paid.

Returns:

  • (Double)

    The total amount paid.



80
81
82
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 80

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.



120
121
122
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 120

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.



100
101
102
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 100

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.



104
105
106
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 104

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.



64
65
66
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 64

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.



128
129
130
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 128

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



160
161
162
163
164
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
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 160

def as_json(options={})
    {
        'groupKey' => @group_key,
        '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



193
194
195
# File 'lib/lockstep_sdk/models/ap_header_info_model.rb', line 193

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