lockstep_sdk 2022.33.14.0 → 2022.37.24.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff91eee944f6ed1299763d2652ae74b4cd0dde8ae9b0df52e682d014f7dc34f9
4
- data.tar.gz: 47ec24af6e5b7282423ca45b5949a677fc5c22064761fb9a646f22aa806db59f
3
+ metadata.gz: fd37da4137c0bf7969030f035d3749ced22345aa218fb2c62cf38e5bca8f4809
4
+ data.tar.gz: b611b8d4ed34dd3efd034d5b8a49b879a6e67a3da822d4a6ca61df7fd81ead45
5
5
  SHA512:
6
- metadata.gz: 9c21ea30bfefb763acf318b3afc43fc087bfdca695e492c1ebde895aa1dbc641c8c058402bc7d26e96ab1eafe66caa34655217441b55f8ca4ca89377e23330c0
7
- data.tar.gz: 13ee2ae0e4a5f5d866f8ba163658e142b9f7bb677dc44250e5b9cebe748e9aae11d5d95943d02d4a7f5f724ebe81e4d1b1d03ea9d6868f98850a3cbff50b85a5
6
+ metadata.gz: 1ba58f7b225be03e33e103eb81f8ace42d5ad60b18daaaee404e7ee88da945c39574207e5fe3459b3476a5f6faa0eacafd630db5c91e807be5774542146bf18d
7
+ data.tar.gz: df5ec2a9657572588d4273daf9aadedf8f69b3502bd7900de6d7dea1212fe8c53396205428e4339a71ea30159ae51e965af526a57995e8f88795031e6b1c0ee6
@@ -84,11 +84,11 @@ class AppEnrollmentsClient
84
84
  end
85
85
 
86
86
  ##
87
- # Updates the OAuth settings associated with this App Enrollment
87
+ # Updates the settings associated with this App Enrollment
88
88
  #
89
89
  # @param id [uuid] The unique ID number of the App Enrollment to reconnect
90
90
  # @param body [AppEnrollmentReconnectRequest] Information to reconnect the App Enrollment
91
- def reconnect_app_enrollment_oauth(id:, body:)
91
+ def reconnect_app_enrollment(id:, body:)
92
92
  path = "/api/v1/AppEnrollments/#{id}/reconnect"
93
93
  @connection.request(:post, path, body, nil)
94
94
  end
@@ -0,0 +1,56 @@
1
+ #
2
+ # Lockstep Platform SDK for Ruby
3
+ #
4
+ # (c) 2021-2022 Lockstep, Inc.
5
+ #
6
+ # For the full copyright and license information, please view the LICENSE
7
+ # file that was distributed with this source code.
8
+ #
9
+ # @author Lockstep Network <support@lockstep.io>
10
+ # @copyright 2021-2022 Lockstep, Inc.
11
+ # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
12
+ #
13
+
14
+
15
+ require 'awrence'
16
+
17
+ class ProfilesClient
18
+
19
+ ##
20
+ # Initialize the ProfilesClient class with an API client instance.
21
+ # @param connection [LockstepApi] The API client object for this connection
22
+ def initialize(connection)
23
+ @connection = connection
24
+ end
25
+
26
+
27
+ ##
28
+ # Retrieves the Public Company Profile specified by the public url slug.
29
+ #
30
+ # A Public Company Profile makes available the following information: <ul><li>Company Name</li><li>Company Logo Url</li><li>Description</li><li>Website</li></ul>
31
+ #
32
+ # @param url_slug [string]
33
+ def retrieve_public_company_profile(url_slug:)
34
+ path = "/api/v1/Profiles/companies/#{urlSlug}"
35
+ @connection.request(:get, path, nil, nil)
36
+ end
37
+
38
+ ##
39
+ # Queries Public Company Profiles
40
+ #
41
+ # 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.
42
+ #
43
+ # A Public Company Profile makes available the following information:
44
+ #
45
+ # <ul><li>Company Name</li><li>Company Logo Url</li><li>Description</li><li>Website</li></ul>
46
+ #
47
+ # @param filter [string] The filter for this query. See [Searchlight Query Language](https://developer.lockstep.io/docs/querying-with-searchlight)
48
+ # @param order [string] The sort order for the results, in the [Searchlight order syntax](https://github.com/tspence/csharp-searchlight).
49
+ # @param page_size [int32] The page size for results (default 200, maximum of 10,000)
50
+ # @param page_number [int32] The page number for results (default 0)
51
+ def query_public_company_profiles(filter:, order:, page_size:, page_number:)
52
+ path = "/api/v1/Profiles/companies/query"
53
+ params = {:filter => filter, :order => order, :pageSize => page_size, :pageNumber => page_number}
54
+ @connection.request(:get, path, nil, params)
55
+ end
56
+ end
@@ -55,7 +55,7 @@ class ReportsClient
55
55
  #
