lockstep_sdk 2022.13.29.0 → 2022.14.30.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.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/lib/LockstepSdk/lockstep_api.rb +287 -0
  3. data/lib/lockstep_sdk/clients/activities_client.rb +13 -15
  4. data/lib/lockstep_sdk/clients/api_keys_client.rb +10 -12
  5. data/lib/lockstep_sdk/clients/app_enrollments_client.rb +12 -14
  6. data/lib/lockstep_sdk/clients/applications_client.rb +11 -13
  7. data/lib/lockstep_sdk/clients/attachments_client.rb +13 -15
  8. data/lib/lockstep_sdk/clients/code_definitions_client.rb +8 -10
  9. data/lib/lockstep_sdk/clients/companies_client.rb +13 -15
  10. data/lib/lockstep_sdk/clients/contacts_client.rb +11 -13
  11. data/lib/lockstep_sdk/clients/credit_memo_applied_client.rb +11 -13
  12. data/lib/lockstep_sdk/clients/currencies_client.rb +8 -10
  13. data/lib/lockstep_sdk/clients/custom_field_definitions_client.rb +11 -13
  14. data/lib/lockstep_sdk/clients/custom_field_values_client.rb +11 -13
  15. data/lib/lockstep_sdk/clients/definitions_client.rb +10 -12
  16. data/lib/lockstep_sdk/clients/emails_client.rb +12 -14
  17. data/lib/lockstep_sdk/clients/financial_account_balance_history_client.rb +11 -13
  18. data/lib/lockstep_sdk/clients/financial_account_client.rb +11 -13
  19. data/lib/lockstep_sdk/clients/financial_year_settings_client.rb +11 -13
  20. data/lib/lockstep_sdk/clients/invoice_history_client.rb +8 -10
  21. data/lib/lockstep_sdk/clients/invoices_client.rb +14 -16
  22. data/lib/lockstep_sdk/clients/leads_client.rb +7 -9
  23. data/lib/lockstep_sdk/clients/notes_client.rb +10 -12
  24. data/lib/lockstep_sdk/clients/payment_applications_client.rb +11 -13
  25. data/lib/lockstep_sdk/clients/payments_client.rb +15 -17
  26. data/lib/lockstep_sdk/clients/provisioning_client.rb +9 -11
  27. data/lib/lockstep_sdk/clients/reports_client.rb +31 -17
  28. data/lib/lockstep_sdk/clients/status_client.rb +8 -10
  29. data/lib/lockstep_sdk/clients/sync_client.rb +13 -15
  30. data/lib/lockstep_sdk/clients/user_accounts_client.rb +14 -16
  31. data/lib/lockstep_sdk/clients/user_roles_client.rb +8 -10
  32. data/lib/lockstep_sdk/clients/webhooks_client.rb +13 -15
  33. data/lib/lockstep_sdk/lockstep_api.rb +9 -10
  34. data/lib/lockstep_sdk/models/activity_model.rb +2 -4
  35. data/lib/lockstep_sdk/models/activity_stream_item_model.rb +2 -4
  36. data/lib/lockstep_sdk/models/activity_xref_model.rb +2 -4
  37. data/lib/lockstep_sdk/models/aging_model.rb +2 -4
  38. data/lib/lockstep_sdk/models/api_key_model.rb +2 -4
  39. data/lib/lockstep_sdk/models/app_enrollment_custom_field_model.rb +2 -4
  40. data/lib/lockstep_sdk/models/app_enrollment_model.rb +2 -4
  41. data/lib/lockstep_sdk/models/application_model.rb +2 -4
  42. data/lib/lockstep_sdk/models/ar_aging_header_info_model.rb +2 -4
  43. data/lib/lockstep_sdk/models/ar_header_info_model.rb +2 -4
  44. data/lib/lockstep_sdk/models/at_risk_invoice_summary_model.rb +2 -4
  45. data/lib/lockstep_sdk/models/attachment_header_info_model.rb +2 -4
  46. data/lib/lockstep_sdk/models/attachment_model.rb +2 -4
  47. data/lib/lockstep_sdk/models/batch_sync_model.rb +2 -4
  48. data/lib/lockstep_sdk/models/bulk_currency_conversion_model.rb +2 -4
  49. data/lib/lockstep_sdk/models/cashflow_report_model.rb +2 -4
  50. data/lib/lockstep_sdk/models/code_definition_model.rb +2 -4
  51. data/lib/lockstep_sdk/models/company_model.rb +2 -4
  52. data/lib/lockstep_sdk/models/company_sync_model.rb +2 -4
  53. data/lib/lockstep_sdk/models/connector_info_model.rb +2 -4
  54. data/lib/lockstep_sdk/models/contact_model.rb +2 -4
  55. data/lib/lockstep_sdk/models/contact_sync_model.rb +2 -4
  56. data/lib/lockstep_sdk/models/country_model.rb +2 -4
  57. data/lib/lockstep_sdk/models/credit_memo_applied_model.rb +2 -4
  58. data/lib/lockstep_sdk/models/credit_memo_applied_sync_model.rb +2 -4
  59. data/lib/lockstep_sdk/models/credit_memo_invoice_model.rb +2 -4
  60. data/lib/lockstep_sdk/models/currency_model.rb +2 -4
  61. data/lib/lockstep_sdk/models/currency_rate_model.rb +2 -4
  62. data/lib/lockstep_sdk/models/custom_field_definition_model.rb +2 -4
  63. data/lib/lockstep_sdk/models/custom_field_sync_model.rb +2 -4
  64. data/lib/lockstep_sdk/models/custom_field_value_model.rb +2 -4
  65. data/lib/lockstep_sdk/models/customer_details_model.rb +2 -4
  66. data/lib/lockstep_sdk/models/customer_details_payment_model.rb +2 -4
  67. data/lib/lockstep_sdk/models/customer_summary_model.rb +2 -4
  68. data/lib/lockstep_sdk/models/daily_sales_outstanding_report_model.rb +2 -4
  69. data/lib/lockstep_sdk/models/developer_account_submit_model.rb +2 -4
  70. data/lib/lockstep_sdk/models/email_model.rb +2 -4
  71. data/lib/lockstep_sdk/models/erp_info_model.rb +2 -4
  72. data/lib/lockstep_sdk/models/erp_model.rb +2 -4
  73. data/lib/lockstep_sdk/models/financial_account_balance_history_model.rb +2 -4
  74. data/lib/lockstep_sdk/models/financial_account_model.rb +2 -4
  75. data/lib/lockstep_sdk/models/financial_report_cell_model.rb +2 -4
  76. data/lib/lockstep_sdk/models/financial_report_model.rb +2 -4
  77. data/lib/lockstep_sdk/models/financial_report_row_model.rb +2 -4
  78. data/lib/lockstep_sdk/models/financial_year_setting_model.rb +2 -4
  79. data/lib/lockstep_sdk/models/invite_data_model.rb +2 -4
  80. data/lib/lockstep_sdk/models/invite_model.rb +2 -4
  81. data/lib/lockstep_sdk/models/invite_submit_model.rb +2 -4
  82. data/lib/lockstep_sdk/models/invoice_address_model.rb +2 -4
  83. data/lib/lockstep_sdk/models/invoice_history_model.rb +2 -4
  84. data/lib/lockstep_sdk/models/invoice_line_model.rb +2 -4
  85. data/lib/lockstep_sdk/models/invoice_line_sync_model.rb +2 -4
  86. data/lib/lockstep_sdk/models/invoice_model.rb +2 -4
  87. data/lib/lockstep_sdk/models/invoice_payment_detail_model.rb +2 -4
  88. data/lib/lockstep_sdk/models/invoice_summary_model.rb +2 -4
  89. data/lib/lockstep_sdk/models/invoice_sync_model.rb +2 -4
  90. data/lib/lockstep_sdk/models/lead_model.rb +2 -4
  91. data/lib/lockstep_sdk/models/note_model.rb +2 -4
  92. data/lib/lockstep_sdk/models/payment_applied_model.rb +2 -4
  93. data/lib/lockstep_sdk/models/payment_applied_sync_model.rb +2 -4
  94. data/lib/lockstep_sdk/models/payment_detail_header_model.rb +2 -4
  95. data/lib/lockstep_sdk/models/payment_detail_model.rb +2 -4
  96. data/lib/lockstep_sdk/models/payment_model.rb +2 -4
  97. data/lib/lockstep_sdk/models/payment_summary_model.rb +2 -4
  98. data/lib/lockstep_sdk/models/payment_sync_model.rb +2 -4
  99. data/lib/lockstep_sdk/models/provisioning_finalize_request_model.rb +2 -4
  100. data/lib/lockstep_sdk/models/provisioning_model.rb +2 -4
  101. data/lib/lockstep_sdk/models/provisioning_response_model.rb +2 -4
  102. data/lib/lockstep_sdk/models/risk_rate_model.rb +2 -4
  103. data/lib/lockstep_sdk/models/state_model.rb +2 -4
  104. data/lib/lockstep_sdk/models/status_model.rb +2 -4
  105. data/lib/lockstep_sdk/models/sync_entity_result_model.rb +2 -4
  106. data/lib/lockstep_sdk/models/sync_request_model.rb +2 -4
  107. data/lib/lockstep_sdk/models/sync_submit_model.rb +2 -4
  108. data/lib/lockstep_sdk/models/transfer_owner_model.rb +2 -4
  109. data/lib/lockstep_sdk/models/transfer_owner_submit_model.rb +2 -4
  110. data/lib/lockstep_sdk/models/uri_model.rb +2 -4
  111. data/lib/lockstep_sdk/models/user_account_model.rb +2 -4
  112. data/lib/lockstep_sdk/models/user_role_model.rb +2 -4
  113. data/lib/lockstep_sdk/models/webhook_history_table_storage_model.rb +2 -4
  114. data/lib/lockstep_sdk/models/webhook_model.rb +2 -4
  115. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4bc0a65679a4df117c520820d1c94e5db5995b9dca57cc833e66d5e89903d87b
