lockstep_sdk 2022.14.30.0 → 2022.15.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lockstep_sdk/clients/reports_client.rb +2 -2
- data/lib/lockstep_sdk/lockstep_api.rb +7 -3
- data/lib/lockstep_sdk/models/contact_sync_model.rb +1 -1
- data/lib/lockstep_sdk/models/developer_account_submit_model.rb +12 -0
- data/lib/lockstep_sdk/models/invoice_sync_model.rb +1 -1
- data/lib/lockstep_sdk/version.rb +1 -1
- metadata +2 -3
- data/lib/LockstepSdk/lockstep_api.rb +0 -287
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db7e3496b7001944a321582839b31f4372d8aead48d098015e179fe707a38615
|
4
|
+
data.tar.gz: 0144027ade1421e3805078360dcf3901a0c8330cfde7c34e1cff2a4119eee168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6697e4b9f8941ff2bbe82753c4174f23a1a1012c72ddffda77adc5a20b36445f6dffa8d9ba1b21cb044bc8b5e66085acce1efa9f7f44ab33a49357eb10483fe
|
7
|
+
data.tar.gz: f8cd7f1249bd6b879484b30fbb6859da94870c0726f9972ff7ceb7fb072c38d0e13509efa2a0a5d7b2a62aaedb3b0abed29187e266622a8d619d9fbb92e1e644
|
@@ -112,8 +112,8 @@ class ReportsClient
|
|
112
112
|
##
|
113
113
|
# Generates a Trial Balance Report for the given time range.
|
114
114
|
#
|
115
|
-
# @param start_date [date-time]
|
116
|
-
# @param end_date [date-time]
|
115
|
+
# @param start_date [date-time] The start date of the report
|
116
|
+
# @param end_date [date-time] The end date of the report
|
117
117
|
def trial_balance_report(start_date:, end_date:)
|
118
118
|
path = "/api/v1/Reports/trial-balance"
|
119
119
|
params = {:startDate => start_date, :endDate => end_date}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
# @author Lockstep Network <support@lockstep.io>
|
10
10
|
# Manish Narayan B S <manish.n@lockstep.io>, Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
11
11
|
# @copyright 2021-2022 Lockstep, Inc.
|
12
|
-
# @version 2022.
|
12
|
+
# @version 2022.15.31
|
13
13
|
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
14
14
|
#
|
15
15
|
|
@@ -158,7 +158,7 @@ module lockstep_sdk
|
|
158
158
|
#
|
159
159
|
# @param env [string] Either "sbx", "prd", or the URI of the server, ending in a slash (/)
|
160
160
|
def initialize(env)
|
161
|
-
@version = "2022.
|
161
|
+
@version = "2022.15.31.0"
|
162
162
|
@env = case env
|
163
163
|
when "sbx"
|
164
164
|
"https://api.sbx.lockstep.io/"
|
@@ -204,6 +204,8 @@ module lockstep_sdk
|
|
204
204
|
##
|
205
205
|
# Configure this API client to use API key authentication
|
206
206
|
#
|
207
|
+
# Authentication is either via [Lockstep Platform API key](https://developer.lockstep.io/docs/api-keys) or [JWT Bearer Token](https://developer.lockstep.io/docs/jwt-bearer-tokens)
|
208
|
+
#
|
207
209
|
# @param api_key [string] The API Key to use for authentication
|
208
210
|
def with_api_key(api_key)
|
209
211
|
@bearer_token = nil
|
@@ -213,6 +215,8 @@ module lockstep_sdk
|
|
213
215
|
##
|
214
216
|
# Configure this API client to use JWT Bearer Token authentication
|
215
217
|
#
|
218
|
+
# Authentication is either via [Lockstep Platform API key](https://developer.lockstep.io/docs/api-keys) or [JWT Bearer Token](https://developer.lockstep.io/docs/jwt-bearer-tokens)
|
219
|
+
#
|
216
220
|
# @param bearer_token [string] The Bearer Token to use for authentication
|
217
221
|
def with_bearer_token(bearer_token)
|
218
222
|
@api_key = nil
|
@@ -258,7 +262,7 @@ module lockstep_sdk
|
|
258
262
|
request["Accept"] = 'application/json'
|
259
263
|
request["Content-Type"] = 'application/*+json'
|
260
264
|
request["SdkType"] = 'Ruby'
|
261
|
-
request["SdkVersion"] = '2022.
|
265
|
+
request["SdkVersion"] = '2022.15.31.0'
|
262
266
|
request["MachineName"] = Socket.gethostname
|
263
267
|
request.body = body
|
264
268
|
|
@@ -55,7 +55,7 @@ module LockstepSdk
|
|
55
55
|
end
|
56
56
|
|
57
57
|
##
|
58
|
-
# @return [String] This is the primary key of the Contact record. For this field, you should use whatever the contact's unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Example: If you store your contact records in a database, whatever the primary key for the contact table is in the database should be the "ErpKey". For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
58
|
+
# @return [String] This is the primary key of the Contact record. For this field, you should use whatever the contact's unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Example: If you store your contact records in a database, whatever the primary key for the contact table is in the database should be the "ErpKey". As some ERP systems don't maintain a unique key for Contacts, we also support syncing Contacts with ERP keys of the form {CompanyErpKey}|{index}, for example CompanyErpKey|1, CompanyErpKey|2 and so on. For this reason, please ensure that your Company/Contact ERP keys don't contain the '|' symbol or that it is replaced by an alternate symbol if they do. For more information, see [Identity Columns](https://developer.lockstep.io/docs/identity-columns).
|
59
59
|
attr_accessor :erp_key
|
60
60
|
|
61
61
|
##
|
@@ -24,6 +24,8 @@ module LockstepSdk
|
|
24
24
|
# Initialize the DeveloperAccountSubmitModel using the provided prototype
|
25
25
|
def initialize(params = {})
|
26
26
|
@name = params.dig(:name)
|
27
|
+
@first_name = params.dig(:first_name)
|
28
|
+
@last_name = params.dig(:last_name)
|
27
29
|
@email = params.dig(:email)
|
28
30
|
@company_name = params.dig(:company_name)
|
29
31
|
end
|
@@ -32,6 +34,14 @@ module LockstepSdk
|
|
32
34
|
# @return [String] The name of the developer.
|
33
35
|
attr_accessor :name
|
34
36
|
|
37
|
+
##
|
38
|
+
# @return [String] The first name of the person requesting the developer account.
|
39
|
+
attr_accessor :first_name
|
40
|
+
|
41
|
+
##
|
42
|
+
# @return [String] The last name of the person requesting the developer account.
|
43
|
+
attr_accessor :last_name
|
44
|
+
|
35
45
|
##
|
36
46
|
# @return [Email] The email address of the developer.
|
37
47
|
attr_accessor :email
|
@@ -45,6 +55,8 @@ module LockstepSdk
|
|
45
55
|
def as_json(options={})
|
46
56
|
{
|
47
57
|
'name' => @name,
|
58
|
+
'firstName' => @first_name,
|
59
|
+
'lastName' => @last_name,
|
48
60
|
'email' => @email,
|
49
61
|
'companyName' => @company_name,
|
50
62
|
}
|
@@ -115,7 +115,7 @@ module LockstepSdk
|
|
115
115
|
attr_accessor :salesperson_code
|
116
116
|
|
117
117
|
##
|
118
|
-
# @return [String] A code identifying the type of this invoice. Recognized Invoice types are: * `Invoice` - Represents an invoice sent by Company to the Customer * `AP Invoice` - Represents an invoice sent by
|
118
|
+
# @return [String] A code identifying the type of this invoice. Recognized Invoice types are: * `Invoice` - Represents an invoice sent by Company to the Customer * `AP Invoice` - Represents an invoice sent by Vendor to the Company * `Credit Memo` - Represents a credit memo generated by Company given to Customer * `AP Credit Memo` - Represents a credit memo generated by Vendor given to Company
|
119
119
|
attr_accessor :invoice_type_code
|
120
120
|
|
121
121
|
##
|
data/lib/lockstep_sdk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lockstep_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2022.
|
4
|
+
version: 2022.15.31.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lockstep
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awrence
|
@@ -32,7 +32,6 @@ executables: []
|
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
|
-
- lib/LockstepSdk/lockstep_api.rb
|
36
35
|
- lib/lockstep_sdk/clients/activities_client.rb
|
37
36
|
- lib/lockstep_sdk/clients/api_keys_client.rb
|
38
37
|
- lib/lockstep_sdk/clients/app_enrollments_client.rb
|
@@ -1,287 +0,0 @@
|
|
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
|
-
# Manish Narayan B S <manish.n@lockstep.io>, Rishi Rajkumar Jawahar <rjawahar@lockstep.io>
|
11
|
-
# @copyright 2021-2022 Lockstep, Inc.
|
12
|
-
# @version 2022.14.30
|
13
|
-
# @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
|
14
|
-
#
|
15
|
-
|
16
|
-
require 'net/http'
|
17
|
-
require 'openssl'
|
18
|
-
require 'uri'
|
19
|
-
require 'socket'
|
20
|
-
|
21
|
-
project_root = File.dirname(File.absolute_path(__FILE__))
|
22
|
-
Dir.glob(project_root + '/clients/*') {|file| require file}
|
23
|
-
|
24
|
-
module LockstepSdk
|
25
|
-
class LockstepApi
|
26
|
-
|
27
|
-
##
|
28
|
-
# @return [String] The version number of this API client
|
29
|
-
attr_accessor :version
|
30
|
-
|
31
|
-
##
|
32
|
-
# @return [String] The name or URL of the environment
|
33
|
-
attr_accessor :env
|
34
|
-
|
35
|
-
##
|
36
|
-
# @return [ActivitiesClient] Client object for Activities endpoints
|
37
|
-
attr_accessor :activities
|
38
|
-
|
39
|
-
##
|
40
|
-
# @return [ApiKeysClient] Client object for ApiKeys endpoints
|
41
|
-
attr_accessor :api_keys
|
42
|
-
|
43
|
-
##
|
44
|
-
# @return [AppEnrollmentsClient] Client object for AppEnrollments endpoints
|
45
|
-
attr_accessor :app_enrollments
|
46
|
-
|
47
|
-
##
|
48
|
-
# @return [ApplicationsClient] Client object for Applications endpoints
|
49
|
-
attr_accessor :applications
|
50
|
-
|
51
|
-
##
|
52
|
-
# @return [AttachmentsClient] Client object for Attachments endpoints
|
53
|
-
attr_accessor :attachments
|
54
|
-
|
55
|
-
##
|
56
|
-
# @return [CodeDefinitionsClient] Client object for CodeDefinitions endpoints
|
57
|
-
attr_accessor :code_definitions
|
58
|
-
|
59
|
-
##
|
60
|
-
# @return [CompaniesClient] Client object for Companies endpoints
|
61
|
-
attr_accessor :companies
|
62
|
-
|
63
|
-
##
|
64
|
-
# @return [ContactsClient] Client object for Contacts endpoints
|
65
|
-
attr_accessor :contacts
|
66
|
-
|
67
|
-
##
|
68
|
-
# @return [CreditMemoAppliedClient] Client object for CreditMemoApplied endpoints
|
69
|
-
attr_accessor :credit_memo_applied
|
70
|
-
|
71
|
-
##
|
72
|
-
# @return [CurrenciesClient] Client object for Currencies endpoints
|
73
|
-
attr_accessor :currencies
|
74
|
-
|
75
|
-
##
|
76
|
-
# @return [CustomFieldDefinitionsClient] Client object for CustomFieldDefinitions endpoints
|
77
|
-
attr_accessor :custom_field_definitions
|
78
|
-
|
79
|
-
##
|
80
|
-
# @return [CustomFieldValuesClient] Client object for CustomFieldValues endpoints
|
81
|
-
attr_accessor :custom_field_values
|
82
|
-
|
83
|
-
##
|
84
|
-
# @return [DefinitionsClient] Client object for Definitions endpoints
|
85
|
-
attr_accessor :definitions
|
86
|
-
|
87
|
-
##
|
88
|
-
# @return [EmailsClient] Client object for Emails endpoints
|
89
|
-
attr_accessor :emails
|
90
|
-
|
91
|
-
##
|
92
|
-
# @return [FinancialAccountClient] Client object for FinancialAccount endpoints
|
93
|
-
attr_accessor :financial_account
|
94
|
-
|
95
|
-
##
|
96
|
-
# @return [FinancialAccountBalanceHistoryClient] Client object for FinancialAccountBalanceHistory endpoints
|
97
|
-
attr_accessor :financial_account_balance_history
|
98
|
-
|
99
|
-
##
|
100
|
-
# @return [FinancialYearSettingsClient] Client object for FinancialYearSettings endpoints
|
101
|
-
attr_accessor :financial_year_settings
|
102
|
-
|
103
|
-
##
|
104
|
-
# @return [InvoiceHistoryClient] Client object for InvoiceHistory endpoints
|
105
|
-
attr_accessor :invoice_history
|
106
|
-
|
107
|
-
##
|
108
|
-
# @return [InvoicesClient] Client object for Invoices endpoints
|
109
|
-
attr_accessor :invoices
|
110
|
-
|
111
|
-
##
|
112
|
-
# @return [LeadsClient] Client object for Leads endpoints
|
113
|
-
attr_accessor :leads
|
114
|
-
|
115
|
-
##
|
116
|
-
# @return [NotesClient] Client object for Notes endpoints
|
117
|
-
attr_accessor :notes
|
118
|
-
|
119
|
-
##
|
120
|
-
# @return [PaymentApplicationsClient] Client object for PaymentApplications endpoints
|
121
|
-
attr_accessor :payment_applications
|
122
|
-
|
123
|
-
##
|
124
|
-
# @return [PaymentsClient] Client object for Payments endpoints
|
125
|
-
attr_accessor :payments
|
126
|
-
|
127
|
-
##
|
128
|
-
# @return [ProvisioningClient] Client object for Provisioning endpoints
|
129
|
-
attr_accessor :provisioning
|
130
|
-
|
131
|
-
##
|
132
|
-
# @return [ReportsClient] Client object for Reports endpoints
|
133
|
-
attr_accessor :reports
|
134
|
-
|
135
|
-
##
|
136
|
-
# @return [StatusClient] Client object for Status endpoints
|
137
|
-
attr_accessor :status
|
138
|
-
|
139
|
-
##
|
140
|
-
# @return [SyncClient] Client object for Sync endpoints
|
141
|
-
attr_accessor :sync
|
142
|
-
|
143
|
-
##
|
144
|
-
# @return [UserAccountsClient] Client object for UserAccounts endpoints
|
145
|
-
attr_accessor :user_accounts
|
146
|
-
|
147
|
-
##
|
148
|
-
# @return [UserRolesClient] Client object for UserRoles endpoints
|
149
|
-
attr_accessor :user_roles
|
150
|
-
|
151
|
-
##
|
152
|
-
# @return [WebhooksClient] Client object for Webhooks endpoints
|
153
|
-
attr_accessor :webhooks
|
154
|
-
|
155
|
-
|
156
|
-
##
|
157
|
-
# Construct a new API client targeting the specified server.
|
158
|
-
#
|
159
|
-
# @param env [string] Either "sbx", "prd", or the URI of the server, ending in a slash (/)
|
160
|
-
def initialize(env)
|
161
|
-
@version = "2022.14.30.0"
|
162
|
-
@env = case env
|
163
|
-
when "sbx"
|
164
|
-
"https://api.sbx.lockstep.io/"
|
165
|
-
when "prd"
|
166
|
-
"https://api.lockstep.io/"
|
167
|
-
else
|
168
|
-
env
|
169
|
-
end
|
170
|
-
|
171
|
-
# Construct all the clients
|
172
|
-
@activities = ActivitiesClient.new(self)
|
173
|
-
@api_keys = ApiKeysClient.new(self)
|
174
|
-
@app_enrollments = AppEnrollmentsClient.new(self)
|
175
|
-
@applications = ApplicationsClient.new(self)
|
176
|
-
@attachments = AttachmentsClient.new(self)
|
177
|
-
@code_definitions = CodeDefinitionsClient.new(self)
|
178
|
-
@companies = CompaniesClient.new(self)
|
179
|
-
@contacts = ContactsClient.new(self)
|
180
|
-
@credit_memo_applied = CreditMemoAppliedClient.new(self)
|
181
|
-
@currencies = CurrenciesClient.new(self)
|
182
|
-
@custom_field_definitions = CustomFieldDefinitionsClient.new(self)
|
183
|
-
@custom_field_values = CustomFieldValuesClient.new(self)
|
184
|
-
@definitions = DefinitionsClient.new(self)
|
185
|
-
@emails = EmailsClient.new(self)
|
186
|
-
@financial_account = FinancialAccountClient.new(self)
|
187
|
-
@financial_account_balance_history = FinancialAccountBalanceHistoryClient.new(self)
|
188
|
-
@financial_year_settings = FinancialYearSettingsClient.new(self)
|
189
|
-
@invoice_history = InvoiceHistoryClient.new(self)
|
190
|
-
@invoices = InvoicesClient.new(self)
|
191
|
-
@leads = LeadsClient.new(self)
|
192
|
-
@notes = NotesClient.new(self)
|
193
|
-
@payment_applications = PaymentApplicationsClient.new(self)
|
194
|
-
@payments = PaymentsClient.new(self)
|
195
|
-
@provisioning = ProvisioningClient.new(self)
|
196
|
-
@reports = ReportsClient.new(self)
|
197
|
-
@status = StatusClient.new(self)
|
198
|
-
@sync = SyncClient.new(self)
|
199
|
-
@user_accounts = UserAccountsClient.new(self)
|
200
|
-
@user_roles = UserRolesClient.new(self)
|
201
|
-
@webhooks = WebhooksClient.new(self)
|
202
|
-
end
|
203
|
-
|
204
|
-
##
|
205
|
-
# Configure this API client to use API key authentication
|
206
|
-
#
|
207
|
-
# Authentication is either via [Lockstep Platform API key](https://developer.lockstep.io/docs/api-keys) or [JWT Bearer Token](https://developer.lockstep.io/docs/jwt-bearer-tokens)
|
208
|
-
#
|
209
|
-
# @param api_key [string] The API Key to use for authentication
|
210
|
-
def with_api_key(api_key)
|
211
|
-
@bearer_token = nil
|
212
|
-
@api_key = api_key
|
213
|
-
end
|
214
|
-
|
215
|
-
##
|
216
|
-
# Configure this API client to use JWT Bearer Token authentication
|
217
|
-
#
|
218
|
-
# Authentication is either via [Lockstep Platform API key](https://developer.lockstep.io/docs/api-keys) or [JWT Bearer Token](https://developer.lockstep.io/docs/jwt-bearer-tokens)
|
219
|
-
#
|
220
|
-
# @param bearer_token [string] The Bearer Token to use for authentication
|
221
|
-
def with_bearer_token(bearer_token)
|
222
|
-
@api_key = nil
|
223
|
-
@bearer_token = bearer_token
|
224
|
-
end
|
225
|
-
|
226
|
-
##
|
227
|
-
# Configure this API to use an application name
|
228
|
-
#
|
229
|
-
# @param app_name [string] The name of the application
|
230
|
-
def with_app_name(app_name)
|
231
|
-
@app_name = app_name
|
232
|
-
end
|
233
|
-
|
234
|
-
##
|
235
|
-
# Send a request to the API and return the results
|
236
|
-
#
|
237
|
-
# Sends a request to the
|
238
|
-
def request(method, path, body, params)
|
239
|
-
|
240
|
-
url = URI(@env + path)
|
241
|
-
if !params.nil?
|
242
|
-
url.query = URI.encode_www_form(params)
|
243
|
-
end
|
244
|
-
|
245
|
-
http = Net::HTTP.new(url.host, url.port)
|
246
|
-
http.use_ssl = true
|
247
|
-
|
248
|
-
request = case method
|
249
|
-
when :get
|
250
|
-
Net::HTTP::Get.new(url)
|
251
|
-
when :post
|
252
|
-
Net::HTTP::Post.new(url)
|
253
|
-
when :patch
|
254
|
-
Net::HTTP::Patch.new(url)
|
255
|
-
when :put
|
256
|
-
Net::HTTP::Put.new(url)
|
257
|
-
when :delete
|
258
|
-
Net::HTTP::Delete.new(url)
|
259
|
-
end
|
260
|
-
|
261
|
-
# Set headers and body for request
|
262
|
-
request["Accept"] = 'application/json'
|
263
|
-
request["Content-Type"] = 'application/*+json'
|
264
|
-
request["SdkType"] = 'Ruby'
|
265
|
-
request["SdkVersion"] = '2022.14.30.0'
|
266
|
-
request["MachineName"] = Socket.gethostname
|
267
|
-
request.body = body
|
268
|
-
|
269
|
-
# If there is an application name
|
270
|
-
if @app_name != nil
|
271
|
-
request["ApplicationName"] = @app_name
|
272
|
-
end
|
273
|
-
|
274
|
-
# Which authentication are we using?
|
275
|
-
if @api_key != nil
|
276
|
-
request["Api-Key"] = @api_key
|
277
|
-
end
|
278
|
-
if @bearer_token != nil
|
279
|
-
request["Authorization"] = 'Bearer ' + @bearer_token
|
280
|
-
end
|
281
|
-
|
282
|
-
# Send the request
|
283
|
-
response = http.request(request)
|
284
|
-
response.read_body
|
285
|
-
end
|
286
|
-
end
|
287
|
-
end
|