lockstep_sdk 2022.15.31.1 → 2022.35.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lockstep_sdk/clients/app_enrollments_client.rb +13 -1
- data/lib/lockstep_sdk/clients/companies_client.rb +45 -7
- data/lib/lockstep_sdk/clients/credit_memo_applied_client.rb +1 -1
- 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/profiles_client.rb +52 -0
- data/lib/lockstep_sdk/clients/provisioning_client.rb +0 -18
- data/lib/lockstep_sdk/clients/reports_client.rb +135 -9
- data/lib/lockstep_sdk/clients/status_client.rb +0 -14
- 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 +16 -4
- data/lib/lockstep_sdk/lockstep_api.rb +19 -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/{trial_balance_report_cell_model.rb → app_enrollment_reconnect_request.rb} +9 -11
- 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/batch_sync_model.rb +18 -0
- 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 +18 -0
- data/lib/lockstep_sdk/models/company_sync_model.rb +26 -2
- 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/credit_memo_applied_model.rb +12 -0
- data/lib/lockstep_sdk/models/custom_field_sync_model.rb +6 -6
- data/lib/lockstep_sdk/models/customer_summary_model.rb +42 -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/financial_account_balance_history_sync_model.rb +100 -0
- data/lib/lockstep_sdk/models/financial_account_sync_model.rb +103 -0
- data/lib/lockstep_sdk/models/financial_year_setting_sync_model.rb +75 -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 +11 -5
- 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 +3 -3
- data/lib/lockstep_sdk/models/public_company_profile_model.rb +77 -0
- 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/sync_request_model.rb +6 -0
- data/lib/lockstep_sdk/models/sync_submit_model.rb +6 -0
- data/lib/lockstep_sdk/models/user_group_model.rb +66 -0
- data/lib/lockstep_sdk/models/vendor_summary_model.rb +149 -0
- data/lib/lockstep_sdk/models/webhook_history_table_storage_model.rb +18 -0
- data/lib/lockstep_sdk/models/webhook_model.rb +9 -4
- data/lib/lockstep_sdk/models/webhook_rule_model.rb +104 -0
- data/lib/lockstep_sdk/version.rb +1 -1
- metadata +27 -8
- data/lib/lockstep_sdk/models/erp_info_data_model.rb +0 -62
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 158f24f63ab345bbe1d63c0f33494b605deb19cc1b1b697fea51b035451a43e8
|
4
|
+
data.tar.gz: 380f399812617bef853f621eddcf2662300bd09a289d3bce33979efcc9ebe86e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a021c80ca8c9d918b613ac077488548228a4595d2366abbefb290532d5872c243abf8487e12b7ac995ef0542396c2e30d781eea322e83ca6da23662094884b5
|
7
|
+
data.tar.gz: 38db337ad9ca648f87a219a5716915862c94afcc3706c2d33228fb3c917f8099395b48a45db0f8dd308d36e41ff5efd97454d746ff0343899ed371cceaa31dc4
|
@@ -75,9 +75,21 @@ class AppEnrollmentsClient
|
|
75
75
|
#
|
76
76
|
# See [Applications and Enrollments](https://developer.lockstep.io/docs/applications-and-enrollments) for more information.
|
77
77
|
#
|
78
|
+
# @param start_sync [boolean] Option to start sync immediately after creation of app enrollments (default false)
|
78
79
|
# @param body [AppEnrollmentModel] The App Enrollments to create
|
79
|
-
def create_app_enrollments(body:)
|
80
|
+
def create_app_enrollments(start_sync:, body:)
|
80
81
|
path = "/api/v1/AppEnrollments"
|
82
|
+
params = {:startSync => start_sync}
|
83
|
+
@connection.request(:post, path, body, params)
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Updates the OAuth settings associated with this App Enrollment
|
88
|
+
#
|
89
|
+
# @param id [uuid] The unique ID number of the App Enrollment to reconnect
|
90
|
+
# @param body [AppEnrollmentReconnectRequest] Information to reconnect the App Enrollment
|
91
|
+
def reconnect_app_enrollment_oauth(id:, body:)
|
92
|
+
path = "/api/v1/AppEnrollments/#{id}/reconnect"
|
81
93
|
@connection.request(:post, path, body, nil)
|
82
94
|
end
|
83
95
|
|
@@ -115,22 +115,60 @@ class CompaniesClient
|
|
115
115
|
# @param order [string] The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight).
|
116
116
|
# @param page_size [int32] The page size for results (default 200, maximum of 10,000)
|
117
117
|
# @param page_number [int32] The page number for results (default 0)
|
118
|
-
|
118
|
+
# @param report_date [date-time] The date to calculate the fields on. If no date is entered the current UTC date will be used.
|
119
|
+
def query_customer_summary(filter:, include_param:, order:, page_size:, page_number:, report_date:)
|
119
120
|
path = "/api/v1/Companies/views/customer-summary"
|
120
|
-
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
121
|
+
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number, :reportDate => report_date}
|
121
122
|
@connection.request(:get, path, nil, params)
|
122
123
|
end
|
123
124
|
|
124
125
|
##
|
125
|
-
#
|
126
|
+
# Queries Vendor Summaries for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
|
127
|
+
#
|
128
|
+
# More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.
|
126
129
|
#
|
127
|
-
# The
|
130
|
+
# The Vendor Summary View represents a slightly different view of the data and includes some extra fields that might be useful. For more information, see the data format of the Vendor Summary Model.
|
128
131
|
#
|
129
132
|
# See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information.
|
130
133
|
#
|
131
|
-
# @param
|
132
|
-
|
133
|
-
|
134
|
+
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
135
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. No collections are currently available but may be offered in the future
|
136
|
+
# @param order [string] The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight).
|
137
|
+
# @param page_size [int32] The page size for results (default 200, maximum of 10,000)
|
138
|
+
# @param page_number [int32] The page number for results (default 0)
|
139
|
+
# @param report_date [date-time] The date to calculate the fields on. If no date is entered the current UTC date will be used.
|
140
|
+
def query_vendor_summary(filter:, include_param:, order:, page_size:, page_number:, report_date:)
|
141
|
+
path = "/api/v1/Companies/views/vendor-summary"
|
142
|
+
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number, :reportDate => report_date}
|
143
|
+
@connection.request(:get, path, nil, params)
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# Retrieves the Company Details specified by this unique identifier, optionally including nested data sets.
|
148
|
+
#
|
149
|
+
# The Company Detail View represents a slightly different view of the data and includes some extra fields that might be useful. For more information, see the data format of the Company Detail Model.
|
150
|
+
#
|
151
|
+
# See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information.
|
152
|
+
#
|
153
|
+
# @param id [uuid] The unique Lockstep Platform ID number of this Company; NOT the company's ERP key
|
154
|
+
def retrieve_company_detail(id:)
|
155
|
+
path = "/api/v1/Companies/views/details/#{id}"
|
134
156
|
@connection.request(:get, path, nil, nil)
|
135
157
|
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# Sets the logo for specified company. The logo will be stored in the Lockstep Platform and will be **publicly accessible**.
|
161
|
+
#
|
162
|
+
# .jpg, .jpeg, and .png are supported. 5MB maximum. If no logo is uploaded, the existing logo will be deleted.
|
163
|
+
#
|
164
|
+
# A Company represents a customer, a vendor, or a company within the organization of the account holder. Companies can have parents and children, representing an organizational hierarchy of corporate entities. You can use Companies to track projects and financial data under this Company label.
|
165
|
+
#
|
166
|
+
# See [Vendors, Customers, and Companies](https://developer.lockstep.io/docs/companies-customers-and-vendors) for more information.
|
167
|
+
#
|
168
|
+
# @param id [uuid] The unique Lockstep Platform ID number of this Company; NOT the customer's ERP key
|
169
|
+
# @param filename [File] The full path of a file to upload to the API
|
170
|
+
def set_company_logo(id:, filename:)
|
171
|
+
path = "/api/v1/Companies/#{id}/logo"
|
172
|
+
@connection.request(:post, path, nil, nil)
|
173
|
+
end
|
136
174
|
end
|
@@ -30,7 +30,7 @@ class CreditMemoAppliedClient
|
|
30
30
|
# Credit Memos reflect credits granted to a customer for various reasons, such as discounts or refunds. Credit Memos may be applied to Invoices as Payments. When a Credit Memo is applied as payment to an Invoice, Lockstep creates a Credit Memo Application record to track the amount from the Credit Memo that was applied as payment to the Invoice. You can examine Credit Memo Application records to track which Invoices were paid using this Credit.
|
31
31
|
#
|
32
32
|
# @param id [uuid] The unique Lockstep Platform ID number of this Credit Memo Application; NOT the customer's ERP key
|
33
|
-
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Attachments, CustomFields, Notes
|
33
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Attachments, CustomFields, Notes, Invoice, CreditMemoInvoice
|
34
34
|
def retrieve_credit_memo_application(id:, include_param:)
|
35
35
|
path = "/api/v1/CreditMemoApplied/#{id}"
|
36
36
|
params = {:include => include_param}
|
@@ -56,7 +56,7 @@ class FinancialAccountClient
|
|
56
56
|
# Deletes the Financial Account referred to by this unique identifier.
|
57
57
|
#
|
58
58
|
# @param id [uuid] The unique Lockstep Platform ID number of the Financial Account to disable; NOT the customer's ERP key
|
59
|
-
def
|
59
|
+
def delete_financial_account(id:)
|
60
60
|
path = "/api/v1/FinancialAccount/#{id}"
|
61
61
|
@connection.request(:delete, path, nil, nil)
|
62
62
|
end
|
@@ -0,0 +1,46 @@
|
|
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 'awrence'
|
16
|
+
|
17
|
+
class GroupAccountsClient
|
18
|
+
|
19
|
+
##
|
20
|
+
# Initialize the GroupAccountsClient class with an API client instance.
|
21
|
+
# @param connection [LockstepApi] The API client object for this connection
|
22
|
+
def initialize(connection)
|
23
|
+
@connection = connection
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
##
|
28
|
+
# Retrieves group account data for the current user.
|
29
|
+
#
|
30
|
+
def retrieve_group_account_data()
|
31
|
+
path = "/api/v1/GroupAccounts/me"
|
32
|
+
@connection.request(:get, path, nil, nil)
|
33
|
+
end
|
34
|
+
|
35
|
+
##
|
36
|
+
# Updates a group account that matches the specified id with the requested information.
|
37
|
+
#
|
38
|
+
# The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired.
|
39
|
+
#
|
40
|
+
# @param id [uuid] The unique ID number of the Group Account to retrieve
|
41
|
+
# @param body [object] A list of changes to apply to this Group Account
|
42
|
+
def update_group_account(id:, body:)
|
43
|
+
path = "/api/v1/GroupAccounts/#{id}"
|
44
|
+
@connection.request(:patch, path, body.to_camelback_keys.to_json, nil)
|
45
|
+
end
|
46
|
+
end
|
@@ -30,7 +30,7 @@ class PaymentApplicationsClient
|
|
30
30
|
# A Payment Application is created by a business who receives a Payment from a customer. A customer may make a single Payment to match an Invoice exactly, a partial Payment for an Invoice, or a single Payment may be made for multiple smaller Invoices. The Payment Application contains information about which Invoices are connected to which Payments and for which amounts.
|
31
31
|
#
|
32
32
|
# @param id [uuid] The unique Lockstep Platform ID number of this Payment Application; NOT the customer's ERP key
|
33
|
-
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Invoice
|
33
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Invoice, Payment
|
34
34
|
def retrieve_payment_application(id:, include_param:)
|
35
35
|
path = "/api/v1/PaymentApplications/#{id}"
|
36
36
|
params = {:include => include_param}
|
@@ -0,0 +1,52 @@
|
|
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 'awrence'
|
16
|
+
|
17
|
+
class ProfilesClient
|
18
|
+
|
19
|
+
##
|
20
|
+
# Initialize the ProfilesClient class with an API client instance.
|
21
|
+
# @param connection [LockstepApi] The API client object for this connection
|
22
|
+
def initialize(connection)
|
23
|
+
@connection = connection
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
##
|
28
|
+
# Retrieves the Public Company Profile specified by the public url slug.
|
29
|
+
#
|
30
|
+
# A Public Company Profile makes available the following information: <list type="bullet"><item>Company Name</item><item>Company Logo Url</item><item>Description</item><item>Website</item></list>
|
31
|
+
#
|
32
|
+
# @param url_slug [string]
|
33
|
+
def retrieve_public_company_profile(url_slug:)
|
34
|
+
path = "/api/v1/Profiles/companies/#{urlSlug}"
|
35
|
+
@connection.request(:get, path, nil, nil)
|
36
|
+
end
|
37
|
+
|
38
|
+
##
|
39
|
+
# Queries Public Company Profiles <p> More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website. </p><p> A Public Company Profile makes available the following information:
|
40
|
+
#
|
41
|
+
# <list type="bullet"><item>`Company Name` </item><item>`Company Logo Url` </item><item>`Description` </item><item>`Website` </item></list></p>
|
42
|
+
#
|
43
|
+
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
44
|
+
# @param order [string] The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight).
|
45
|
+
# @param page_size [int32] The page size for results (default 200, maximum of 10,000)
|
46
|
+
# @param page_number [int32] The page number for results (default 0)
|
47
|
+
def query_public_company_profiles(filter:, order:, page_size:, page_number:)
|
48
|
+
path = "/api/v1/Profiles/companies/query"
|
49
|
+
params = {:filter => filter, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
50
|
+
@connection.request(:get, path, nil, params)
|
51
|
+
end
|
52
|
+
end
|
@@ -24,24 +24,6 @@ class ProvisioningClient
|
|
24
24
|
end
|
25
25
|
|
26
26
|
|
27
|
-
##
|
28
|
-
# Creates a new User or updates an Invited user based on metadata provided by the User during the onboarding process
|
29
|
-
#
|
30
|
-
# @param body [ProvisioningModel] Represents a User and their related metadata
|
31
|
-
def provision_user_account(body:)
|
32
|
-
path = "/api/v1/Provisioning"
|
33
|
-
@connection.request(:post, path, body, nil)
|
34
|
-
end
|
35
|
-
|
36
|
-
##
|
37
|
-
# Updates user, company and group metadata for a User of status 'Onboarding' and finalizes a user's onboarding process by changing the user status to 'Active'
|
38
|
-
#
|
39
|
-
# @param body [ProvisioningFinalizeRequestModel] Represents a User and their related metadata
|
40
|
-
def finalize_user_account_provisioning(body:)
|
41
|
-
path = "/api/v1/Provisioning/finalize"
|
42
|
-
@connection.request(:post, path, body, nil)
|
43
|
-
end
|
44
|
-
|
45
27
|
##
|
46
28
|
# Creates a new account for a developer, sending an email with information on how to access the API.
|
47
29
|
# @param body [DeveloperAccountSubmitModel]
|
@@ -36,16 +36,72 @@ class ReportsClient
|
|
36
36
|
@connection.request(:get, path, nil, params)
|
37
37
|
end
|
38
38
|
|
39
|
+
##
|
40
|
+
# Retrieves a current Payables Summary report for this account.
|
41
|
+
#
|
42
|
+
# The Payables Summary report indicates the amount of payments sent and bills received within a given timeframe. You can use this report to determine the overall balance of money coming into and out of your accounts receivable and accounts payable businesses.
|
43
|
+
#
|
44
|
+
# @param timeframe [int32] Number of days of data to include for the Payables Summary Report (default is 30 days from today)
|
45
|
+
def payables_summary_report(timeframe:)
|
46
|
+
path = "/api/v1/Reports/payables-summary"
|
47
|
+
params = {:timeframe => timeframe}
|
48
|
+
@connection.request(:get, path, nil, params)
|
49
|
+
end
|
50
|
+
|
39
51
|
##
|
40
52
|
# Retrieves a current Daily Sales Outstanding (DSO) report for this account.
|
41
53
|
#
|
42
54
|
# Daily Sales Outstanding, or DSO, is a metric that indicates the average number of days that it takes for an invoice to be fully paid. You can use this report to identify whether a company is improving on its ability to collect on invoices.
|
43
55
|
#
|
44
|
-
|
56
|
+
# @param report_date [date-time] Optional: Specify the specific report date to generate the from (default UTC now)
|
57
|
+
def daily_sales_outstanding(report_date:)
|
45
58
|
path = "/api/v1/Reports/dailysalesoutstanding"
|
59
|
+
params = {:reportDate => report_date}
|
60
|
+
@connection.request(:get, path, nil, params)
|
61
|
+
end
|
62
|
+
|
63
|
+
##
|
64
|
+
# Retrieves a current Days Payable Outstanding (DPO) report for this account.
|
65
|
+
#
|
66
|
+
# Days payable outstanding (DPO) is a financial ratio that indicates the average time (in days) that a company takes to pay its bills to its trade creditors, which may include suppliers, vendors, or financiers.
|
67
|
+
#
|
68
|
+
def days_payable_outstanding()
|
69
|
+
path = "/api/v1/Reports/daily-payable-outstanding"
|
46
70
|
@connection.request(:get, path, nil, nil)
|
47
71
|
end
|
48
72
|
|
73
|
+
##
|
74
|
+
# Retrieves payable amount due for 4 time buckets (Today, 7 Days from Today, 14 Days from Today, and 30 Days from Today).
|
75
|
+
#
|
76
|
+
def payables_coming_due()
|
77
|
+
path = "/api/v1/Reports/payables-coming-due"
|
78
|
+
@connection.request(:get, path, nil, nil)
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# Payables coming due represents the amount of cash required to pay vendor bills based on the due dates of the bills. Each bucket represents total amount due within the time period based on open Payables as of today.
|
83
|
+
#
|
84
|
+
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
85
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. No collections are currently available but may be offered in the future
|
86
|
+
# @param order [string] The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight).
|
87
|
+
# @param page_size [int32] The page size for results (default 200, maximum of 10,000)
|
88
|
+
# @param page_number [int32] The page number for results (default 0)
|
89
|
+
def payables_coming_due_summary(filter:, include_param:, order:, page_size:, page_number:)
|
90
|
+
path = "/api/v1/Reports/payables-coming-due-summary"
|
91
|
+
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
92
|
+
@connection.request(:get, path, nil, params)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Retrieves total number of vendors, bills, the total amount outstanding, for a group.
|
97
|
+
#
|
98
|
+
# @param report_date [date-time] The date the outstanding values are calculated on. Should be either the current day, 7 days after the current day, 14 days after the current day, or 30 days after the current day.
|
99
|
+
def payables_coming_due_header(report_date:)
|
100
|
+
path = "/api/v1/Reports/payables-coming-due-header"
|
101
|
+
params = {:reportDate => report_date}
|
102
|
+
@connection.request(:get, path, nil, params)
|
103
|
+
end
|
104
|
+
|
49
105
|
##
|
50
106
|
# Retrieves a current Risk Rate report for this account.
|
51
107
|
#
|
@@ -67,6 +123,17 @@ class ReportsClient
|
|
67
123
|
@connection.request(:get, path, nil, params)
|
68
124
|
end
|
69
125
|
|
126
|
+
##
|
127
|
+
# Retrieves AP header information up to the date specified.
|
128
|
+
#
|
129
|
+
# @param report_date [date] The date of the report.
|
130
|
+
# @param company_id [uuid] Include a company to get AP data for a specific company, leave as null to include all Companies.
|
131
|
+
def accounts_payable_header(report_date:, company_id:)
|
132
|
+
path = "/api/v1/Reports/ap-header"
|
133
|
+
params = {:reportDate => report_date, :companyId => company_id}
|
134
|
+
@connection.request(:get, path, nil, params)
|
135
|
+
end
|
136
|
+
|
70
137
|
##
|
71
138
|
# The Aging Report contains information about the total dollar value of invoices broken down by their age. Last default or specified bucket treated as a catch all bucket for values that fit in that bucket or beyond.
|
72
139
|
#
|
@@ -81,9 +148,10 @@ class ReportsClient
|
|
81
148
|
# @param currency_code [string] Currency aging buckets are converted to (all aging data returned without currency conversion if no currency is specified)
|
82
149
|
# @param currency_provider [string] Currency provider currency rates should be returned from to convert aging amounts to (default Lockstep currency provider used if no data provider specified)
|
83
150
|
# @param buckets [int32] Customized buckets used for aging calculations (default buckets [0,30,60,90,120,180] will be used if buckets not specified)
|
84
|
-
|
151
|
+
# @param ap_report [boolean] A boolean to turn on AP Aging reports
|
152
|
+
def invoice_aging_report(company_id:, recalculate:, currency_code:, currency_provider:, buckets:, ap_report:)
|
85
153
|
path = "/api/v1/Reports/aging"
|
86
|
-
params = {:CompanyId => company_id, :Recalculate => recalculate, :CurrencyCode => currency_code, :CurrencyProvider => currency_provider, :Buckets => buckets}
|
154
|
+
params = {:CompanyId => company_id, :Recalculate => recalculate, :CurrencyCode => currency_code, :CurrencyProvider => currency_provider, :Buckets => buckets, :ApReport => ap_report}
|
87
155
|
@connection.request(:get, path, nil, params)
|
88
156
|
end
|
89
157
|
|
@@ -97,6 +165,16 @@ class ReportsClient
|
|
97
165
|
@connection.request(:get, path, nil, nil)
|
98
166
|
end
|
99
167
|
|
168
|
+
##
|
169
|
+
# Retrieves AP Aging Header information report broken down by aging bucket.
|
170
|
+
#
|
171
|
+
# The AP Aging Header report contains aggregated information about the `TotalBillsPastDue`, `TotalVendors`, and their respective `PercentageOfTotalAp` grouped by their aging `ReportBucket`.
|
172
|
+
#
|
173
|
+
def accounts_payable_aging_header()
|
174
|
+
path = "/api/v1/Reports/ap-aging-header"
|
175
|
+
@connection.request(:get, path, nil, nil)
|
176
|
+
end
|
177
|
+
|
100
178
|
##
|
101
179
|
# Retrieves Attachment Header information for the requested companyId.
|
102
180
|
#
|
@@ -114,9 +192,10 @@ class ReportsClient
|
|
114
192
|
#
|
115
193
|
# @param start_date [date-time] The start date of the report
|
116
194
|
# @param end_date [date-time] The end date of the report
|
117
|
-
|
195
|
+
# @param app_enrollment_id [uuid] The app enrollment id of the app enrollment whose data will be used.
|
196
|
+
def trial_balance_report(start_date:, end_date:, app_enrollment_id:)
|
118
197
|
path = "/api/v1/Reports/trial-balance"
|
119
|
-
params = {:startDate => start_date, :endDate => end_date}
|
198
|
+
params = {:startDate => start_date, :endDate => end_date, :appEnrollmentId => app_enrollment_id}
|
120
199
|
@connection.request(:get, path, nil, params)
|
121
200
|
end
|
122
201
|
|
@@ -125,14 +204,15 @@ class ReportsClient
|
|
125
204
|
#
|
126
205
|
# @param start_date [date-time] The start date of the report
|
127
206
|
# @param end_date [date-time] The end date of the report
|
207
|
+
# @param app_enrollment_id [uuid] The app enrollment id of the app enrollment whose data will be used.
|
128
208
|
# @param column_option [string] The desired column splitting of the report data. An empty string or anything unrecognized will result in only totals being displayed. Options are as follows: By Period - a column for every month/fiscal period within the reporting dates Quarterly - a column for every quarter within the reporting dates Annually - a column for every year within the reporting dates
|
129
209
|
# @param display_depth [ReportDepth] The desired row splitting of the report data. For Income Statements, the minimum report depth is 1. Options are as follows: 1 - combine all accounts by their category 2 - combine all accounts by their subcategory 3 - display all accounts
|
130
210
|
# @param comparison_period [string] Add a column for historical data with the following options and use showCurrencyDifference and/or show percentageDifference to display a comparison of that historical data to the report period. Options are as follows (note for YTD the data will be compared as a percentage of YTD and showCurrencyDifference and showPercentageDifference should not be used): "PP" - previous period (will show the previous quarter or year if Quarterly or Annually is chosen for columnOption) "PY" - previous year (the same date range as the report, but for the year prior) "YTD" - year to date (the current financial year to the current period)
|
131
211
|
# @param show_currency_difference [boolean] A boolean to turn on a currency based difference between the reporting period and the comparison period.
|
132
212
|
# @param show_percentage_difference [boolean] A boolean to turn on a percent based difference between the reporting period and the comparison period.
|
133
|
-
def income_statement_report(start_date:, end_date:, column_option:, display_depth:, comparison_period:, show_currency_difference:, show_percentage_difference:)
|
213
|
+
def income_statement_report(start_date:, end_date:, app_enrollment_id:, column_option:, display_depth:, comparison_period:, show_currency_difference:, show_percentage_difference:)
|
134
214
|
path = "/api/v1/Reports/income-statement"
|
135
|
-
params = {:startDate => start_date, :endDate => end_date, :columnOption => column_option, :displayDepth => display_depth, :comparisonPeriod => comparison_period, :showCurrencyDifference => show_currency_difference, :showPercentageDifference => show_percentage_difference}
|
215
|
+
params = {:startDate => start_date, :endDate => end_date, :appEnrollmentId => app_enrollment_id, :columnOption => column_option, :displayDepth => display_depth, :comparisonPeriod => comparison_period, :showCurrencyDifference => show_currency_difference, :showPercentageDifference => show_percentage_difference}
|
136
216
|
@connection.request(:get, path, nil, params)
|
137
217
|
end
|
138
218
|
|
@@ -141,14 +221,60 @@ class ReportsClient
|
|
141
221
|
#
|
142
222
|
# @param start_date [date-time] The start date of the report
|
143
223
|
# @param end_date [date-time] The end date of the report
|
224
|
+
# @param app_enrollment_id [uuid] The app enrollment id of the app enrollment whose data will be used.
|
144
225
|
# @param column_option [string] The desired column splitting of the report data. An empty string or anything unrecognized will result in only totals being displayed. Options are as follows: By Period - a column for every month/fiscal period within the reporting dates Quarterly - a column for every quarter within the reporting dates Annually - a column for every year within the reporting dates
|
145
226
|
# @param display_depth [ReportDepth] The desired row splitting of the report data. For Balance Sheets, the minimum report depth is 1. Options are as follows: 1 - combine all accounts by their category 2 - combine all accounts by their subcategory 3 - display all accounts
|
146
227
|
# @param comparison_period [string] Add a column for historical data with the following options and use showCurrencyDifference and/or show percentageDifference to display a comparison of that historical data to the report period. "PP" - previous period (will show the previous quarter or year if Quarterly or Annually is chosen for columnOption) "PY" - previous year (the same date range as the report, but for the year prior)
|
147
228
|
# @param show_currency_difference [boolean] A boolean to turn on a currency based difference between the reporting period and the comparison period.
|
148
229
|
# @param show_percentage_difference [boolean] A boolean to turn on a percent based difference between the reporting period and the comparison period.
|
149
|
-
def balance_sheet_report(start_date:, end_date:, column_option:, display_depth:, comparison_period:, show_currency_difference:, show_percentage_difference:)
|
230
|
+
def balance_sheet_report(start_date:, end_date:, app_enrollment_id:, column_option:, display_depth:, comparison_period:, show_currency_difference:, show_percentage_difference:)
|
150
231
|
path = "/api/v1/Reports/balance-sheet"
|
151
|
-
params = {:startDate => start_date, :endDate => end_date, :columnOption => column_option, :displayDepth => display_depth, :comparisonPeriod => comparison_period, :showCurrencyDifference => show_currency_difference, :showPercentageDifference => show_percentage_difference}
|
232
|
+
params = {:startDate => start_date, :endDate => end_date, :appEnrollmentId => app_enrollment_id, :columnOption => column_option, :displayDepth => display_depth, :comparisonPeriod => comparison_period, :showCurrencyDifference => show_currency_difference, :showPercentageDifference => show_percentage_difference}
|
233
|
+
@connection.request(:get, path, nil, params)
|
234
|
+
end
|
235
|
+
|
236
|
+
##
|
237
|
+
# Generates a cash flow statement for the given time range.
|
238
|
+
#
|
239
|
+
# @param start_date [date-time] The start date of the report
|
240
|
+
# @param end_date [date-time] The end date of the report
|
241
|
+
# @param app_enrollment_id [uuid] The app enrollment id of the app enrollment whose data will be used.
|
242
|
+
# @param column_option [string] The desired column splitting of the report data. An empty string or anything unrecognized will result in only totals being displayed. Options are as follows: By Period - a column for every month/fiscal period within the reporting dates Quarterly - a column for every quarter within the reporting dates Annually - a column for every year within the reporting dates
|
243
|
+
# @param display_depth [ReportDepth] The desired row splitting of the report data. Options are as follows: 0 - combine all accounts by their classification 1 - combine all accounts by their category 2 - combine all accounts by their subcategory 3 - display all accounts
|
244
|
+
def cash_flow_statement_report(start_date:, end_date:, app_enrollment_id:, column_option:, display_depth:)
|
245
|
+
path = "/api/v1/Reports/cash-flow-statement"
|
246
|
+
params = {:startDate => start_date, :endDate => end_date, :appEnrollmentId => app_enrollment_id, :columnOption => column_option, :displayDepth => display_depth}
|
247
|
+
@connection.request(:get, path, nil, params)
|
248
|
+
end
|
249
|
+
|
250
|
+
##
|
251
|
+
# Retrieves a summary for each vendor that includes a count of their outstanding bills, the total amount outstanding, and their daily payable outstanding value.
|
252
|
+
#
|
253
|
+
# Days payable outstanding (DPO) is a financial ratio that indicates the average time (in days) that a company takes to pay its bills to its trade creditors, which may include suppliers, vendors, or financiers.
|
254
|
+
#
|
255
|
+
# More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.
|
256
|
+
#
|
257
|
+
# @param report_date [date-time] The date the outstanding values are calculated on. Should be either the current day or the end of a previous quarter.
|
258
|
+
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
259
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. No collections are currently available but may be offered in the future
|
260
|
+
# @param order [string] The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight).
|
261
|
+
# @param page_size [int32] The page size for results (default 200, maximum of 10,000)
|
262
|
+
# @param page_number [int32] The page number for results (default 0)
|
263
|
+
def days_payable_outstanding_summary(report_date:, filter:, include_param:, order:, page_size:, page_number:)
|
264
|
+
path = "/api/v1/Reports/daily-payable-outstanding-summary"
|
265
|
+
params = {:reportDate => report_date, :filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
266
|
+
@connection.request(:get, path, nil, params)
|
267
|
+
end
|
268
|
+
|
269
|
+
##
|
270
|
+
# Retrieves total number of vendors, bills, the total amount outstanding, and the daily payable outstanding value for a group.
|
271
|
+
#
|
272
|
+
# Days payable outstanding (DPO) is a financial ratio that indicates the average time (in days) that a company takes to pay its bills to its trade creditors, which may include suppliers, vendors, or financiers.
|
273
|
+
#
|
274
|
+
# @param report_date [date-time] The date the outstanding values are calculated on. Should be either the current day or the end of a previous quarter.
|
275
|
+
def days_payable_outstanding_summary_total(report_date:)
|
276
|
+
path = "/api/v1/Reports/daily-payable-outstanding-summary-total"
|
277
|
+
params = {:reportDate => report_date}
|
152
278
|
@connection.request(:get, path, nil, params)
|
153
279
|
end
|
154
280
|
end
|
@@ -33,18 +33,4 @@ class StatusClient
|
|
33
33
|
path = "/api/v1/Status"
|
34
34
|
@connection.request(:get, path, nil, nil)
|
35
35
|
end
|
36
|
-
|
37
|
-
##
|
38
|
-
# Generates an error code that your program may use to test handling of common types of error conditions.
|
39
|
-
#
|
40
|
-
# * If you specify `?err=500`, you will receive a 500 internal server error. * If you specify `?err=timeout`, the API will stall for 90 seconds and then return 200 OK. Many network connections will drop after 60 seconds of no activity. * If you do not specify any of these errors, the API will return 200 OK.
|
41
|
-
#
|
42
|
-
# The Error Test API allows you to test whether your client program is capable of handling certain types of error codes. Developers writing libraries may find it useful to create integration tests that verify that their code can correctly detect the difference between a validation error resulting in a 400 error code, a network timeout resulting in a broken network connection, and a server error resulting in a 500 error code. You may use the Error Test API to verify that your code is able to identify and handle these cases correctly.
|
43
|
-
#
|
44
|
-
# @param err [string] The type of error test to execute. Supported error types: 500, timeout
|
45
|
-
def error_test(err:)
|
46
|
-
path = "/api/v1/Status/testing"
|
47
|
-
params = {:err => err}
|
48
|
-
@connection.request(:get, path, nil, params)
|
49
|
-
end
|
50
36
|
end
|
@@ -121,4 +121,16 @@ class UserAccountsClient
|
|
121
121
|
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
122
122
|
@connection.request(:get, path, nil, params)
|
123
123
|
end
|
124
|
+
|
125
|
+
##
|
126
|
+
# Change the active GroupKey of the calling user.
|
127
|
+
#
|
128
|
+
# A User represents a person who has the ability to authenticate against the Lockstep Platform and use services such as Lockstep Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of Lockstep platform services. Users may have different privileges and access control rights within the Lockstep Platform.
|
129
|
+
#
|
130
|
+
# @param group_key [uuid]
|
131
|
+
def change_user_group(group_key:)
|
132
|
+
path = "/api/v1/UserAccounts/change-group"
|
133
|
+
params = {:groupKey => group_key}
|
134
|
+
@connection.request(:post, path, nil, params)
|
135
|
+
end
|
124
136
|
end
|
@@ -0,0 +1,81 @@
|
|
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 'awrence'
|
16
|
+
|
17
|
+
class WebhookRulesClient
|
18
|
+
|
19
|
+
##
|
20
|
+
# Initialize the WebhookRulesClient class with an API client instance.
|
21
|
+
# @param connection [LockstepApi] The API client object for this connection
|
22
|
+
def initialize(connection)
|
23
|
+
@connection = connection
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
##
|
28
|
+
# Retrieves the Webhook Rule specified by this unique identifier.
|
29
|
+
#
|
30
|
+
# @param id [uuid] The unique Lockstep Platform ID number of this Webhook Rule
|
31
|
+
def retrieve_webhook_rule(id:)
|
32
|
+
path = "/api/v1/WebhookRules/#{id}"
|
33
|
+
@connection.request(:get, path, nil, nil)
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# Updates a webhook rule that matches the specified id with the requested information.
|
38
|
+
#
|
39
|
+
# The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired.
|
40
|
+
#
|
41
|
+
# @param id [uuid] The unique Lockstep Platform ID number of the Webhook Rule to update.
|
42
|
+
# @param body [object] A list of changes to apply to this Webhook Rule
|
43
|
+
def update_webhook_rule(id:, body:)
|
44
|
+
path = "/api/v1/WebhookRules/#{id}"
|
45
|
+
@connection.request(:patch, path, body.to_camelback_keys.to_json, nil)
|
46
|
+
end
|
47
|
+
|
48
|
+
##
|
49
|
+
# Deletes the Webhook Rule referred to by this unique identifier.
|
50
|
+
#
|
51
|
+
# @param id [uuid] The unique Lockstep Platform ID number of the Webhook Rule to delete.
|
52
|
+
def delete_webhook_rule(id:)
|
53
|
+
path = "/api/v1/WebhookRules/#{id}"
|
54
|
+
@connection.request(:delete, path, nil, nil)
|
55
|
+
end
|
56
|
+
|
57
|
+
##
|
58
|
+
# Creates one or more webhook rules from a given model.
|
59
|
+
#
|
60
|
+
# @param body [WebhookRuleModel] The Webhook Rules to create
|
61
|
+
def create_webhook_rules(body:)
|
62
|
+
path = "/api/v1/WebhookRules"
|
63
|
+
@connection.request(:post, path, body, nil)
|
64
|
+
end
|
65
|
+
|
66
|
+
##
|
67
|
+
# Queries Webhook Rules for this account using the specified filtering, sorting, and pagination rules requested.
|
68
|
+
#
|
69
|
+
# More information on querying can be found on the [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.
|
70
|
+
#
|
71
|
+
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
72
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. No collections are currently available but may be offered in the future
|
73
|
+
# @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
74
|
+
# @param page_size [int32] The page size for results (default 200). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
75
|
+
# @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
76
|
+
def query_webhook_rules(filter:, include_param:, order:, page_size:, page_number:)
|
77
|
+
path = "/api/v1/WebhookRules/query"
|
78
|
+
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
79
|
+
@connection.request(:get, path, nil, params)
|
80
|
+
end
|
81
|
+
end
|