4
- data.tar.gz: 182dd8d32fb0cf77b9bcb080bc2a66a0aace3bfb2685c9f33cd72005e341d495
3
+ metadata.gz: ddabc9b518b210ddca37c92a960c90ca21a66089d16b914fc350bef2bdf212af
4
+ data.tar.gz: 9e3749fee84c3601176781e6b27ee9d40baf5a29cfd4f4ca61ad3b6b25d8b6c1
5
5
  SHA512:
6
- metadata.gz: 7f4e2f25b8e60dfecaa2fa0d6e481c382e6c6ecb7e3d3606b0d45ae2fbe06512e1b8107b0efe77db92f8a6bed0cffeb47cbd9280a46afdffcffc7416eb73c3f0
7
- data.tar.gz: 6e73e85365d843e4b6222101d768d273635371b131485d53315d769a24b171acb4cf3028e1617d457deaa35841f7d57b4b7b3932b2bebd5db8933b1f0e2aa8c5
6
+ metadata.gz: 37d4b9c701f44f46d1a753726b3a346f5c4585b1ab5778f1738eca741102e1cae5e7f56dbf47a020949ce110118a726ebeca0d7829ec434cdd097707d9ee2cc5
7
+ data.tar.gz: 49d36d2a323d269ce421335f788cf5fb84af268102e4dc36244ddadb60b8fbeefbe78ce1b4656e4a5d4d1e35b45cdec839569b0844de781cda829a4efcb42b6c
@@ -0,0 +1,287 @@
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
@@ -1,14 +1,12 @@
1
1
  #