56
56
  # @param report_date [date-time] Optional: Specify the specific report date to generate the from (default UTC now)
57
57
  def daily_sales_outstanding(report_date:)
58
- path = "/api/v1/Reports/dailysalesoutstanding"
58
+ path = "/api/v1/Reports/daily-sales-outstanding"
59
59
  params = {:reportDate => report_date}
60
60
  @connection.request(:get, path, nil, params)
61
61
  end
@@ -108,7 +108,7 @@ class ReportsClient
108
108
  # 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.
109
109
  #
110
110
  def risk_rates()
111
- path = "/api/v1/Reports/riskrates"
111
+ path = "/api/v1/Reports/risk-rates"
112
112
  @connection.request(:get, path, nil, nil)
113
113
  end
114
114
 
@@ -68,7 +68,7 @@ class WebhooksClient
68
68
  #
69
69
  # @param id [uuid] The unique Lockstep Platform ID number of the Webhook to update.
70
70
  def regenerate_client_secret(id:)
71
- path = "/api/v1/Webhooks/#{id}/regenerateclientsecret"
71
+ path = "/api/v1/Webhooks/#{id}/regenerate-client-secret"
72
72
  @connection.request(:patch, path, nil, nil)
73
73
  end
74
74
 
@@ -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.33.14
12
+ # @version 2022.37.24
13
13
  # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
14
14
  #
15
15
 
@@ -128,6 +128,10 @@ module lockstep_sdk
128
128
  # @return [PaymentsClient] Client object for Payments endpoints
129
129
  attr_accessor :payments
130
130
 
131
+ ##
132
+ # @return [ProfilesClient] Client object for Profiles endpoints
133
+ attr_accessor :profiles
134
+
131
135
  ##
132
136
  # @return [ProvisioningClient] Client object for Provisioning endpoints
133
137
  attr_accessor :provisioning
@@ -166,7 +170,7 @@ module lockstep_sdk
166
170
  #
167
171
  # @param env [string] Either "sbx", "prd", or the URI of the server, ending in a slash (/)
168
172
  def initialize(env)
169
- @version = "2022.33.14.0"
173
+ @version = "2022.37.24.0"
170
174
  @env = case env
171
175
  when "sbx"
172
176
  "https://api.sbx.lockstep.io/"
@@ -201,6 +205,7 @@ module lockstep_sdk
201
205
  @notes = NotesClient.new(self)
202
206
  @payment_applications = PaymentApplicationsClient.new(self)
203
207
  @payments = PaymentsClient.new(self)
208
+ @profiles = ProfilesClient.new(self)
204
209
  @provisioning = ProvisioningClient.new(self)
205
210
  @reports = ReportsClient.new(self)
206
211
  @status = StatusClient.new(self)
@@ -272,7 +277,7 @@ module lockstep_sdk
272
277
  request["Accept"] = 'application/json'
273
278
  request["Content-Type"] = 'application/*+json'
274
279
  request["SdkType"] = 'Ruby'
275
- request["SdkVersion"] = '2022.33.14.0'
280
+ request["SdkVersion"] = '2022.37.24.0'
276
281
  request["MachineName"] = Socket.gethostname
277
282
  request.body = body
278
283
 
