lockstep_sdk 2022.15.31.1 → 2022.26.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lockstep_sdk/clients/app_enrollments_client.rb +10 -0
- data/lib/lockstep_sdk/clients/companies_client.rb +25 -5
- data/lib/lockstep_sdk/clients/financial_account_client.rb +1 -1
- data/lib/lockstep_sdk/clients/group_accounts_client.rb +46 -0
- data/lib/lockstep_sdk/clients/payment_applications_client.rb +1 -1
- data/lib/lockstep_sdk/clients/provisioning_client.rb +0 -18
- data/lib/lockstep_sdk/clients/reports_client.rb +132 -8
- data/lib/lockstep_sdk/clients/user_accounts_client.rb +12 -0
- data/lib/lockstep_sdk/clients/webhook_rules_client.rb +81 -0
- data/lib/lockstep_sdk/clients/webhooks_client.rb +13 -2
- data/lib/lockstep_sdk/lockstep_api.rb +14 -4
- data/lib/lockstep_sdk/models/action_result_model.rb +52 -0
- data/lib/lockstep_sdk/models/ap_aging_header_info_model.rb +101 -0
- data/lib/lockstep_sdk/models/ap_header_info_model.rb +197 -0
- data/lib/lockstep_sdk/models/ar_aging_header_info_model.rb +18 -0
- data/lib/lockstep_sdk/models/ar_header_info_model.rb +46 -10
- data/lib/lockstep_sdk/models/{customer_details_model.rb → company_details_model.rb} +22 -22
- data/lib/lockstep_sdk/models/{customer_details_payment_model.rb → company_details_payment_model.rb} +3 -3
- data/lib/lockstep_sdk/models/company_model.rb +6 -0
- data/lib/lockstep_sdk/models/company_sync_model.rb +13 -1
- data/lib/lockstep_sdk/models/connector_info_model.rb +18 -0
- data/lib/lockstep_sdk/models/contact_sync_model.rb +2 -2
- data/lib/lockstep_sdk/models/customer_summary_model.rb +36 -0
- data/lib/lockstep_sdk/models/daily_payable_outstanding_report_model.rb +59 -0
- data/lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb +0 -6
- data/lib/lockstep_sdk/models/dpo_summary_group_total_model.rb +71 -0
- data/lib/lockstep_sdk/models/dpo_summary_model.rb +83 -0
- data/lib/lockstep_sdk/models/error_result.rb +77 -0
- data/lib/lockstep_sdk/models/group_account_model.rb +101 -0
- data/lib/lockstep_sdk/models/invoice_line_sync_model.rb +3 -3
- data/lib/lockstep_sdk/models/invoice_model.rb +7 -1
- data/lib/lockstep_sdk/models/invoice_summary_model.rb +6 -0
- data/lib/lockstep_sdk/models/invoice_sync_model.rb +10 -4
- data/lib/lockstep_sdk/models/payables_coming_due_header_model.rb +77 -0
- data/lib/lockstep_sdk/models/payables_coming_due_model.rb +89 -0
- data/lib/lockstep_sdk/models/payables_coming_due_widget_model.rb +59 -0
- data/lib/lockstep_sdk/models/payables_summary_report_model.rb +77 -0
- data/lib/lockstep_sdk/models/payment_applied_model.rb +6 -0
- data/lib/lockstep_sdk/models/payment_detail_model.rb +7 -1
- data/lib/lockstep_sdk/models/payment_model.rb +2 -2
- data/lib/lockstep_sdk/models/payment_summary_model.rb +45 -9
- data/lib/lockstep_sdk/models/payment_sync_model.rb +2 -2
- data/lib/lockstep_sdk/models/status_model.rb +12 -0
- data/lib/lockstep_sdk/models/sync_entity_result_model.rb +6 -0
- data/lib/lockstep_sdk/models/user_group_model.rb +66 -0
- data/lib/lockstep_sdk/models/vendor_summary_model.rb +143 -0
- data/lib/lockstep_sdk/models/webhook_model.rb +7 -1
- data/lib/lockstep_sdk/models/webhook_rule_model.rb +116 -0
- data/lib/lockstep_sdk/version.rb +1 -1
- metadata +21 -8
- data/lib/lockstep_sdk/models/erp_info_data_model.rb +0 -62
- data/lib/lockstep_sdk/models/trial_balance_report_cell_model.rb +0 -49
- data/lib/lockstep_sdk/models/trial_balance_report_model.rb +0 -79
- data/lib/lockstep_sdk/models/trial_balance_report_row_model.rb +0 -67
@@ -0,0 +1,101 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Platform SDK for Ruby
|
3
|
+
#
|
4
|
+
# (c) 2021-2022 Lockstep, Inc.
|
5
|
+
#
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
7
|
+
# file that was distributed with this source code.
|
8
|
+
#
|
9
|
+
# @author Lockstep Network <support@lockstep.io>
|
10
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
11
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
12
|
+
#
|
13
|
+
|
14
|
+
|
15
|
+
require 'json'
|
16
|
+
|
17
|
+
module LockstepSdk
|
18
|
+
|
19
|
+
##
|
20
|
+
# Aggregated Accounts Payable Aging information.
|
21
|
+
class ApAgingHeaderInfoModel
|
22
|
+
|
23
|
+
##
|
24
|
+
# Initialize the ApAgingHeaderInfoModel using the provided prototype
|
25
|
+
def initialize(params = {})
|
26
|
+
@group_key = params.dig(:group_key)
|
27
|
+
@report_bucket = params.dig(:report_bucket)
|
28
|
+
@total_vendors = params.dig(:total_vendors)
|
29
|
+
@total_bills_outstanding = params.dig(:total_bills_outstanding)
|
30
|
+
@total_bills_outstanding_amount = params.dig(:total_bills_outstanding_amount)
|
31
|
+
@total_credit_memo_outstanding_amount = params.dig(:total_credit_memo_outstanding_amount)
|
32
|
+
@total_advance_payment_amount = params.dig(:total_advance_payment_amount)
|
33
|
+
@total_outstanding_amount = params.dig(:total_outstanding_amount)
|
34
|
+
@total_ap_amount = params.dig(:total_ap_amount)
|
35
|
+
@percentage_of_total_ap = params.dig(:percentage_of_total_ap)
|
36
|
+
end
|
37
|
+
|
38
|
+
##
|
39
|
+
# @return [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](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
40
|
+
attr_accessor :group_key
|
41
|
+
|
42
|
+
##
|
43
|
+
# @return [String] The aging bucket this data belongs to.
|
44
|
+
attr_accessor :report_bucket
|
45
|
+
|
46
|
+
##
|
47
|
+
# @return [Int32] The total number of vendors.
|
48
|
+
attr_accessor :total_vendors
|
49
|
+
|
50
|
+
##
|
51
|
+
# @return [Int32] The total number of bills outstanding.
|
52
|
+
attr_accessor :total_bills_outstanding
|
53
|
+
|
54
|
+
##
|
55
|
+
# @return [Double] The total amount outstanding on bills.
|
56
|
+
attr_accessor :total_bills_outstanding_amount
|
57
|
+
|
58
|
+
##
|
59
|
+
# @return [Double] The total amount outstanding on credit memos.
|
60
|
+
attr_accessor :total_credit_memo_outstanding_amount
|
61
|
+
|
62
|
+
##
|
63
|
+
# @return [Double] The total amount of advance payments.
|
64
|
+
attr_accessor :total_advance_payment_amount
|
65
|
+
|
66
|
+
##
|
67
|
+
# @return [Double] The total amount outstanding.
|
68
|
+
attr_accessor :total_outstanding_amount
|
69
|
+
|
70
|
+
##
|
71
|
+
# @return [Double] The total amount for AP.
|
72
|
+
attr_accessor :total_ap_amount
|
73
|
+
|
74
|
+
##
|
75
|
+
# @return [Double] Portion of Total AP this data represents.
|
76
|
+
attr_accessor :percentage_of_total_ap
|
77
|
+
|
78
|
+
##
|
79
|
+
# @return [object] This object as a JSON key-value structure
|
80
|
+
def as_json(options={})
|
81
|
+
{
|
82
|
+
'groupKey' => @group_key,
|
83
|
+
'reportBucket' => @report_bucket,
|
84
|
+
'totalVendors' => @total_vendors,
|
85
|
+
'totalBillsOutstanding' => @total_bills_outstanding,
|
86
|
+
'totalBillsOutstandingAmount' => @total_bills_outstanding_amount,
|
87
|
+
'totalCreditMemoOutstandingAmount' => @total_credit_memo_outstanding_amount,
|
88
|
+
'totalAdvancePaymentAmount' => @total_advance_payment_amount,
|
89
|
+
'totalOutstandingAmount' => @total_outstanding_amount,
|
90
|
+
'totalApAmount' => @total_ap_amount,
|
91
|
+
'percentageOfTotalAp' => @percentage_of_total_ap,
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# @return [String] This object converted to a JSON string
|
97
|
+
def to_json(*options)
|
98
|
+
"[#{as_json(*options).to_json(*options)}]"
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,197 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Platform SDK for Ruby
|
3
|
+
#
|
4
|
+
# (c) 2021-2022 Lockstep, Inc.
|
5
|
+
#
|
6
|
+
# For the full copyright and license information, please view the LICENSE
|
7
|
+
# file that was distributed with this source code.
|
8
|
+
#
|
9
|
+
# @author Lockstep Network <support@lockstep.io>
|
10
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
11
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
12
|
+
#
|
13
|
+
|
14
|
+
|
15
|
+
require 'json'
|
16
|
+
|
17
|
+
module LockstepSdk
|
18
|
+
|
19
|
+
##
|
20
|
+
# Aggregated Accounts Payable information.
|
21
|
+
class ApHeaderInfoModel
|
22
|
+
|
23
|
+
##
|
24
|
+
# Initialize the ApHeaderInfoModel using the provided prototype
|
25
|
+
def initialize(params = {})
|
26
|
+
@group_key = params.dig(:group_key)
|
27
|
+
@report_period = params.dig(:report_period)
|
28
|
+
@total_vendors = params.dig(:total_vendors)
|
29
|
+
@total_bills = params.dig(:total_bills)
|
30
|
+
@total_billed_amount = params.dig(:total_billed_amount)
|
31
|
+
@total_advance_payments = params.dig(:total_advance_payments)
|
32
|
+
@total_paid = params.dig(:total_paid)
|
33
|
+
@total_ap_amount = params.dig(:total_ap_amount)
|
34
|
+
@total_bills_paid = params.dig(:total_bills_paid)
|
35
|
+
@total_bills_past_due = params.dig(:total_bills_past_due)
|
36
|
+
@total_bills90_days_past_due = params.dig(:total_bills90_days_past_due)
|
37
|
+
@total_past_due_amount = params.dig(:total_past_due_amount)
|
38
|
+
@total_past_due_amount90_days = params.dig(:total_past_due_amount90_days)
|
39
|
+
@percentage_of_total_ap = params.dig(:percentage_of_total_ap)
|
40
|
+
@total_billed_amount_current_year = params.dig(:total_billed_amount_current_year)
|
41
|
+
@total_billed_amount_previous_year = params.dig(:total_billed_amount_previous_year)
|
42
|
+
@total_paid_amount_current_year = params.dig(:total_paid_amount_current_year)
|
43
|
+
@percentage_of_total_ap90_days_past_due = params.dig(:percentage_of_total_ap90_days_past_due)
|
44
|
+
@vendors_paid_past_thirty_days = params.dig(:vendors_paid_past_thirty_days)
|
45
|
+
@amount_paid_past_thirty_days = params.dig(:amount_paid_past_thirty_days)
|
46
|
+
@advance_payment_amount_past_thirty_days = params.dig(:advance_payment_amount_past_thirty_days)
|
47
|
+
@bills_paid_past_thirty_days = params.dig(:bills_paid_past_thirty_days)
|
48
|
+
@billing_vendors_past_thirty_days = params.dig(:billing_vendors_past_thirty_days)
|
49
|
+
@amount_billed_past_thirty_days = params.dig(:amount_billed_past_thirty_days)
|
50
|
+
@amount_due_past_thirty_days = params.dig(:amount_due_past_thirty_days)
|
51
|
+
@bills_past_thirty_days = params.dig(:bills_past_thirty_days)
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# @return [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](https://developer.lockstep.io/docs/accounts-and-groupkeys).
|
56
|
+
attr_accessor :group_key
|
57
|
+
|
58
|
+
##
|
59
|
+
# @return [Date-time] The date of the report
|
60
|
+
attr_accessor :report_period
|
61
|
+
|
62
|
+
##
|
63
|
+
# @return [Int32] The total number of vendors.
|
64
|
+
attr_accessor :total_vendors
|
65
|
+
|
66
|
+
##
|
67
|
+
# @return [Int32] The total number of bills.
|
68
|
+
attr_accessor :total_bills
|
69
|
+
|
70
|
+
##
|
71
|
+
# @return [Double] The total amount billed.
|
72
|
+
attr_accessor :total_billed_amount
|
73
|
+
|
74
|
+
##
|
75
|
+
# @return [Double] The total number of advance payments.
|
76
|
+
attr_accessor :total_advance_payments
|
77
|
+
|
78
|
+
##
|
79
|
+
# @return [Double] The total amount paid.
|
80
|
+
attr_accessor :total_paid
|
81
|
+
|
82
|
+
##
|
83
|
+
# @return [Double] The total accounts payable amount.
|
84
|
+
attr_accessor :total_ap_amount
|
85
|
+
|
86
|
+
##
|
87
|
+
# @return [Int32] The number of paid bills.
|
88
|
+
attr_accessor :total_bills_paid
|
89
|
+
|
90
|
+
##
|
91
|
+
# @return [Int32] The number of past due bills.
|
92
|
+
attr_accessor :total_bills_past_due
|
93
|
+
|
94
|
+
##
|
95
|
+
# @return [Int32] The number of bills 90+ days past due.
|
96
|
+
attr_accessor :total_bills90_days_past_due
|
97
|
+
|
98
|
+
##
|
99
|
+
# @return [Double] The total amount past due.
|
100
|
+
attr_accessor :total_past_due_amount
|
101
|
+
|
102
|
+
##
|
103
|
+
# @return [Double] The total amount for bills 90+ days past due.
|
104
|
+
attr_accessor :total_past_due_amount90_days
|
105
|
+
|
106
|
+
##
|
107
|
+
# @return [Double] Portion of Total AP that is Past due.
|
108
|
+
attr_accessor :percentage_of_total_ap
|
109
|
+
|
110
|
+
##
|
111
|
+
# @return [Double] The total amount billed, due this year.
|
112
|
+
attr_accessor :total_billed_amount_current_year
|
113
|
+
|
114
|
+
##
|
115
|
+
# @return [Double] The total amount billed, due last year.
|
116
|
+
attr_accessor :total_billed_amount_previous_year
|
117
|
+
|
118
|
+
##
|
119
|
+
# @return [Double] The total of all payments made this year.
|
120
|
+
attr_accessor :total_paid_amount_current_year
|
121
|
+
|
122
|
+
##
|
123
|
+
# @return [Double] Portion of Total AP that is 90+ days Past due.
|
124
|
+
attr_accessor :percentage_of_total_ap90_days_past_due
|
125
|
+
|
126
|
+
##
|
127
|
+
# @return [Int32] The number of vendors who were paid within the past thirty days.
|
128
|
+
attr_accessor :vendors_paid_past_thirty_days
|
129
|
+
|
130
|
+
##
|
131
|
+
# @return [Double] The total amount paid over the past thirty days.
|
132
|
+
attr_accessor :amount_paid_past_thirty_days
|
133
|
+
|
134
|
+
##
|
135
|
+
# @return [Double] The amount in advance from the payments made over the past thirty days.
|
136
|
+
attr_accessor :advance_payment_amount_past_thirty_days
|
137
|
+
|
138
|
+
##
|
139
|
+
# @return [Int32] The number of bills paid over the past thirty days.
|
140
|
+
attr_accessor :bills_paid_past_thirty_days
|
141
|
+
|
142
|
+
##
|
143
|
+
# @return [Int32] The number of vendors that sent bills over the the past thirty days.
|
144
|
+
attr_accessor :billing_vendors_past_thirty_days
|
145
|
+
|
146
|
+
##
|
147
|
+
# @return [Double] The total amount billed over the past thirty days.
|
148
|
+
attr_accessor :amount_billed_past_thirty_days
|
149
|
+
|
150
|
+
##
|
151
|
+
# @return [Double] The amount outstanding on the bills received over the past thirty days.
|
152
|
+
attr_accessor :amount_due_past_thirty_days
|
153
|
+
|
154
|
+
##
|
155
|
+
# @return [Int32] The number of bills received over the past thirty days.
|
156
|
+
attr_accessor :bills_past_thirty_days
|
157
|
+
|
158
|
+
##
|
159
|
+
# @return [object] This object as a JSON key-value structure
|
160
|
+
def as_json(options={})
|
161
|
+
{
|
162
|
+
'groupKey' => @group_key,
|
163
|
+
'reportPeriod' => @report_period,
|
164
|
+
'totalVendors' => @total_vendors,
|
165
|
+
'totalBills' => @total_bills,
|
166
|
+
'totalBilledAmount' => @total_billed_amount,
|
167
|
+
'totalAdvancePayments' => @total_advance_payments,
|
168
|
+
'totalPaid' => @total_paid,
|
169
|
+
'totalApAmount' => @total_ap_amount,
|
170
|
+
'totalBillsPaid' => @total_bills_paid,
|
171
|
+
'totalBillsPastDue' => @total_bills_past_due,
|
172
|
+
'totalBills90DaysPastDue' => @total_bills90_days_past_due,
|
173
|
+
'totalPastDueAmount' => @total_past_due_amount,
|
174
|
+
'totalPastDueAmount90Days' => @total_past_due_amount90_days,
|
175
|
+
'percentageOfTotalAp' => @percentage_of_total_ap,
|
176
|
+
'totalBilledAmountCurrentYear' => @total_billed_amount_current_year,
|
177
|
+
'totalBilledAmountPreviousYear' => @total_billed_amount_previous_year,
|
178
|
+
'totalPaidAmountCurrentYear' => @total_paid_amount_current_year,
|
179
|
+
'percentageOfTotalAp90DaysPastDue' => @percentage_of_total_ap90_days_past_due,
|
180
|
+
'vendorsPaidPastThirtyDays' => @vendors_paid_past_thirty_days,
|
181
|
+
'amountPaidPastThirtyDays' => @amount_paid_past_thirty_days,
|
182
|
+
'advancePaymentAmountPastThirtyDays' => @advance_payment_amount_past_thirty_days,
|
183
|
+
'billsPaidPastThirtyDays' => @bills_paid_past_thirty_days,
|
184
|
+
'billingVendorsPastThirtyDays' => @billing_vendors_past_thirty_days,
|
185
|
+
'amountBilledPastThirtyDays' => @amount_billed_past_thirty_days,
|
186
|
+
'amountDuePastThirtyDays' => @amount_due_past_thirty_days,
|
187
|
+
'billsPastThirtyDays' => @bills_past_thirty_days,
|
188
|
+
}
|
189
|
+
end
|
190
|
+
|
191
|
+
##
|
192
|
+
# @return [String] This object converted to a JSON string
|
193
|
+
def to_json(*options)
|
194
|
+
"[#{as_json(*options).to_json(*options)}]"
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
@@ -27,6 +27,9 @@ module LockstepSdk
|
|
27
27
|
@report_bucket = params.dig(:report_bucket)
|
28
28
|
@total_customers = params.dig(:total_customers)
|
29
29
|
@total_invoices_outstanding = params.dig(:total_invoices_outstanding)
|
30
|
+
@total_invoice_outstanding_amount = params.dig(:total_invoice_outstanding_amount)
|
31
|
+
@total_credit_memo_outstanding_amount = params.dig(:total_credit_memo_outstanding_amount)
|
32
|
+
@total_unapplied_payment_amount = params.dig(:total_unapplied_payment_amount)
|
30
33
|
@total_outstanding_amount = params.dig(:total_outstanding_amount)
|
31
34
|
@total_ar_amount = params.dig(:total_ar_amount)
|
32
35
|
@percentage_of_total_ar = params.dig(:percentage_of_total_ar)
|
@@ -48,6 +51,18 @@ module LockstepSdk
|
|
48
51
|
# @return [Int32] The total number of invoices outstanding.
|
49
52
|
attr_accessor :total_invoices_outstanding
|
50
53
|
|
54
|
+
##
|
55
|
+
# @return [Double] The total amount outstanding on invoices.
|
56
|
+
attr_accessor :total_invoice_outstanding_amount
|
57
|
+
|
58
|
+
##
|
59
|
+
# @return [Double] The total amount outstanding on credit memos.
|
60
|
+
attr_accessor :total_credit_memo_outstanding_amount
|
61
|
+
|
62
|
+
##
|
63
|
+
# @return [Double] The total amount of unapplied payments.
|
64
|
+
attr_accessor :total_unapplied_payment_amount
|
65
|
+
|
51
66
|
##
|
52
67
|
# @return [Double] The total amount outstanding.
|
53
68
|
attr_accessor :total_outstanding_amount
|
@@ -68,6 +83,9 @@ module LockstepSdk
|
|
68
83
|
'reportBucket' => @report_bucket,
|
69
84
|
'totalCustomers' => @total_customers,
|
70
85
|
'totalInvoicesOutstanding' => @total_invoices_outstanding,
|
86
|
+
'totalInvoiceOutstandingAmount' => @total_invoice_outstanding_amount,
|
87
|
+
'totalCreditMemoOutstandingAmount' => @total_credit_memo_outstanding_amount,
|
88
|
+
'totalUnappliedPaymentAmount' => @total_unapplied_payment_amount,
|
71
89
|
'totalOutstandingAmount' => @total_outstanding_amount,
|
72
90
|
'totalArAmount' => @total_ar_amount,
|
73
91
|
'percentageOfTotalAr' => @percentage_of_total_ar,
|
@@ -41,9 +41,15 @@ module LockstepSdk
|
|
41
41
|
@total_invoice_amount_current_year = params.dig(:total_invoice_amount_current_year)
|
42
42
|
@total_invoice_amount_previous_year = params.dig(:total_invoice_amount_previous_year)
|
43
43
|
@total_payment_amount_current_year = params.dig(:total_payment_amount_current_year)
|
44
|
-
@total_collected_past_thirty_days = params.dig(:total_collected_past_thirty_days)
|
45
|
-
@total_invoices_paid_past_thirty_days = params.dig(:total_invoices_paid_past_thirty_days)
|
46
44
|
@percentage_of_total_ar90_days_past_due = params.dig(:percentage_of_total_ar90_days_past_due)
|
45
|
+
@customers_paid_past_thirty_days = params.dig(:customers_paid_past_thirty_days)
|
46
|
+
@amount_collected_past_thirty_days = params.dig(:amount_collected_past_thirty_days)
|
47
|
+
@unapplied_amount_past_thirty_days = params.dig(:unapplied_amount_past_thirty_days)
|
48
|
+
@invoices_paid_past_thirty_days = params.dig(:invoices_paid_past_thirty_days)
|
49
|
+
@customers_invoiced_past_thirty_days = params.dig(:customers_invoiced_past_thirty_days)
|
50
|
+
@amount_invoiced_past_thirty_days = params.dig(:amount_invoiced_past_thirty_days)
|
51
|
+
@amount_due_past_thirty_days = params.dig(:amount_due_past_thirty_days)
|
52
|
+
@invoices_past_thirty_days = params.dig(:invoices_past_thirty_days)
|
47
53
|
end
|
48
54
|
|
49
55
|
##
|
@@ -119,16 +125,40 @@ module LockstepSdk
|
|
119
125
|
attr_accessor :total_payment_amount_current_year
|
120
126
|
|
121
127
|
##
|
122
|
-
# @return [
|
123
|
-
attr_accessor :
|
128
|
+
# @return [Double] Portion of Total AR that is 90+ days Past due.
|
129
|
+
attr_accessor :percentage_of_total_ar90_days_past_due
|
124
130
|
|
125
131
|
##
|
126
|
-
# @return [Int32] The
|
127
|
-
attr_accessor :
|
132
|
+
# @return [Int32] The number of customers who paid within the past thirty days.
|
133
|
+
attr_accessor :customers_paid_past_thirty_days
|
128
134
|
|
129
135
|
##
|
130
|
-
# @return [Double]
|
131
|
-
attr_accessor :
|
136
|
+
# @return [Double] The total amount collected over the past thirty days.
|
137
|
+
attr_accessor :amount_collected_past_thirty_days
|
138
|
+
|
139
|
+
##
|
140
|
+
# @return [Double] The amount unapplied from the payments collected over the past thirty days.
|
141
|
+
attr_accessor :unapplied_amount_past_thirty_days
|
142
|
+
|
143
|
+
##
|
144
|
+
# @return [Int32] The number of invoices paid over the past thirty days.
|
145
|
+
attr_accessor :invoices_paid_past_thirty_days
|
146
|
+
|
147
|
+
##
|
148
|
+
# @return [Int32] The number of customers invoiced over the the past thirty days.
|
149
|
+
attr_accessor :customers_invoiced_past_thirty_days
|
150
|
+
|
151
|
+
##
|
152
|
+
# @return [Double] The total amount invoiced over the past thirty days.
|
153
|
+
attr_accessor :amount_invoiced_past_thirty_days
|
154
|
+
|
155
|
+
##
|
156
|
+
# @return [Double] The amount outstanding on the invoices invoiced over the past thirty days.
|
157
|
+
attr_accessor :amount_due_past_thirty_days
|
158
|
+
|
159
|
+
##
|
160
|
+
# @return [Int32] The number of invoices invoiced over the past thirty days.
|
161
|
+
attr_accessor :invoices_past_thirty_days
|
132
162
|
|
133
163
|
##
|
134
164
|
# @return [object] This object as a JSON key-value structure
|
@@ -152,9 +182,15 @@ module LockstepSdk
|
|
152
182
|
'totalInvoiceAmountCurrentYear' => @total_invoice_amount_current_year,
|
153
183
|
'totalInvoiceAmountPreviousYear' => @total_invoice_amount_previous_year,
|
154
184
|
'totalPaymentAmountCurrentYear' => @total_payment_amount_current_year,
|
155
|
-
'totalCollectedPastThirtyDays' => @total_collected_past_thirty_days,
|
156
|
-
'totalInvoicesPaidPastThirtyDays' => @total_invoices_paid_past_thirty_days,
|
157
185
|
'percentageOfTotalAr90DaysPastDue' => @percentage_of_total_ar90_days_past_due,
|
186
|
+
'customersPaidPastThirtyDays' => @customers_paid_past_thirty_days,
|
187
|
+
'amountCollectedPastThirtyDays' => @amount_collected_past_thirty_days,
|
188
|
+
'unappliedAmountPastThirtyDays' => @unapplied_amount_past_thirty_days,
|
189
|
+
'invoicesPaidPastThirtyDays' => @invoices_paid_past_thirty_days,
|
190
|
+
'customersInvoicedPastThirtyDays' => @customers_invoiced_past_thirty_days,
|
191
|
+
'amountInvoicedPastThirtyDays' => @amount_invoiced_past_thirty_days,
|
192
|
+
'amountDuePastThirtyDays' => @amount_due_past_thirty_days,
|
193
|
+
'invoicesPastThirtyDays' => @invoices_past_thirty_days,
|
158
194
|
}
|
159
195
|
end
|
160
196
|
|
@@ -17,11 +17,11 @@ require 'json'
|
|
17
17
|
module LockstepSdk
|
18
18
|
|
19
19
|
##
|
20
|
-
# Contains
|
21
|
-
class
|
20
|
+
# Contains company details data
|
21
|
+
class CompanyDetailsModel
|
22
22
|
|
23
23
|
##
|
24
|
-
# Initialize the
|
24
|
+
# Initialize the CompanyDetailsModel using the provided prototype
|
25
25
|
def initialize(params = {})
|
26
26
|
@group_key = params.dig(:group_key)
|
27
27
|
@customer_id = params.dig(:customer_id)
|
@@ -50,79 +50,79 @@ module LockstepSdk
|
|
50
50
|
attr_accessor :group_key
|
51
51
|
|
52
52
|
##
|
53
|
-
# @return [Uuid] The unique ID of this
|
53
|
+
# @return [Uuid] The unique ID of this company
|
54
54
|
attr_accessor :customer_id
|
55
55
|
|
56
56
|
##
|
57
|
-
# @return [String] The unique ID of this
|
57
|
+
# @return [String] The unique ID of this company
|
58
58
|
attr_accessor :name
|
59
59
|
|
60
60
|
##
|
61
|
-
# @return [String]
|
61
|
+
# @return [String] Company address info
|
62
62
|
attr_accessor :address1
|
63
63
|
|
64
64
|
##
|
65
|
-
# @return [String]
|
65
|
+
# @return [String] Company address info
|
66
66
|
attr_accessor :address2
|
67
67
|
|
68
68
|
##
|
69
|
-
# @return [String]
|
69
|
+
# @return [String] Company address info
|
70
70
|
attr_accessor :address3
|
71
71
|
|
72
72
|
##
|
73
|
-
# @return [String]
|
73
|
+
# @return [String] Company address info
|
74
74
|
attr_accessor :city
|
75
75
|
|
76
76
|
##
|
77
|
-
# @return [String]
|
77
|
+
# @return [String] Company address info
|
78
78
|
attr_accessor :state
|
79
79
|
|
80
80
|
##
|
81
|
-
# @return [String]
|
81
|
+
# @return [String] Company address info
|
82
82
|
attr_accessor :postal_code
|
83
83
|
|
84
84
|
##
|
85
|
-
# @return [String]
|
85
|
+
# @return [String] Company address country
|
86
86
|
attr_accessor :country
|
87
87
|
|
88
88
|
##
|
89
|
-
# @return [String]
|
89
|
+
# @return [String] Company phone number
|
90
90
|
attr_accessor :phone_number
|
91
91
|
|
92
92
|
##
|
93
|
-
# @return [String]
|
93
|
+
# @return [String] Company fax number
|
94
94
|
attr_accessor :fax_number
|
95
95
|
|
96
96
|
##
|
97
|
-
# @return [String]
|
97
|
+
# @return [String] Company email address
|
98
98
|
attr_accessor :email
|
99
99
|
|
100
100
|
##
|
101
|
-
# @return [Uuid]
|
101
|
+
# @return [Uuid] Company primary contact id
|
102
102
|
attr_accessor :contact_id
|
103
103
|
|
104
104
|
##
|
105
|
-
# @return [String]
|
105
|
+
# @return [String] Company primary contact name
|
106
106
|
attr_accessor :contact_name
|
107
107
|
|
108
108
|
##
|
109
|
-
# @return [String]
|
109
|
+
# @return [String] Company primary contact email address
|
110
110
|
attr_accessor :contact_email
|
111
111
|
|
112
112
|
##
|
113
|
-
# @return [Int32]
|
113
|
+
# @return [Int32] Company number of outstanding invoices
|
114
114
|
attr_accessor :outstanding_invoices
|
115
115
|
|
116
116
|
##
|
117
|
-
# @return [Double]
|
117
|
+
# @return [Double] Company total outstanding invoice amount
|
118
118
|
attr_accessor :outstanding_amount
|
119
119
|
|
120
120
|
##
|
121
|
-
# @return [Double]
|
121
|
+
# @return [Double] Company total past due amount
|
122
122
|
attr_accessor :amount_past_due
|
123
123
|
|
124
124
|
##
|
125
|
-
# @return [
|
125
|
+
# @return [CompanyDetailsPaymentModel] Company payments collected
|
126
126
|
attr_accessor :payments
|
127
127
|
|
128
128
|
##
|
data/lib/lockstep_sdk/models/{customer_details_payment_model.rb → company_details_payment_model.rb}
RENAMED
@@ -17,11 +17,11 @@ require 'json'
|
|
17
17
|
module LockstepSdk
|
18
18
|
|
19
19
|
##
|
20
|
-
#
|
21
|
-
class
|
20
|
+
# Company payment collected information
|
21
|
+
class CompanyDetailsPaymentModel
|
22
22
|
|
23
23
|
##
|
24
|
-
# Initialize the
|
24
|
+
# Initialize the CompanyDetailsPaymentModel using the provided prototype
|
25
25
|
def initialize(params = {})
|
26
26
|
@group_key = params.dig(:group_key)
|
27
27
|
@payment_id = params.dig(:payment_id)
|
@@ -58,6 +58,7 @@ module LockstepSdk
|
|
58
58
|
@duns_number = params.dig(:duns_number)
|
59
59
|
@ap_email_address = params.dig(:ap_email_address)
|
60
60
|
@ar_email_address = params.dig(:ar_email_address)
|
61
|
+
@preferred_delivery_method = params.dig(:preferred_delivery_method)
|
61
62
|
@domain_name = params.dig(:domain_name)
|
62
63
|
@company_classification_code_def_id = params.dig(:company_classification_code_def_id)
|
63
64
|
@description = params.dig(:description)
|
@@ -196,6 +197,10 @@ module LockstepSdk
|
|
196
197
|
# @return [Email] AR (Accounts Receivable) Email Address
|
197
198
|
attr_accessor :ar_email_address
|
198
199
|
|
200
|
+
##
|
201
|
+
# @return [String] Indicates the preferred invoice delivery method. Examples include Print, Email, Fax
|
202
|
+
attr_accessor :preferred_delivery_method
|
203
|
+
|
199
204
|
##
|
200
205
|
# @return [String] For companies that use a custom domain name for their email system, this is the domain name used by this company. If this value is known, new emails that come in from this domain will be connected to this company.
|
201
206
|
attr_accessor :domain_name
|
@@ -279,6 +284,7 @@ module LockstepSdk
|
|
279
284
|
'dunsNumber' => @duns_number,
|
280
285
|
'apEmailAddress' => @ap_email_address,
|
281
286
|
'arEmailAddress' => @ar_email_address,
|
287
|
+
'preferredDeliveryMethod' => @preferred_delivery_method,
|
282
288
|
'domainName' => @domain_name,
|
283
289
|
'companyClassificationCodeDefId' => @company_classification_code_def_id,
|
284
290
|
'description' => @description,
|
@@ -55,6 +55,8 @@ module LockstepSdk
|
|
55
55
|
@duns_number = params.dig(:duns_number)
|
56
56
|
@ap_email_address = params.dig(:ap_email_address)
|
57
57
|
@ar_email_address = params.dig(:ar_email_address)
|
58
|
+
@preferred_delivery_method = params.dig(:preferred_delivery_method)
|
59
|
+
@external_reference = params.dig(:external_reference)
|
58
60
|
end
|
59
61
|
|
60
62
|
##
|
@@ -118,7 +120,7 @@ module LockstepSdk
|
|
118
120
|
attr_accessor :postal_code
|
119
121
|
|
120
122
|
##
|
121
|
-
# @return [String] The company's primary mailing address information
|
123
|
+
# @return [String] The company's primary mailing address information
|
122
124
|
attr_accessor :country
|
123
125
|
|
124
126
|
##
|
@@ -153,6 +155,14 @@ module LockstepSdk
|
|
153
155
|
# @return [String] If you know the AR (accounts receivable) email address of this company, fill it in here. This is the email address where you would send questions to the company if you owed this company money.
|
154
156
|
attr_accessor :ar_email_address
|
155
157
|
|
158
|
+
##
|
159
|
+
# @return [String] Indicates the preferred invoice delivery method. Examples include Print, Email, Fax
|
160
|
+
attr_accessor :preferred_delivery_method
|
161
|
+
|
162
|
+
##
|
163
|
+
# @return [String] An external reference that identifies the Company from the originating ERP system, separate from the ErpKey.
|
164
|
+
attr_accessor :external_reference
|
165
|
+
|
156
166
|
##
|
157
167
|
# @return [object] This object as a JSON key-value structure
|
158
168
|
def as_json(options={})
|
@@ -181,6 +191,8 @@ module LockstepSdk
|
|
181
191
|
'dunsNumber' => @duns_number,
|
182
192
|
'apEmailAddress' => @ap_email_address,
|
183
193
|
'arEmailAddress' => @ar_email_address,
|
194
|
+
'preferredDeliveryMethod' => @preferred_delivery_method,
|
195
|
+
'externalReference' => @external_reference,
|
184
196
|
}
|
185
197
|
end
|
186
198
|
|
@@ -25,7 +25,10 @@ module LockstepSdk
|
|
25
25
|
# Initialize the ConnectorInfoModel using the provided prototype
|
26
26
|
def initialize(params = {})
|
27
27
|
@auth_code = params.dig(:auth_code)
|
28
|
+
@token_id = params.dig(:token_id)
|
29
|
+
@token_secret = params.dig(:token_secret)
|
28
30
|
@realm_id = params.dig(:realm_id)
|
31
|
+
@subsidiary_id = params.dig(:subsidiary_id)
|
29
32
|
@redirect_uri = params.dig(:redirect_uri)
|
30
33
|
@email = params.dig(:email)
|
31
34
|
@username = params.dig(:username)
|
@@ -38,10 +41,22 @@ module LockstepSdk
|
|
38
41
|
# @return [String] The authorization code returned from the first step of the OAuth2 flow https://oauth.net/2/grant-types/authorization-code/
|
39
42
|
attr_accessor :auth_code
|
40
43
|
|
44
|
+
##
|
45
|
+
# @return [String] The access token id for the connector enrollment.
|
46
|
+
attr_accessor :token_id
|
47
|
+
|
48
|
+
##
|
49
|
+
# @return [String] The access token secret for the connector enrollment.
|
50
|
+
attr_accessor :token_secret
|
51
|
+
|
41
52
|
##
|
42
53
|
# @return [String] The realm id of the account being granted permissions to access
|
43
54
|
attr_accessor :realm_id
|
44
55
|
|
56
|
+
##
|
57
|
+
# @return [String] The subsidiary id that corresponds to a legal entity.
|
58
|
+
attr_accessor :subsidiary_id
|
59
|
+
|
45
60
|
##
|
46
61
|
# @return [String] The redirect uri used for step one of the OAuth2.0 flow.
|
47
62
|
attr_accessor :redirect_uri
|
@@ -71,7 +86,10 @@ module LockstepSdk
|
|
71
86
|
def as_json(options={})
|
72
87
|
{
|
73
88
|
'authCode' => @auth_code,
|
89
|
+
'tokenId' => @token_id,
|
90
|
+
'tokenSecret' => @token_secret,
|
74
91
|
'realmId' => @realm_id,
|
92
|
+
'subsidiaryId' => @subsidiary_id,
|
75
93
|
'redirectUri' => @redirect_uri,
|
76
94
|
'email' => @email,
|
77
95
|
'username' => @username,
|