2
- # Lockstep Software Development Kit for Ruby
2
+ # Lockstep Platform SDK for Ruby
3
3
  #
4
4
  # (c) 2021-2022 Lockstep, Inc.
5
5
  #
6
6
  # For the full copyright and license information, please view the LICENSE
7
7
  # file that was distributed with this source code.
8
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>
9
+ # @author Lockstep Network <support@lockstep.io>
12
10
  # @copyright 2021-2022 Lockstep, Inc.
13
11
  # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
14
12
  #
@@ -19,10 +17,10 @@ require 'awrence'
19
17
  class ActivitiesClient
20
18
 
21
19
  ##
22
- # Initialize the ActivitiesClient class with a lockstepsdk instance.
23
- # @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
24
- def initialize(lockstepsdk)
25
- @lockstepsdk = lockstepsdk
20
+ # Initialize the ActivitiesClient class with an API client instance.
21
+ # @param connection [LockstepApi] The API client object for this connection
22
+ def initialize(connection)
23
+ @connection = connection
26
24
  end
27
25
 
28
26
 
@@ -36,7 +34,7 @@ class ActivitiesClient
36
34
  def retrieve_activity(id:, include_param:)
37
35
  path = "/api/v1/Activities/#{id}"
38
36
  params = {:include => include_param}
