lockstep_sdk 2022.4.32.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 +7 -0
- data/lib/lockstep_sdk/clients/activities_client.rb +119 -0
- data/lib/lockstep_sdk/clients/api_keys_client.rb +78 -0
- data/lib/lockstep_sdk/clients/app_enrollments_client.rb +121 -0
- data/lib/lockstep_sdk/clients/applications_client.rb +100 -0
- data/lib/lockstep_sdk/clients/attachments_client.rb +121 -0
- data/lib/lockstep_sdk/clients/code_definitions_client.rb +60 -0
- data/lib/lockstep_sdk/clients/companies_client.rb +123 -0
- data/lib/lockstep_sdk/clients/contacts_client.rb +90 -0
- data/lib/lockstep_sdk/clients/credit_memo_applied_client.rb +92 -0
- data/lib/lockstep_sdk/clients/currencies_client.rb +55 -0
- data/lib/lockstep_sdk/clients/custom_field_definitions_client.rb +94 -0
- data/lib/lockstep_sdk/clients/custom_field_values_client.rb +97 -0
- data/lib/lockstep_sdk/clients/definitions_client.rb +95 -0
- data/lib/lockstep_sdk/clients/emails_client.rb +108 -0
- data/lib/lockstep_sdk/clients/invoice_history_client.rb +56 -0
- data/lib/lockstep_sdk/clients/invoices_client.rb +126 -0
- data/lib/lockstep_sdk/clients/leads_client.rb +40 -0
- data/lib/lockstep_sdk/clients/notes_client.rb +84 -0
- data/lib/lockstep_sdk/clients/payment_applications_client.rb +92 -0
- data/lib/lockstep_sdk/clients/payments_client.rb +138 -0
- data/lib/lockstep_sdk/clients/provisioning_client.rb +56 -0
- data/lib/lockstep_sdk/clients/reports_client.rb +114 -0
- data/lib/lockstep_sdk/clients/status_client.rb +53 -0
- data/lib/lockstep_sdk/clients/sync_client.rb +97 -0
- data/lib/lockstep_sdk/clients/user_accounts_client.rb +127 -0
- data/lib/lockstep_sdk/clients/user_roles_client.rb +54 -0
- data/lib/lockstep_sdk/lockstep_api.rb +264 -0
- data/lib/lockstep_sdk/models/activity_model.rb +221 -0
- data/lib/lockstep_sdk/models/activity_stream_item_model.rb +104 -0
- data/lib/lockstep_sdk/models/activity_xref_model.rb +72 -0
- data/lib/lockstep_sdk/models/aging_model.rb +62 -0
- data/lib/lockstep_sdk/models/api_key_model.rb +116 -0
- data/lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb +110 -0
- data/lib/lockstep_sdk/models/app_enrollment_model.rb +151 -0
- data/lib/lockstep_sdk/models/application_model.rb +166 -0
- data/lib/lockstep_sdk/models/ar_aging_header_info_model.rb +86 -0
- data/lib/lockstep_sdk/models/ar_header_info_model.rb +170 -0
- data/lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb +140 -0
- data/lib/lockstep_sdk/models/attachment_header_info_model.rb +74 -0
- data/lib/lockstep_sdk/models/attachment_model.rb +122 -0
- data/lib/lockstep_sdk/models/bulk_currency_conversion_model.rb +56 -0
- data/lib/lockstep_sdk/models/cashflow_report_model.rb +74 -0
- data/lib/lockstep_sdk/models/code_definition_model.rb +99 -0
- data/lib/lockstep_sdk/models/company_model.rb +336 -0
- data/lib/lockstep_sdk/models/connector_info_model.rb +69 -0
- data/lib/lockstep_sdk/models/contact_model.rb +227 -0
- data/lib/lockstep_sdk/models/country_model.rb +116 -0
- data/lib/lockstep_sdk/models/credit_memo_applied_model.rb +150 -0
- data/lib/lockstep_sdk/models/credit_memo_invoice_model.rb +116 -0
- data/lib/lockstep_sdk/models/currency_model.rb +74 -0
- data/lib/lockstep_sdk/models/currency_rate_model.rb +68 -0
- data/lib/lockstep_sdk/models/custom_field_definition_model.rb +121 -0
- data/lib/lockstep_sdk/models/custom_field_value_model.rb +115 -0
- data/lib/lockstep_sdk/models/customer_details_model.rb +164 -0
- data/lib/lockstep_sdk/models/customer_details_payment_model.rb +104 -0
- data/lib/lockstep_sdk/models/customer_summary_model.rb +134 -0
- data/lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb +62 -0
- data/lib/lockstep_sdk/models/developer_account_submit_model.rb +62 -0
- data/lib/lockstep_sdk/models/email_model.rb +245 -0
- data/lib/lockstep_sdk/models/erp_info_data_model.rb +63 -0
- data/lib/lockstep_sdk/models/erp_info_model.rb +56 -0
- data/lib/lockstep_sdk/models/erp_model.rb +62 -0
- data/lib/lockstep_sdk/models/invite_data_model.rb +56 -0
- data/lib/lockstep_sdk/models/invite_model.rb +68 -0
- data/lib/lockstep_sdk/models/invite_submit_model.rb +50 -0
- data/lib/lockstep_sdk/models/invoice_address_model.rb +140 -0
- data/lib/lockstep_sdk/models/invoice_history_model.rb +238 -0
- data/lib/lockstep_sdk/models/invoice_line_model.rb +194 -0
- data/lib/lockstep_sdk/models/invoice_model.rb +325 -0
- data/lib/lockstep_sdk/models/invoice_payment_detail_model.rb +104 -0
- data/lib/lockstep_sdk/models/invoice_summary_model.rb +134 -0
- data/lib/lockstep_sdk/models/lead_model.rb +74 -0
- data/lib/lockstep_sdk/models/note_model.rb +121 -0
- data/lib/lockstep_sdk/models/payment_applied_model.rb +131 -0
- data/lib/lockstep_sdk/models/payment_detail_header_model.rb +80 -0
- data/lib/lockstep_sdk/models/payment_detail_model.rb +176 -0
- data/lib/lockstep_sdk/models/payment_model.rb +206 -0
- data/lib/lockstep_sdk/models/payment_summary_model.rb +128 -0
- data/lib/lockstep_sdk/models/provisioning_finalize_request_model.rb +74 -0
- data/lib/lockstep_sdk/models/provisioning_model.rb +74 -0
- data/lib/lockstep_sdk/models/provisioning_response_model.rb +86 -0
- data/lib/lockstep_sdk/models/risk_rate_model.rb +98 -0
- data/lib/lockstep_sdk/models/state_model.rb +62 -0
- data/lib/lockstep_sdk/models/status_model.rb +128 -0
- data/lib/lockstep_sdk/models/sync_entity_result_model.rb +74 -0
- data/lib/lockstep_sdk/models/sync_request_model.rb +98 -0
- data/lib/lockstep_sdk/models/sync_submit_model.rb +50 -0
- data/lib/lockstep_sdk/models/transfer_owner_model.rb +56 -0
- data/lib/lockstep_sdk/models/transfer_owner_submit_model.rb +50 -0
- data/lib/lockstep_sdk/models/user_account_model.rb +240 -0
- data/lib/lockstep_sdk/models/user_role_model.rb +86 -0
- data/lib/lockstep_sdk/version.rb +3 -0
- metadata +150 -0
@@ -0,0 +1,138 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit 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 Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'awrence'
|
19
|
+
|
20
|
+
class PaymentsClient
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the PaymentsClient class with a lockstepsdk instance.
|
24
|
+
# @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
|
25
|
+
def initialize(lockstepsdk)
|
26
|
+
@lockstepsdk = lockstepsdk
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
##
|
31
|
+
# Retrieves the Payment specified by this unique identifier, optionally including nested data sets.
|
32
|
+
#
|
33
|
+
# A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP "key" that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
|
34
|
+
#
|
35
|
+
# @param id [uuid] The unique Lockstep Platform ID number of this Payment; NOT the customer's ERP key
|
36
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Applications, Notes, Attachments, CustomFields
|
37
|
+
def retrieve_payment(id:, include_param:)
|
38
|
+
path = "/api/v1/Payments/#{id}"
|
39
|
+
params = {:include => include_param}
|
40
|
+
@lockstepsdk.request(:get, path, nil, params)
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Updates an existing Payment with the information supplied to this PATCH call.
|
45
|
+
#
|
46
|
+
# 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.
|
47
|
+
#
|
48
|
+
# A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP "key" that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
|
49
|
+
#
|
50
|
+
# @param id [uuid] The unique Lockstep Platform ID number of the Payment to update; NOT the customer's ERP key
|
51
|
+
# @param body [object] A list of changes to apply to this Payment
|
52
|
+
def update_payment(id:, body:)
|
53
|
+
path = "/api/v1/Payments/#{id}"
|
54
|
+
@lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
|
55
|
+
end
|
56
|
+
|
57
|
+
##
|
58
|
+
# Deletes the Payment referred to by this unique identifier.
|
59
|
+
#
|
60
|
+
# A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP "key" that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
|
61
|
+
#
|
62
|
+
# @param id [uuid] The unique Lockstep Platform ID number of the Payment to delete; NOT the customer's ERP key
|
63
|
+
def delete_payment(id:)
|
64
|
+
path = "/api/v1/Payments/#{id}"
|
65
|
+
@lockstepsdk.request(:delete, path, nil, nil)
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# Creates one or more Payments within this account and returns the records as created.
|
70
|
+
#
|
71
|
+
# A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP "key" that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
|
72
|
+
#
|
73
|
+
# @param body [PaymentModel] The Payments to create
|
74
|
+
def create_payments(body:)
|
75
|
+
path = "/api/v1/Payments"
|
76
|
+
@lockstepsdk.request(:post, path, body, nil)
|
77
|
+
end
|
78
|
+
|
79
|
+
##
|
80
|
+
# Queries Payments for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
|
81
|
+
#
|
82
|
+
# 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.
|
83
|
+
#
|
84
|
+
# A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP "key" that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
|
85
|
+
#
|
86
|
+
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
87
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Applications, Notes, Attachments, CustomFields
|
88
|
+
# @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
89
|
+
# @param page_size [int32] The page size for results (default 200). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
90
|
+
# @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
91
|
+
def query_payments(filter:, include_param:, order:, page_size:, page_number:)
|
92
|
+
path = "/api/v1/Payments/query"
|
93
|
+
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
94
|
+
@lockstepsdk.request(:get, path, nil, params)
|
95
|
+
end
|
96
|
+
|
97
|
+
##
|
98
|
+
# Queries Payments for this account using the specified filtering, sorting, nested fetch, and pagination rules requested. This query endpoint provides extra data about the summary of payment information.
|
99
|
+
#
|
100
|
+
# 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.
|
101
|
+
#
|
102
|
+
# A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the `CustomerId` field, and the recipient of the Payment is identified by the `CompanyId` field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP "key" that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero `UnappliedAmount` value, which represents a deposit that has been paid and not yet applied to an Invoice.
|
103
|
+
#
|
104
|
+
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
105
|
+
# @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
|
106
|
+
# @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
107
|
+
# @param page_size [int32] The page size for results (default 200). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
108
|
+
# @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
109
|
+
def query_payment_summary_view(filter:, include_param:, order:, page_size:, page_number:)
|
110
|
+
path = "/api/v1/Payments/views/summary"
|
111
|
+
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
112
|
+
@lockstepsdk.request(:get, path, nil, params)
|
113
|
+
end
|
114
|
+
|
115
|
+
##
|
116
|
+
# Retrieves aggregated payment data from your account.
|
117
|
+
#
|
118
|
+
def retrieve_payment_detail_header()
|
119
|
+
path = "/api/v1/Payments/views/detail-header"
|
120
|
+
@lockstepsdk.request(:get, path, nil, nil)
|
121
|
+
end
|
122
|
+
|
123
|
+
##
|
124
|
+
# Queries Payments within the Lockstep platform using the specified filtering, sorting, nested fetch, and pagination rules requested.
|
125
|
+
#
|
126
|
+
# 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. A Payment represents money sent from one company to another. A single payment may contain payments for one or more invoices; it is also possible for payments to be made in advance of an invoice, for example, as a deposit. The creator of the Payment is identified by the CustomerId field, and the recipient of the Payment is identified by the CompanyId field. Most Payments are uniquely identified both by a Lockstep Platform ID number and a customer ERP "key" that was generated by the system that originated the Payment. Payments that have not been fully applied have a nonzero UnappliedAmount value, which represents a deposit that has been paid and not yet applied to an Invoice.
|
127
|
+
#
|
128
|
+
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
129
|
+
# @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
|
130
|
+
# @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
131
|
+
# @param page_size [int32] The page size for results (default 200). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
132
|
+
# @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
133
|
+
def query_payment_detail_view(filter:, include_param:, order:, page_size:, page_number:)
|
134
|
+
path = "/api/v1/Payments/views/detail"
|
135
|
+
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
136
|
+
@lockstepsdk.request(:get, path, nil, params)
|
137
|
+
end
|
138
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit 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 Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'awrence'
|
19
|
+
|
20
|
+
class ProvisioningClient
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the ProvisioningClient class with a lockstepsdk instance.
|
24
|
+
# @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
|
25
|
+
def initialize(lockstepsdk)
|
26
|
+
@lockstepsdk = lockstepsdk
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
##
|
31
|
+
# Creates a new User or updates an Invited user based on metadata provided by the User during the onboarding process
|
32
|
+
#
|
33
|
+
# @param body [ProvisioningModel] Represents a User and their related metadata
|
34
|
+
def provision_user_account(body:)
|
35
|
+
path = "/api/v1/Provisioning"
|
36
|
+
@lockstepsdk.request(:post, path, body, nil)
|
37
|
+
end
|
38
|
+
|
39
|
+
##
|
40
|
+
# 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'
|
41
|
+
#
|
42
|
+
# @param body [ProvisioningFinalizeRequestModel] Represents a User and their related metadata
|
43
|
+
def finalize_user_account_provisioning(body:)
|
44
|
+
path = "/api/v1/Provisioning/finalize"
|
45
|
+
@lockstepsdk.request(:post, path, body, nil)
|
46
|
+
end
|
47
|
+
|
48
|
+
##
|
49
|
+
#
|
50
|
+
#
|
51
|
+
# @param body [DeveloperAccountSubmitModel]
|
52
|
+
def provision_free_developer_account(body:)
|
53
|
+
path = "/api/v1/Provisioning/free-account"
|
54
|
+
@lockstepsdk.request(:post, path, body, nil)
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit 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 Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'awrence'
|
19
|
+
|
20
|
+
class ReportsClient
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the ReportsClient class with a lockstepsdk instance.
|
24
|
+
# @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
|
25
|
+
def initialize(lockstepsdk)
|
26
|
+
@lockstepsdk = lockstepsdk
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
##
|
31
|
+
# Retrieves a current Cash Flow report for this account.
|
32
|
+
#
|
33
|
+
# The Cash Flow report indicates the amount of payments retrieved and invoices billed 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.
|
34
|
+
#
|
35
|
+
# @param timeframe [int32] Number of days of data to include for the Cash Flow Report (default is 30 days from today)
|
36
|
+
def cash_flow(timeframe:)
|
37
|
+
path = "/api/v1/Reports/cashflow"
|
38
|
+
params = {:timeframe => timeframe}
|
39
|
+
@lockstepsdk.request(:get, path, nil, params)
|
40
|
+
end
|
41
|
+
|
42
|
+
##
|
43
|
+
# Retrieves a current Daily Sales Outstanding (DSO) report for this account.
|
44
|
+
#
|
45
|
+
# 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.
|
46
|
+
#
|
47
|
+
def daily_sales_outstanding()
|
48
|
+
path = "/api/v1/Reports/dailysalesoutstanding"
|
49
|
+
@lockstepsdk.request(:get, path, nil, nil)
|
50
|
+
end
|
51
|
+
|
52
|
+
##
|
53
|
+
# Retrieves a current Risk Rate report for this account.
|
54
|
+
#
|
55
|
+
# Risk Rate is a metric that indicates the percentage of total AR balance left unpaid after 90 days. You can use this report to identify the percentage of invoice value that is not being collected in a timely manner.
|
56
|
+
#
|
57
|
+
def risk_rates()
|
58
|
+
path = "/api/v1/Reports/riskrates"
|
59
|
+
@lockstepsdk.request(:get, path, nil, nil)
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# Retrieves AR header information up to the date specified.
|
64
|
+
#
|
65
|
+
# @param report_date [date] The date of the report.
|
66
|
+
# @param company_id [uuid] Include a company to get AR data for a specific company, leave as null to include all Companies.
|
67
|
+
def accounts_receivable_header(report_date:, company_id:)
|
68
|
+
path = "/api/v1/Reports/ar-header"
|
69
|
+
params = {:reportDate => report_date, :companyId => company_id}
|
70
|
+
@lockstepsdk.request(:get, path, nil, params)
|
71
|
+
end
|
72
|
+
|
73
|
+
##
|
74
|
+
# 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.
|
75
|
+
#
|
76
|
+
# You can specify viewing parameters for the aging report such as currency code and date bucket configuration. You can also view aging data for an entire account or a specific company.
|
77
|
+
#
|
78
|
+
# This information is recalculated when invoice data changes. After each invoice data change occurs, Lockstep queues up a calculation based on the current invoice data at that time. This information is calculated and persisted for each customer so that the report will be available quickly.
|
79
|
+
#
|
80
|
+
# To force a recalculation of aging data, specify the `recalculate` option. Note that forcing a recalculation will slow your API response time.
|
81
|
+
#
|
82
|
+
# @param company_id [uuid] Company aging buckets are filtered by (all company aging returned if not company specified)
|
83
|
+
# @param recalculate [boolean] Force api to recalculate aging data, cached data may be returned when set to false
|
84
|
+
# @param currency_code [string] Currency aging buckets are converted to (all aging data returned without currency conversion if no currency is specified)
|
85
|
+
# @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)
|
86
|
+
# @param buckets [int32] Customized buckets used for aging calculations (default buckets [0,30,60,90,120,180] will be used if buckets not specified)
|
87
|
+
def invoice_aging_report(company_id:, recalculate:, currency_code:, currency_provider:, buckets:)
|
88
|
+
path = "/api/v1/Reports/aging"
|
89
|
+
params = {:CompanyId => company_id, :Recalculate => recalculate, :CurrencyCode => currency_code, :CurrencyProvider => currency_provider, :Buckets => buckets}
|
90
|
+
@lockstepsdk.request(:get, path, nil, params)
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Retrieves AR Aging Header information report broken down by aging bucket.
|
95
|
+
#
|
96
|
+
# The AR Aging Header report contains aggregated information about the `TotalInvoicesPastDue`, `TotalCustomers`, and their respective `PercentageOfTotalAr` grouped by their aging `ReportBucket`.
|
97
|
+
#
|
98
|
+
def accounts_receivable_aging_header()
|
99
|
+
path = "/api/v1/Reports/ar-aging-header"
|
100
|
+
@lockstepsdk.request(:get, path, nil, nil)
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Retrieves Attachment Header information for the requested companyId.
|
105
|
+
#
|
106
|
+
# The Attachment Header report contains aggregated information about the `TotalAttachments`, `TotalArchived`, and `TotalActive` attachment classifications.
|
107
|
+
#
|
108
|
+
# @param company_id [uuid] Include a specific company to get Attachment data for, leave as null to include all Companies.
|
109
|
+
def attachments_header_information(company_id:)
|
110
|
+
path = "/api/v1/Reports/attachments-header"
|
111
|
+
params = {:companyId => company_id}
|
112
|
+
@lockstepsdk.request(:get, path, nil, params)
|
113
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit 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 Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'awrence'
|
19
|
+
|
20
|
+
class StatusClient
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the StatusClient class with a lockstepsdk instance.
|
24
|
+
# @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
|
25
|
+
def initialize(lockstepsdk)
|
26
|
+
@lockstepsdk = lockstepsdk
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
##
|
31
|
+
# Verifies that your application can successfully call the Lockstep Platform API and returns a successful code regardless of your authentication status or permissions.
|
32
|
+
#
|
33
|
+
# The Ping API can be used to verify that your app is working correctly. The Ping API will always return 200 OK. If you call this API and you receive a code other than 200 OK, you should check your network connectivity. A response code of anything other than 200 means that a routing issue or proxy issue may prevent your application from reaching the Lockstep API
|
34
|
+
#
|
35
|
+
def ping()
|
36
|
+
path = "/api/v1/Status"
|
37
|
+
@lockstepsdk.request(:get, path, nil, nil)
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# Generates an error code that your program may use to test handling of common types of error conditions.
|
42
|
+
#
|
43
|
+
# * 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.
|
44
|
+
#
|
45
|
+
# 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.
|
46
|
+
#
|
47
|
+
# @param err [string] The type of error test to execute. Supported error types: 500, timeout
|
48
|
+
def error_test(err:)
|
49
|
+
path = "/api/v1/Status/testing"
|
50
|
+
params = {:err => err}
|
51
|
+
@lockstepsdk.request(:get, path, nil, params)
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit 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 Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'awrence'
|
19
|
+
|
20
|
+
class SyncClient
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the SyncClient class with a lockstepsdk instance.
|
24
|
+
# @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
|
25
|
+
def initialize(lockstepsdk)
|
26
|
+
@lockstepsdk = lockstepsdk
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
##
|
31
|
+
# Requests a new Sync task from the Application specified in the request and returns a token that can be used to check the progress and status of the task.
|
32
|
+
#
|
33
|
+
# A Sync task represents an action performed by an Application for a particular account. An Application can provide many different tasks as part of their capabilities. Sync tasks are executed in the background and will continue running after they are created. Use one of the creation APIs to request execution of a task. To check on the progress of the task, call GetSync or QuerySync.
|
34
|
+
#
|
35
|
+
# @param body [SyncSubmitModel] Information about the Sync to execute
|
36
|
+
def create_sync(body:)
|
37
|
+
path = "/api/v1/Sync"
|
38
|
+
@lockstepsdk.request(:post, path, body, nil)
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Requests a new Sync task from a ZIP file you provide. This ZIP file can contain one or more files with data from the customer's platform. Individual files can be in the format CSV or JSONL (JSON with Lines).
|
43
|
+
#
|
44
|
+
# A Sync task represents an action performed by an Application for a particular account. An Application can provide many different tasks as part of their capabilities. Sync tasks are executed in the background and will continue running after they are created. Use one of the creation APIs to request execution of a task. To check on the progress of the task, call GetSync or QuerySync.
|
45
|
+
#
|
46
|
+
def upload_sync_file()
|
47
|
+
path = "/api/v1/Sync/zip"
|
48
|
+
@lockstepsdk.request(:post, path, nil, nil)
|
49
|
+
end
|
50
|
+
|
51
|
+
##
|
52
|
+
# Updates an existing Sync with the information supplied to this PATCH call.
|
53
|
+
#
|
54
|
+
# This API is restricted to internal service users and may not be called by customers or partners.
|
55
|
+
#
|
56
|
+
# 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. For example, you can provide the field name "IsActive" and specify the new value "False"; this API will then change the value of IsActive to false.
|
57
|
+
#
|
58
|
+
# A Sync task represents an action performed by an Application for a particular account. An Application can provide many different tasks as part of their capabilities. Sync tasks are executed in the background and will continue running after they are created. Use one of the creation APIs to request execution of a task. To check on the progress of the task, call GetSync or QuerySync.
|
59
|
+
#
|
60
|
+
# @param id [uuid] The unique ID number of the Sync to update
|
61
|
+
# @param body [object] A list of changes to apply to this Application
|
62
|
+
def update_sync(id:, body:)
|
63
|
+
path = "/api/v1/Sync/#{id}"
|
64
|
+
@lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
|
65
|
+
end
|
66
|
+
|
67
|
+
##
|
68
|
+
# Retrieves the status and information about a Sync operation by the requested ID. Provides status and progress information about this task.
|
69
|
+
#
|
70
|
+
# A Sync task represents an action performed by an Application for a particular account. An Application can provide many different tasks as part of their capabilities. Sync tasks are executed in the background and will continue running after they are created. Use one of the creation APIs to request execution of a task. To check on the progress of the task, call GetSync or QuerySync.
|
71
|
+
#
|
72
|
+
# @param id [uuid] The unique ID number of the Sync task to retrieve
|
73
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Details
|
74
|
+
def retrieve_sync(id:, include_param:)
|
75
|
+
path = "/api/v1/Sync/#{id}"
|
76
|
+
params = {:include => include_param}
|
77
|
+
@lockstepsdk.request(:get, path, nil, params)
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# Queries Sync tasks for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
|
82
|
+
#
|
83
|
+
# 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.
|
84
|
+
#
|
85
|
+
# A Sync task represents an action performed by an Application for a particular account. An Application can provide many different tasks as part of their capabilities. Sync tasks are executed in the background and will continue running after they are created. Use one of the creation APIs to request execution of a task. To check on the progress of the task, call GetSync or QuerySync.
|
86
|
+
#
|
87
|
+
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
88
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Details
|
89
|
+
# @param order [string] The sort order for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
90
|
+
# @param page_size [int32] The page size for results (default 200). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
91
|
+
# @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
92
|
+
def query_syncs(filter:, include_param:, order:, page_size:, page_number:)
|
93
|
+
path = "/api/v1/Sync/query"
|
94
|
+
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
95
|
+
@lockstepsdk.request(:get, path, nil, params)
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,127 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit 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 Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'awrence'
|
19
|
+
|
20
|
+
class UserAccountsClient
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the UserAccountsClient class with a lockstepsdk instance.
|
24
|
+
# @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
|
25
|
+
def initialize(lockstepsdk)
|
26
|
+
@lockstepsdk = lockstepsdk
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
##
|
31
|
+
# Retrieves the User with this identifier.
|
32
|
+
#
|
33
|
+
# 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.
|
34
|
+
#
|
35
|
+
# @param id [uuid] The unique ID number of the User to retrieve
|
36
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Notes, Attachments, CustomFields, AccountingRole
|
37
|
+
def retrieve_user(id:, include_param:)
|
38
|
+
path = "/api/v1/UserAccounts/#{id}"
|
39
|
+
params = {:include => include_param}
|
40
|
+
@lockstepsdk.request(:get, path, nil, params)
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Updates a User that matches the specified id with the requested information.
|
45
|
+
#
|
46
|
+
# 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.
|
47
|
+
#
|
48
|
+
# 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.
|
49
|
+
#
|
50
|
+
# @param id [uuid] The unique ID number of the User to retrieve
|
51
|
+
# @param body [object] A list of changes to apply to this User
|
52
|
+
def update_user(id:, body:)
|
53
|
+
path = "/api/v1/UserAccounts/#{id}"
|
54
|
+
@lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
|
55
|
+
end
|
56
|
+
|
57
|
+
##
|
58
|
+
# Disable the user referred to by this unique identifier.
|
59
|
+
#
|
60
|
+
# 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.
|
61
|
+
#
|
62
|
+
# @param id [uuid] The unique Lockstep Platform ID number of this User
|
63
|
+
def disable_user(id:)
|
64
|
+
path = "/api/v1/UserAccounts/#{id}"
|
65
|
+
@lockstepsdk.request(:delete, path, nil, nil)
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# Reenable the user referred to by this unique identifier.
|
70
|
+
#
|
71
|
+
# 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.
|
72
|
+
#
|
73
|
+
# @param id [uuid] The unique Lockstep Platform ID number of this User
|
74
|
+
def reenable_user(id:)
|
75
|
+
path = "/api/v1/UserAccounts/reenable"
|
76
|
+
params = {:id => id}
|
77
|
+
@lockstepsdk.request(:post, path, nil, params)
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# Invite a user with the specified email to join your accounting group. The user will receive an email to set up their account.
|
82
|
+
#
|
83
|
+
# 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.
|
84
|
+
#
|
85
|
+
# @param body [InviteSubmitModel] The user to invite
|
86
|
+
def invite_user(body:)
|
87
|
+
path = "/api/v1/UserAccounts/invite"
|
88
|
+
@lockstepsdk.request(:post, path, body, nil)
|
89
|
+
end
|
90
|
+
|
91
|
+
##
|
92
|
+
# Retrieves invite information for the specified invite token.
|
93
|
+
#
|
94
|
+
# 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.
|
95
|
+
#
|
96
|
+
# @param code [uuid] The code of the invite
|
97
|
+
def retrieve_invite_data(code:)
|
98
|
+
path = "/api/v1/UserAccounts/invite"
|
99
|
+
params = {:code => code}
|
100
|
+
@lockstepsdk.request(:get, path, nil, params)
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Transfer the ownership of a group to another user. This API must be called by the current owner of the group.
|
105
|
+
#
|
106
|
+
# 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.
|
107
|
+
#
|
108
|
+
# @param body [TransferOwnerSubmitModel]
|
109
|
+
def transfer_owner(body:)
|
110
|
+
path = "/api/v1/UserAccounts/transfer-owner"
|
111
|
+
@lockstepsdk.request(:post, path, body, nil)
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# Queries Users for this account using the specified filtering, sorting, nested fetch, and pagination rules requested. 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.
|
116
|
+
#
|
117
|
+
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
118
|
+
# @param include_param [string] To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Notes, Attachments, CustomFields, AccountingRole
|
119
|
+
# @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
120
|
+
# @param page_size [int32] The page size for results (default 200). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
121
|
+
# @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
122
|
+
def query_users(filter:, include_param:, order:, page_size:, page_number:)
|
123
|
+
path = "/api/v1/UserAccounts/query"
|
124
|
+
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
125
|
+
@lockstepsdk.request(:get, path, nil, params)
|
126
|
+
end
|
127
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
#
|
2
|
+
# Lockstep Software Development Kit 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 Ted Spence <tspence@lockstep.io>
|
10
|
+
# @author Manish Narayan B S <manish.n@lockstep.io>
|
11
|
+
# @author Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
12
|
+
# @copyright 2021-2022 Lockstep, Inc.
|
13
|
+
# @version 2022.4
|
14
|
+
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
15
|
+
#
|
16
|
+
|
17
|
+
|
18
|
+
require 'awrence'
|
19
|
+
|
20
|
+
class UserRolesClient
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the UserRolesClient class with a lockstepsdk instance.
|
24
|
+
# @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
|
25
|
+
def initialize(lockstepsdk)
|
26
|
+
@lockstepsdk = lockstepsdk
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
##
|
31
|
+
# Retrieves the User Role with this identifier.
|
32
|
+
#
|
33
|
+
# @param id [uuid] The unique ID number of the User Role to retrieve
|
34
|
+
# @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
|
35
|
+
def retrieve_user_role(id:, include_param:)
|
36
|
+
path = "/api/v1/UserRoles/#{id}"
|
37
|
+
params = {:include => include_param}
|
38
|
+
@lockstepsdk.request(:get, path, nil, params)
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Queries User Roles for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
|
43
|
+
#
|
44
|
+
# @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
45
|
+
# @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
|
46
|
+
# @param order [string] The sort order for this query. See See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
47
|
+
# @param page_size [int32] The page size for results (default 200). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
48
|
+
# @param page_number [int32] The page number for results (default 0). See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
|
49
|
+
def query_user_roles(filter:, include_param:, order:, page_size:, page_number:)
|
50
|
+
path = "/api/v1/UserRoles/query"
|
51
|
+
params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
|
52
|
+
@lockstepsdk.request(:get, path, nil, params)
|
53
|
+
end
|
54
|
+
end
|