@@ -24,6 +24,7 @@ module LockstepSdk
24
24
  # Initialize the ApHeaderInfoModel using the provided prototype
25
25
  def initialize(params = {})
26
26
  @group_key = params.dig(:group_key)
27
+ @report_date = params.dig(:report_date)
27
28
  @report_period = params.dig(:report_period)
28
29
  @total_vendors = params.dig(:total_vendors)
29
30
  @total_bills = params.dig(:total_bills)
@@ -55,6 +56,10 @@ module LockstepSdk
55
56
  # @return [Uuid] The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
56
57
  attr_accessor :group_key
57
58
 
59
+ ##
60
+ # @return [Date-time] The date of the report
61
+ attr_accessor :report_date
62
+
58
63
  ##
59
64
  # @return [Date-time] The date of the report
60
65
  attr_accessor :report_period
@@ -160,6 +165,7 @@ module LockstepSdk
160
165
  def as_json(options={})
161
166
  {
162
167
  'groupKey' => @group_key,
168
+ 'reportDate' => @report_date,
163
169
  'reportPeriod' => @report_period,
164
170
  'totalVendors' => @total_vendors,
165
171
  'totalBills' => @total_bills,
@@ -24,17 +24,41 @@ module LockstepSdk
24
24
  # Initialize the AppEnrollmentReconnectRequest using the provided prototype
25
25
  def initialize(params = {})
26
26
  @auth_code = params.dig(:auth_code)
27
+ @username = params.dig(:username)
28
+ @password = params.dig(:password)
29
+ @token_id = params.dig(:token_id)
30
+ @token_secret = params.dig(:token_secret)
27
31
  end
28
32
 
29
33
  ##
30
34
  # @return [String] The OAuth authentication code.
31
35
  attr_accessor :auth_code
32
36
 
37
+ ##
38
+ # @return [String] The OAuth authentication code.
39
+ attr_accessor :username
40
+
41
+ ##
42
+ # @return [String] The password for the web services account with access permissions.
43
+ attr_accessor :password
44
+
45
+ ##
46
+ # @return [String] The access token id for the connector enrollment.
47
+ attr_accessor :token_id
48
+
49
+ ##
50
+ # @return [String] The access token secret for the connector enrollment.
51
+ attr_accessor :token_secret
52
+
33
53
  ##
34
54
  # @return [object] This object as a JSON key-value structure
35
55
  def as_json(options={})
36
56
  {
37
57
  'authCode' => @auth_code,
58
+ 'username' => @username,
59
+ 'password' => @password,
60
+ 'tokenId' => @token_id,
61
+ 'tokenSecret' => @token_secret,
38
62
  }
39
63
  end
40
64
 
@@ -46,6 +46,7 @@ module LockstepSdk
46
46
  @is_active = params.dig(:is_active)
47
47
  @wiki_url = params.dig(:wiki_url)
48
48
  @group_key = params.dig(:group_key)
49
+ @b2_cclient_id = params.dig(:b2_cclient_id)
49
50
  @notes = params.dig(:notes)
50
51
  @attachments = params.dig(:attachments)
51
52
  @custom_field_definitions = params.dig(:custom_field_definitions)
@@ -112,6 +113,10 @@ module LockstepSdk
112
113
  # @return [Uuid] The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
113
114
  attr_accessor :group_key
114
115
 
116
+ ##
117
+ # @return [Uuid] The B2C Client ID of the application
118
+ attr_accessor :b2_cclient_id
119
+
115
120
  ##
116
121
  # @return [NoteModel] A collection of notes linked to this record. To retrieve this collection, specify `Notes` in the `include` parameter when retrieving data. To create a note, use the [Create Note](https://developer.lockstep.io/reference/post_api-v1-notes) endpoint with the `TableKey` to `Application` and the `ObjectKey` set to the `ApplicationId` for this record. For more information on extensibility, see [linking extensible metadata to objects](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
117
122
  attr_accessor :notes
@@ -147,6 +152,7 @@ module LockstepSdk
147
152
  'isActive' => @is_active,
148
153
  'wikiURL' => @wiki_url,
149
154
  'groupKey' => @group_key,
155
+ 'b2CClientId' => @b2_cclient_id,
150
156
  'notes' => @notes,
151
157
  'attachments' => @attachments,
152
158
  'customFieldDefinitions' => @custom_field_definitions,
@@ -24,6 +24,7 @@ module LockstepSdk
24
24
  # Initialize the ArHeaderInfoModel using the provided prototype
25
25
  def initialize(params = {})
26
26
  @group_key = params.dig(:group_key)
27
+ @report_date = params.dig(:report_date)
27
28
  @report_period = params.dig(:report_period)
28
29
  @total_customers = params.dig(:total_customers)
29
30
  @total_invoices = params.dig(:total_invoices)
@@ -58,6 +59,10 @@ module LockstepSdk
58
59
 
59
60
  ##
60
61
  # @return [Date] The date of the report
62
+ attr_accessor :report_date
63
+
64
+ ##
65
+ # @return [String] The date of the report
61
66
  attr_accessor :report_period
62
67
 
63
68
  ##
@@ -165,6 +170,7 @@ module LockstepSdk
165
170
  def as_json(options={})
166
171
  {
167
172
  'groupKey' => @group_key,
173
+ 'reportDate' => @report_date,
168
174
  'reportPeriod' => @report_period,
169
175
  'totalCustomers' => @total_customers,
170
176
  'totalInvoices' => @total_invoices,
@@ -65,6 +65,7 @@ module LockstepSdk
65
65
  @website = params.dig(:website)
66
66
  @app_enrollment_id = params.dig(:app_enrollment_id)
67
67
  @email_address = params.dig(:email_address)
68
+ @public_url_slug = params.dig(:public_url_slug)
68
69
  @notes = params.dig(:notes)
69
70
  @attachments = params.dig(:attachments)
70
71
  @contacts = params.dig(:contacts)
@@ -226,6 +227,10 @@ module LockstepSdk
226
227
  # @return [Email] Company Email Address
227
228
  attr_accessor :email_address
228
229
 
230
+ ##
231
+ # @return [String] The public url slug for the Company.
232
+ attr_accessor :public_url_slug
233
+
229
234
  ##
230
235
  # @return [NoteModel] A collection of notes linked to this record. To retrieve this collection, specify `Notes` in the `include` parameter when retrieving data. To create a note, use the [Create Note](https://developer.lockstep.io/reference/post_api-v1-notes) endpoint with the `TableKey` to `Company` and the `ObjectKey` set to the `CompanyId` for this record. For more information on extensibility, see [linking extensible metadata to objects](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
231
236
  attr_accessor :notes
@@ -296,6 +301,7 @@ module LockstepSdk
296
301
  'website' => @website,
297
302
  'appEnrollmentId' => @app_enrollment_id,
298
303
  'emailAddress' => @email_address,
304
+ 'publicUrlSlug' => @public_url_slug,
299
305
  'notes' => @notes,
300
306
  'attachments' => @attachments,
301
307
  'contacts' => @contacts,
@@ -0,0 +1,77 @@
1
+ #
2
+ # Lockstep Platform SDK for Ruby
3
+ #
4
+ # (c) 2021-2022 Lockstep, Inc.
5
+ #
6
+ # For the full copyright and license information, please view the LICENSE
7
+ # file that was distributed with this source code.
8
+ #
9
+ # @author Lockstep Network <support@lockstep.io>
10
+ # @copyright 2021-2022 Lockstep, Inc.
11
+ # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
12
+ #
13
+
14
+
15
+ require 'json'
16
+
17
+ module LockstepSdk
18
+
19
+ ##
20
+ # Contains Public Company Profile data.
21
+ class PublicCompanyProfileModel
22
+
23
+ ##
24
+ # Initialize the PublicCompanyProfileModel using the provided prototype
25
+ def initialize(params = {})
26
+ @company_id = params.dig(:company_id)
27
+ @company_name = params.dig(:company_name)
28
+ @company_logo_url = params.dig(:company_logo_url)
29
+ @website = params.dig(:website)
30
+ @description = params.dig(:description)
31
+ @public_url_slug = params.dig(:public_url_slug)
32
+ end
33
+
34
+ ##
35
+ # @return [Uuid] The unique ID of the company associated with this profile.
36
+ attr_accessor :company_id
37
+
38
+ ##
39
+ # @return [String] The short name of the company associated with this profile.
40
+ attr_accessor :company_name
41
+
42
+ ##
43
+ # @return [String] The URL of this company's logo, if known.
44
+ attr_accessor :company_logo_url
45
+
46
+ ##
47
+ # @return [String] Website URL for the company associated with this profile.
48
+ attr_accessor :website
49
+
50
+ ##
51
+ # @return [String] Description of the company associated with this profile.
52
+ attr_accessor :description
53
+
54
+ ##
55
+ # @return [String] The public url slug for this Public Company Profile.
56
+ attr_accessor :public_url_slug
57
+
58
+ ##
59
+ # @return [object] This object as a JSON key-value structure
60
+ def as_json(options={})
61
+ {
62
+ 'companyId' => @company_id,
63
+ 'companyName' => @company_name,
64
+ 'companyLogoUrl' => @company_logo_url,
65
+ 'website' => @website,
66
+ 'description' => @description,
67
+ 'publicUrlSlug' => @public_url_slug,
68
+ }
69
+ end
70
+
71
+ ##
72
+ # @return [String] This object converted to a JSON string
73
+ def to_json(*options)
74
+ "[#{as_json(*options).to_json(*options)}]"
75
+ end
76
+ end
77
+ end
@@ -25,6 +25,7 @@ module LockstepSdk
25
25
  def initialize(params = {})
26
26
  @group_key = params.dig(:group_key)
27
27
  @report_period = params.dig(:report_period)
28
+ @report_date = params.dig(:report_date)
28
29
  @invoice_month_name = params.dig(:invoice_month_name)
29
30
  @total_invoice_count = params.dig(:total_invoice_count)
30
31
  @total_invoice_amount = params.dig(:total_invoice_amount)
@@ -42,6 +43,10 @@ module LockstepSdk
42
43
  # @return [Date-time] The month the risk rate was calculated for
43
44
  attr_accessor :report_period
44
45
 
46
+ ##
47
+ # @return [Date-time] The month the risk rate was calculated for
48
+ attr_accessor :report_date
49
+
45
50
  ##
46
51
  # @return [String] The string name of the month the risk rate was calculated for
47
52
  attr_accessor :invoice_month_name
@@ -76,6 +81,7 @@ module LockstepSdk
76
81
  {
77
82
  'groupKey' => @group_key,
78
83
  'reportPeriod' => @report_period,
84
+ 'reportDate' => @report_date,
79
85
  'invoiceMonthName' => @invoice_month_name,
80
86
  'totalInvoiceCount' => @total_invoice_count,
81
87
  'totalInvoiceAmount' => @total_invoice_amount,
@@ -1,3 +1,3 @@
1
1
  module LockstepSdk
2
- VERSION = "2022.33.14.0"
2
+ VERSION = "2022.37.24.0"
3
3
  end
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.33.14.0
4
+ version: 2022.37.24.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-08-18 00:00:00.000000000 Z
11
+ date: 2022-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awrence
@@ -56,6 +56,7 @@ files:
56
56
  - lib/lockstep_sdk/clients/notes_client.rb
57
57
  - lib/lockstep_sdk/clients/payment_applications_client.rb
58
58
  - lib/lockstep_sdk/clients/payments_client.rb
59
+ - lib/lockstep_sdk/clients/profiles_client.rb
59
60
  - lib/lockstep_sdk/clients/provisioning_client.rb
60
61
  - lib/lockstep_sdk/clients/reports_client.rb
61
62
  - lib/lockstep_sdk/clients/status_client.rb
@@ -109,7 +110,6 @@ files:
109
110
  - lib/lockstep_sdk/models/dpo_summary_group_total_model.rb
110
111
  - lib/lockstep_sdk/models/dpo_summary_model.rb
111
112
  - lib/lockstep_sdk/models/email_model.rb
112
- - lib/lockstep_sdk/models/erp_info_model.rb
113
113
  - lib/lockstep_sdk/models/erp_model.rb
114
114
  - lib/lockstep_sdk/models/error_result.rb
115
115
  - lib/lockstep_sdk/models/financial_account_balance_history_model.rb
@@ -146,9 +146,7 @@ files:
146
146
  - lib/lockstep_sdk/models/payment_model.rb
147
147
  - lib/lockstep_sdk/models/payment_summary_model.rb
148
148
  - lib/lockstep_sdk/models/payment_sync_model.rb
149
- - lib/lockstep_sdk/models/provisioning_finalize_request_model.rb
150
- - lib/lockstep_sdk/models/provisioning_model.rb
151
- - lib/lockstep_sdk/models/provisioning_response_model.rb
149
+ - lib/lockstep_sdk/models/public_company_profile_model.rb
152
150
  - lib/lockstep_sdk/models/risk_rate_model.rb
153
151
  - lib/lockstep_sdk/models/state_model.rb
154
152
  - lib/lockstep_sdk/models/status_model.rb
@@ -1,53 +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
- # @copyright 2021-2022 Lockstep, Inc.
11
- # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
12
- #
13
-
14
-
15
- require 'json'
16
-
17
- module LockstepSdk
18
-
19
- ##
20
- # Represents the ERP object sent in a provisioning request
21
- class ErpInfoModel
22
-
23
- ##
24
- # Initialize the ErpInfoModel using the provided prototype
25
- def initialize(params = {})
26
- @app_id = params.dig(:app_id)
27
- @data = params.dig(:data)
28
- end
29
-
30
- ##
31
- # @return [Uuid] The id of the ERP's App
32
- attr_accessor :app_id
33
-
34
- ##
35
- # @return [ConnectorInfoModel] The data required to store for connector access
36
- attr_accessor :data
37
-
38
- ##
39
- # @return [object] This object as a JSON key-value structure
40
- def as_json(options={})
41
- {
42
- 'appId' => @app_id,
43
- 'data' => @data,
44
- }
45
- end
46
-
47
- ##
48
- # @return [String] This object converted to a JSON string
49
- def to_json(*options)
50
- "[#{as_json(*options).to_json(*options)}]"
51
- end
52
- end
53
- end
@@ -1,71 +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
- # @copyright 2021-2022 Lockstep, Inc.
11
- # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
12
- #
13
-
14
-
15
- require 'json'
16
-
17
- module LockstepSdk
18
-
19
- ##
20
- # Represents the data to finalize onboarding for a user
21
- class ProvisioningFinalizeRequestModel
22
-
23
- ##
24
- # Initialize the ProvisioningFinalizeRequestModel using the provided prototype
25
- def initialize(params = {})
26
- @full_name = params.dig(:full_name)
27
- @time_zone = params.dig(:time_zone)
28
- @default_currency = params.dig(:default_currency)
29
- @company = params.dig(:company)
30
- @email_connector = params.dig(:email_connector)
31
- end
32
-
33
- ##
34
- # @return [String] The full name of the user
35
- attr_accessor :full_name
36
-
37
- ##
38
- # @return [String] The time zone of the user
39
- attr_accessor :time_zone
40
-
41
- ##
42
- # @return [String] The default currency of the user
43
- attr_accessor :default_currency
44
-
45
- ##
46
- # @return [CompanyModel] The company information for the user and group
47
- attr_accessor :company
48
-
49
- ##
50
- # @return [ErpInfoModel] Optional connector information needed to enroll user to their email connector
51
- attr_accessor :email_connector
52
-
53
- ##
54
- # @return [object] This object as a JSON key-value structure
55
- def as_json(options={})
56
- {
57
- 'fullName' => @full_name,
58
- 'timeZone' => @time_zone,
59
- 'defaultCurrency' => @default_currency,
60
- 'company' => @company,
61
- 'emailConnector' => @email_connector,
62
- }
63
- end
64
-
65
- ##
66
- # @return [String] This object converted to a JSON string
67
- def to_json(*options)
68
- "[#{as_json(*options).to_json(*options)}]"
69
- end
70
- end
71
- end
@@ -1,53 +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
- # @copyright 2021-2022 Lockstep, Inc.
11
- # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
12
- #
13
-
14
-
15
- require 'json'
16
-
17
- module LockstepSdk
18
-
19
- ##
20
- # Represents the data sent during the onboarding flow
21
- class ProvisioningModel
22
-
23
- ##
24
- # Initialize the ProvisioningModel using the provided prototype
25
- def initialize(params = {})
26
- @full_name = params.dig(:full_name)
27
- @erp = params.dig(:erp)
28
- end
29
-
30
- ##
31
- # @return [String] The full name of the new user
32
- attr_accessor :full_name
33
-
34
- ##
35
- # @return [ErpInfoModel] The information necessary to enroll the user in their ERP
36
- attr_accessor :erp
37
-
38
- ##
39
- # @return [object] This object as a JSON key-value structure
40
- def as_json(options={})
41
- {
42
- 'fullName' => @full_name,
43
- 'erp' => @erp,
44
- }
45
- end
46
-
47
- ##
48
- # @return [String] This object converted to a JSON string
49
- def to_json(*options)
50
- "[#{as_json(*options).to_json(*options)}]"
51
- end
52
- end
53
- end
@@ -1,83 +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
- # @copyright 2021-2022 Lockstep, Inc.
11
- # @link https://github.com/Lockstep-Network/lockstep-sdk-ruby
12
- #
13
-
14
-
15
- require 'json'
16
-
17
- module LockstepSdk
18
-
19
- ##
20
- # Represents the response to either a successful or failed account provisioning
21
- class ProvisioningResponseModel
22
-
23
- ##
24
- # Initialize the ProvisioningResponseModel using the provided prototype
25
- def initialize(params = {})
26
- @user_name = params.dig(:user_name)
27
- @account_name = params.dig(:account_name)
28
- @user_id = params.dig(:user_id)
29
- @group_key = params.dig(:group_key)
30
- @app_enrollment_id = params.dig(:app_enrollment_id)
31
- @sync_request_id = params.dig(:sync_request_id)
32
- @error_message = params.dig(:error_message)
33
- end
34
-
35
- ##
36
- # @return [String] If provisioning is successful, contains the username of the created user.
37
- attr_accessor :user_name
38
-
39
- ##
40
- # @return [String] If provisioning is successful, contains subscription account name of created user.
41
- attr_accessor :account_name
42
-
43
- ##
44
- # @return [Uuid] If provisioning is successful, contains the unique identifier of the created user.
45
- attr_accessor :user_id
46
-
47
- ##
48
- # @return [Uuid] If provisioning is successful, contains the group key of the created user.
49
- attr_accessor :group_key
50
-
51
- ##
52
- # @return [Uuid] If provisioning is successful, contains the app enrollment id of the created app enrollment.
53
- attr_accessor :app_enrollment_id
54
-
55
- ##
56
- # @return [Uuid] if provisioning is successful, contains the sync request id of the sync that was started for the app enrollment.
57
- attr_accessor :sync_request_id
58
-
59
- ##
60
- # @return [String] The error message(s).
61
- attr_accessor :error_message
62
-
63
- ##
64
- # @return [object] This object as a JSON key-value structure
65
- def as_json(options={})
66
- {
67
- 'userName' => @user_name,
68
- 'accountName' => @account_name,
69
- 'userId' => @user_id,
70
- 'groupKey' => @group_key,
71
- 'appEnrollmentId' => @app_enrollment_id,
72
- 'syncRequestId' => @sync_request_id,
73
- 'errorMessage' => @error_message,
74
- }
75
- end
76
-
77
- ##
78
- # @return [String] This object converted to a JSON string
79
- def to_json(*options)
80
- "[#{as_json(*options).to_json(*options)}]"
81
- end
82
- end
83
- end