39
- @lockstepsdk.request(:get, path, nil, params)
37
+ @connection.request(:get, path, nil, params)
40
38
  end
41
39
 
42
40
  ##
@@ -50,7 +48,7 @@ class ActivitiesClient
50
48
  # @param body [object] A list of changes to apply to this Activity
51
49
  def update_activity(id:, body:)
52
50
  path = "/api/v1/Activities/#{id}"
53
- @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
51
+ @connection.request(:patch, path, body.to_camelback_keys.to_json, nil)
54
52
  end
55
53
 
56
54
  ##
@@ -61,7 +59,7 @@ class ActivitiesClient
61
59
  # @param id [uuid] The unique Lockstep Platform ID number of the Activity to delete
62
60
  def delete_activity(id:)
63
61
  path = "/api/v1/Activities/#{id}"
64
- @lockstepsdk.request(:delete, path, nil, nil)
62
+ @connection.request(:delete, path, nil, nil)
65
63
  end
66
64
 
67
65
  ##
@@ -72,7 +70,7 @@ class ActivitiesClient
72
70
  # @param body [ActivityModel] The Activities to create
73
71
  def create_activities(body:)
74
72
  path = "/api/v1/Activities"
75
- @lockstepsdk.request(:post, path, body, nil)
73
+ @connection.request(:post, path, body, nil)
76
74
  end
77
75
 
78
76
  ##
@@ -90,7 +88,7 @@ class ActivitiesClient
90
88
  def query_activities(filter:, include_param:, order:, page_size:, page_number:)
91
89
  path = "/api/v1/Activities/query"
92
90
  params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
93
- @lockstepsdk.request(:get, path, nil, params)
91
+ @connection.request(:get, path, nil, params)
94
92
  end
95
93
 
96
94
  ##
@@ -101,7 +99,7 @@ class ActivitiesClient
101
99
  # @param id [uuid] The unique Lockstep Platform ID number of this Activity
102
100
  def retrieve_activity_stream(id:)
103
101
  path = "/api/v1/Activities/#{id}/stream"
104
- @lockstepsdk.request(:get, path, nil, nil)
102
+ @connection.request(:get, path, nil, nil)
105
103
  end
106
104
 
107
105
  ##
@@ -113,6 +111,6 @@ class ActivitiesClient
113
111
  # @param user_id [uuid]
114
112
  def forward_activity(activity_id:, user_id:)
115
113
  path = "/api/v1/Activities/#{activityId}/forward/#{userId}"
116
- @lockstepsdk.request(:post, path, nil, nil)
114
+ @connection.request(:post, path, nil, nil)
117
115
  end
118
116
  end
@@ -1,14 +1,12 @@
1
1
  #
2
- # Lockstep Software Development Kit for Ruby
2
+ # Lockstep Platform SDK for Ruby
3
3
  #
4
4
  # (c) 2021-2022 Lockstep, Inc.
5
5
  #
6
6
  # For the full copyright and license information, please view the LICENSE
7
7
  # file that was distributed with this source code.
8
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>
9
+ # @author Lockstep Network <support@lockstep.io>
12
10
  # @copyright 2021-2022 Lockstep, Inc.
13
11
  # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
14
12
  #
@@ -19,10 +17,10 @@ require 'awrence'
19
17
  class ApiKeysClient
20
18
 
21
19
  ##
22
- # Initialize the ApiKeysClient class with a lockstepsdk instance.
23
- # @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
24
- def initialize(lockstepsdk)
25
- @lockstepsdk = lockstepsdk
20
+ # Initialize the ApiKeysClient class with an API client instance.
21
+ # @param connection [LockstepApi] The API client object for this connection
22
+ def initialize(connection)
23
+ @connection = connection
26
24
  end
27
25
 
28
26
 
@@ -38,7 +36,7 @@ class ApiKeysClient
38
36
  def retrieve_api_key(id:, include_param:)
