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



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



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



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



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



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



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



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



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



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



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



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



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

def report_date
  @report_date
end

#report_periodDate-time



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

def report_period
  @report_period
end

#total_advance_paymentsDouble



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



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



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



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



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



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



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



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



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



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



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



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



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



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



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



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



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