39
37
  path = "/api/v1/ApiKeys/#{id}"
40
38
  params = {:include => include_param}
41
- @lockstepsdk.request(:get, path, nil, params)
39
+ @connection.request(:get, path, nil, params)
42
40
  end
43
41
 
44
42
  ##
@@ -53,7 +51,7 @@ class ApiKeysClient
53
51
  # @param id [uuid] The unique Lockstep Platform ID number of this API Key
54
52
  def revoke_api_key(id:)
55
53
  path = "/api/v1/ApiKeys/#{id}"
56
- @lockstepsdk.request(:delete, path, nil, nil)
54
+ @connection.request(:delete, path, nil, nil)
57
55
  end
58
56
 
59
57
  ##
@@ -66,7 +64,7 @@ class ApiKeysClient
66
64
  # @param body [ApiKeyModel] Metadata about the API Key to create.
67
65
  def create_api_key(body:)
68
66
  path = "/api/v1/ApiKeys"
69
- @lockstepsdk.request(:post, path, body, nil)
67
+ @connection.request(:post, path, body, nil)
70
68
  end
71
69
 
72
70
  ##
@@ -84,6 +82,6 @@ class ApiKeysClient
84
82
  def query_api_keys(filter:, include_param:, order:, page_size:, page_number:)
85
83
  path = "/api/v1/ApiKeys/query"
86
84
  params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
87
- @lockstepsdk.request(:get, path, nil, params)
85
+ @connection.request(:get, path, nil, params)
88
86
  end
89
87
  end
@@ -1,14 +1,12 @@
1
1
  #
2
- # Lockstep Software Development Kit for Ruby
2
+ # Lockstep Platform SDK for Ruby
3
3
  #
4
4
  # (c) 2021-2022 Lockstep, Inc.
5
5
  #
6
6
  # For the full copyright and license information, please view the LICENSE
7
7
  # file that was distributed with this source code.
8
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>
9
+ # @author Lockstep Network <support@lockstep.io>
12
10
  # @copyright 2021-2022 Lockstep, Inc.
13
11
  # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
14
12
  #
@@ -19,10 +17,10 @@ require 'awrence'
19
17
  class AppEnrollmentsClient
20
18
 
21
19
  ##
22
- # Initialize the AppEnrollmentsClient class with a lockstepsdk instance.
23
- # @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
24
- def initialize(lockstepsdk)
25
- @lockstepsdk = lockstepsdk
20
+ # Initialize the AppEnrollmentsClient class with an API client instance.
21
+ # @param connection [LockstepApi] The API client object for this connection
22
+ def initialize(connection)
23
+ @connection = connection
26
24
  end
27
25
 
28
26
 
@@ -38,7 +36,7 @@ class AppEnrollmentsClient
38
36
  def retrieve_app_enrollment(id:, include_param:)
39
37
  path = "/api/v1/AppEnrollments/#{id}"
40
38
  params = {:include => include_param}
41
- @lockstepsdk.request(:get, path, nil, params)
39
+ @connection.request(:get, path, nil, params)
42
40
  end
43
41
 
44
42
  ##
@@ -54,7 +52,7 @@ class AppEnrollmentsClient
54
52
  # @param body [object] A list of changes to apply to this App Enrollment
55
53
  def update_app_enrollment(id:, body:)
56
54
  path = "/api/v1/AppEnrollments/#{id}"
57
- @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
55
+ @connection.request(:patch, path, body.to_camelback_keys.to_json, nil)
58
56
  end
59
57
 
60
58
  ##
@@ -67,7 +65,7 @@ class AppEnrollmentsClient
67
65
  def delete_app_enrollment(id:, remove_enrollment_data:)
68
66
  path = "/api/v1/AppEnrollments/#{id}"
69
67
  params = {:removeEnrollmentData => remove_enrollment_data}
70
- @lockstepsdk.request(:delete, path, nil, params)
68
+ @connection.request(:delete, path, nil, params)
71
69
  end
72
70
 
73
71
  ##
@@ -80,7 +78,7 @@ class AppEnrollmentsClient
80
78
  # @param body [AppEnrollmentModel] The App Enrollments to create
81
79
  def create_app_enrollments(body:)
82
80
  path = "/api/v1/AppEnrollments"
83
- @lockstepsdk.request(:post, path, body, nil)
81
+ @connection.request(:post, path, body, nil)
84
82
  end
85
83
 
86
84
  ##
@@ -100,7 +98,7 @@ class AppEnrollmentsClient
100
98
  def query_app_enrollments(filter:, include_param:, order:, page_size:, page_number:)
101
99
  path = "/api/v1/AppEnrollments/query"
102
100
  params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
103
- @lockstepsdk.request(:get, path, nil, params)
101
+ @connection.request(:get, path, nil, params)
104
102
  end
105
103
 
106
104
  ##
@@ -115,6 +113,6 @@ class AppEnrollmentsClient
115
113
  # @param id [uuid] The unique ID number of the App Enrollment for which we retrieve custom fields
116
114
  def query_enrollment_fields(id:)
117
115
  path = "/api/v1/AppEnrollments/settings/#{id}"
118
- @lockstepsdk.request(:get, path, nil, nil)
116
+ @connection.request(:get, path, nil, nil)
119
117
  end
120
118
  end
@@ -1,14 +1,12 @@
1
1
  #
2
- # Lockstep Software Development Kit for Ruby
2
+ # Lockstep Platform SDK for Ruby
3
3
  #
4
4
  # (c) 2021-2022 Lockstep, Inc.
5
5
  #
6
6
  # For the full copyright and license information, please view the LICENSE
7
7
  # file that was distributed with this source code.
8
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>
9
+ # @author Lockstep Network <support@lockstep.io>
12
10
  # @copyright 2021-2022 Lockstep, Inc.
13
11
  # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
14
12
  #
@@ -19,10 +17,10 @@ require 'awrence'
19
17
  class ApplicationsClient
20
18
 
21
19
  ##
22
- # Initialize the ApplicationsClient class with a lockstepsdk instance.
23
- # @param lockstepsdk [LockstepApi] The Lockstep API client object for this connection
24
- def initialize(lockstepsdk)
25
- @lockstepsdk = lockstepsdk
20
+ # Initialize the ApplicationsClient class with an API client instance.
21
+ # @param connection [LockstepApi] The API client object for this connection
22
+ def initialize(connection)
23
+ @connection = connection
26
24
  end
27
25
 
28
26
 
@@ -38,7 +36,7 @@ class ApplicationsClient
38
36
  def retrieve_application(id:, include_param:)
39
37
  path = "/api/v1/Applications/#{id}"
40
38
  params = {:include => include_param}
41
- @lockstepsdk.request(:get, path, nil, params)
39
+ @connection.request(:get, path, nil, params)
42
40
  end
43
41
 
44
42
  ##
@@ -54,7 +52,7 @@ class ApplicationsClient
54
52
  # @param body [object] A list of changes to apply to this Application
55
53
  def update_application(id:, body:)
56
54
  path = "/api/v1/Applications/#{id}"
57
- @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
55
+ @connection.request(:patch, path, body.to_camelback_keys.to_json, nil)
58
56
  end
59
57
 
60
58
  ##
@@ -67,7 +65,7 @@ class ApplicationsClient
67
65
  # @param id [uuid] The unique ID number of the Application to delete
68
66
  def delete_application(id:)
69
67
  path = "/api/v1/Applications/#{id}"
70
- @lockstepsdk.request(:delete, path, nil, nil)
68
+ @connection.request(:delete, path, nil, nil)
71
69
  end
72
70
 
73
71
  ##
@@ -80,7 +78,7 @@ class ApplicationsClient
80
78
  # @param body [ApplicationModel] The Applications to create
81
79
  def create_applications(body:)
82
80
  path = "/api/v1/Applications"
83
- @lockstepsdk.request(:post, path, body, nil)
81
+ @connection.request(:post, path, body, nil)
84
82
  end
85
83
 
86
84
  ##
@@ -100,6 +98,6 @@ class ApplicationsClient
100
98
  def query_applications(filter:, include_param:, order:, page_size:, page_number:)
101
99
  path = "/api/v1/Applications/query"
102
100
  params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number}
103
- @lockstepsdk.request(:get, path, nil, params)
101
+ @connection.request(:get, path, nil, params)
104
102
  end
105
103
  end