stackone_client 0.6.0 → 0.7.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/stack_one/accounts.rb +279 -36
- data/lib/stack_one/ats.rb +4075 -580
- data/lib/stack_one/connect_sessions.rb +123 -22
- data/lib/stack_one/connectors.rb +111 -14
- data/lib/stack_one/crm.rb +563 -78
- data/lib/stack_one/hris.rb +3401 -458
- data/lib/stack_one/iam.rb +675 -56
- data/lib/stack_one/lms.rb +1533 -220
- data/lib/stack_one/marketing.rb +1503 -230
- data/lib/stack_one/models/operations/hris_update_employee_time_off_request_request.rb +33 -0
- data/lib/stack_one/models/operations/hris_update_employee_time_off_request_response.rb +36 -0
- data/lib/stack_one/models/operations/iam_delete_user_request.rb +27 -0
- data/lib/stack_one/models/operations/iam_delete_user_response.rb +36 -0
- data/lib/stack_one/models/operations/iam_update_user_request.rb +30 -0
- data/lib/stack_one/models/operations/iam_update_user_response.rb +36 -0
- data/lib/stack_one/models/operations/lms_list_users_queryparam_filter.rb +5 -2
- data/lib/stack_one/models/operations.rb +6 -0
- data/lib/stack_one/models/shared/atscreatejobrequestdto.rb +5 -2
- data/lib/stack_one/models/shared/atsupdatejobrequestdto.rb +5 -2
- data/lib/stack_one/models/shared/hriscreatetimeoffrequestdto.rb +2 -0
- data/lib/stack_one/models/shared/hriscreatetimeoffrequestdto_type.rb +2 -0
- data/lib/stack_one/models/shared/iamupdateuserrequestdto.rb +45 -0
- data/lib/stack_one/models/shared/iamupdateuserrequestdto_status.rb +27 -0
- data/lib/stack_one/models/shared/iamupdateuserrequestdto_value.rb +20 -0
- data/lib/stack_one/models/shared/job.rb +5 -2
- data/lib/stack_one/models/shared/rawresponse.rb +2 -2
- data/lib/stack_one/models/shared/timeoff.rb +2 -0
- data/lib/stack_one/models/shared/timeoff_type.rb +2 -0
- data/lib/stack_one/models/shared/updateuserapimodel.rb +45 -0
- data/lib/stack_one/models/shared/updateuserapimodel_status.rb +27 -0
- data/lib/stack_one/models/shared/updateuserapimodel_value.rb +20 -0
- data/lib/stack_one/models/shared.rb +6 -0
- data/lib/stack_one/proxy.rb +62 -11
- data/lib/stack_one/sdk_hooks/hooks.rb +101 -0
- data/lib/stack_one/sdk_hooks/types.rb +152 -0
- data/lib/stack_one/sdkconfiguration.rb +11 -4
- data/lib/stack_one/stackone.rb +22 -8
- data/lib/stack_one/utils/utils.rb +10 -0
- metadata +16 -2
data/lib/stack_one/hris.rb
CHANGED
@@ -7,6 +7,7 @@ require 'faraday'
|
|
7
7
|
require 'faraday/multipart'
|
8
8
|
require 'faraday/retry'
|
9
9
|
require 'sorbet-runtime'
|
10
|
+
require_relative 'sdk_hooks/hooks'
|
10
11
|
require_relative 'utils/retries'
|
11
12
|
|
12
13
|
module StackOne
|
@@ -21,8 +22,8 @@ module StackOne
|
|
21
22
|
end
|
22
23
|
|
23
24
|
|
24
|
-
sig { params(hris_batch_document_upload_request_dto: ::StackOne::Shared::HrisBatchDocumentUploadRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisBatchUploadEmployeeDocumentResponse) }
|
25
|
-
def batch_upload_employee_document(hris_batch_document_upload_request_dto, id, x_account_id, retries = nil)
|
25
|
+
sig { params(hris_batch_document_upload_request_dto: ::StackOne::Shared::HrisBatchDocumentUploadRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisBatchUploadEmployeeDocumentResponse) }
|
26
|
+
def batch_upload_employee_document(hris_batch_document_upload_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
|
26
27
|
# batch_upload_employee_document - Batch Upload Employee Document
|
27
28
|
request = ::StackOne::Operations::HrisBatchUploadEmployeeDocumentRequest.new(
|
28
29
|
|
@@ -42,6 +43,14 @@ module StackOne
|
|
42
43
|
req_content_type, data, form = Utils.serialize_request_body(request, :hris_batch_document_upload_request_dto, :json)
|
43
44
|
headers['content-type'] = req_content_type
|
44
45
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
46
|
+
|
47
|
+
if form
|
48
|
+
body = Utils.encode_form(form)
|
49
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
50
|
+
body = URI.encode_www_form(data)
|
51
|
+
else
|
52
|
+
body = data
|
53
|
+
end
|
45
54
|
headers['Accept'] = 'application/json'
|
46
55
|
headers['user-agent'] = @sdk_configuration.user_agent
|
47
56
|
retries ||= @sdk_configuration.retry_config
|
@@ -58,19 +67,61 @@ module StackOne
|
|
58
67
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
59
68
|
retry_options[:retry_statuses] = [429, 408]
|
60
69
|
|
70
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
71
|
+
|
72
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
73
|
+
timeout ||= @sdk_configuration.timeout
|
74
|
+
|
61
75
|
connection = @sdk_configuration.client.dup
|
62
76
|
connection.request :retry, retry_options
|
63
77
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
78
|
+
hook_ctx = SDKHooks::HookContext.new(
|
79
|
+
base_url: base_url,
|
80
|
+
oauth2_scopes: [],
|
81
|
+
operation_id: 'hris_batch_upload_employee_document',
|
82
|
+
security_source: @sdk_configuration.security_source
|
83
|
+
)
|
84
|
+
|
85
|
+
error = T.let(nil, T.nilable(StandardError))
|
86
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
87
|
+
|
88
|
+
begin
|
89
|
+
r = connection.post(url) do |req|
|
90
|
+
req.body = body
|
91
|
+
req.headers.merge!(headers)
|
92
|
+
req.options.timeout = timeout unless timeout.nil?
|
93
|
+
Utils.configure_request_security(req, security)
|
94
|
+
|
95
|
+
@sdk_configuration.hooks.before_request(
|
96
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
97
|
+
hook_ctx: hook_ctx
|
98
|
+
),
|
99
|
+
request: req
|
100
|
+
)
|
101
|
+
end
|
102
|
+
rescue StandardError => e
|
103
|
+
error = e
|
104
|
+
ensure
|
105
|
+
if r.nil? || Utils.error_status?(r.status)
|
106
|
+
r = @sdk_configuration.hooks.after_error(
|
107
|
+
error: error,
|
108
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
109
|
+
hook_ctx: hook_ctx
|
110
|
+
),
|
111
|
+
response: r
|
112
|
+
)
|
72
113
|
else
|
73
|
-
|
114
|
+
r = @sdk_configuration.hooks.after_success(
|
115
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
116
|
+
hook_ctx: hook_ctx
|
117
|
+
),
|
118
|
+
response: r
|
119
|
+
)
|
120
|
+
end
|
121
|
+
|
122
|
+
if r.nil?
|
123
|
+
raise error if !error.nil?
|
124
|
+
raise 'no response'
|
74
125
|
end
|
75
126
|
end
|
76
127
|
|
@@ -94,8 +145,8 @@ module StackOne
|
|
94
145
|
end
|
95
146
|
|
96
147
|
|
97
|
-
sig { params(hris_create_employee_request_dto: ::StackOne::Shared::HrisCreateEmployeeRequestDto, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisCreateEmployeeResponse) }
|
98
|
-
def create_employee(hris_create_employee_request_dto, x_account_id, retries = nil)
|
148
|
+
sig { params(hris_create_employee_request_dto: ::StackOne::Shared::HrisCreateEmployeeRequestDto, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisCreateEmployeeResponse) }
|
149
|
+
def create_employee(hris_create_employee_request_dto, x_account_id, retries = nil, timeout_ms = nil)
|
99
150
|
# create_employee - Creates an employee
|
100
151
|
request = ::StackOne::Operations::HrisCreateEmployeeRequest.new(
|
101
152
|
|
@@ -109,6 +160,14 @@ module StackOne
|
|
109
160
|
req_content_type, data, form = Utils.serialize_request_body(request, :hris_create_employee_request_dto, :json)
|
110
161
|
headers['content-type'] = req_content_type
|
111
162
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
163
|
+
|
164
|
+
if form
|
165
|
+
body = Utils.encode_form(form)
|
166
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
167
|
+
body = URI.encode_www_form(data)
|
168
|
+
else
|
169
|
+
body = data
|
170
|
+
end
|
112
171
|
headers['Accept'] = 'application/json'
|
113
172
|
headers['user-agent'] = @sdk_configuration.user_agent
|
114
173
|
retries ||= @sdk_configuration.retry_config
|
@@ -125,19 +184,61 @@ module StackOne
|
|
125
184
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
126
185
|
retry_options[:retry_statuses] = [429, 408]
|
127
186
|
|
187
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
188
|
+
|
189
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
190
|
+
timeout ||= @sdk_configuration.timeout
|
191
|
+
|
128
192
|
connection = @sdk_configuration.client.dup
|
129
193
|
connection.request :retry, retry_options
|
130
194
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
195
|
+
hook_ctx = SDKHooks::HookContext.new(
|
196
|
+
base_url: base_url,
|
197
|
+
oauth2_scopes: [],
|
198
|
+
operation_id: 'hris_create_employee',
|
199
|
+
security_source: @sdk_configuration.security_source
|
200
|
+
)
|
201
|
+
|
202
|
+
error = T.let(nil, T.nilable(StandardError))
|
203
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
204
|
+
|
205
|
+
begin
|
206
|
+
r = connection.post(url) do |req|
|
207
|
+
req.body = body
|
208
|
+
req.headers.merge!(headers)
|
209
|
+
req.options.timeout = timeout unless timeout.nil?
|
210
|
+
Utils.configure_request_security(req, security)
|
211
|
+
|
212
|
+
@sdk_configuration.hooks.before_request(
|
213
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
214
|
+
hook_ctx: hook_ctx
|
215
|
+
),
|
216
|
+
request: req
|
217
|
+
)
|
218
|
+
end
|
219
|
+
rescue StandardError => e
|
220
|
+
error = e
|
221
|
+
ensure
|
222
|
+
if r.nil? || Utils.error_status?(r.status)
|
223
|
+
r = @sdk_configuration.hooks.after_error(
|
224
|
+
error: error,
|
225
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
226
|
+
hook_ctx: hook_ctx
|
227
|
+
),
|
228
|
+
response: r
|
229
|
+
)
|
139
230
|
else
|
140
|
-
|
231
|
+
r = @sdk_configuration.hooks.after_success(
|
232
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
233
|
+
hook_ctx: hook_ctx
|
234
|
+
),
|
235
|
+
response: r
|
236
|
+
)
|
237
|
+
end
|
238
|
+
|
239
|
+
if r.nil?
|
240
|
+
raise error if !error.nil?
|
241
|
+
raise 'no response'
|
141
242
|
end
|
142
243
|
end
|
143
244
|
|
@@ -161,8 +262,8 @@ module StackOne
|
|
161
262
|
end
|
162
263
|
|
163
264
|
|
164
|
-
sig { params(hris_create_employment_request_dto: ::StackOne::Shared::HrisCreateEmploymentRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisCreateEmployeeEmploymentResponse) }
|
165
|
-
def create_employee_employment(hris_create_employment_request_dto, id, x_account_id, retries = nil)
|
265
|
+
sig { params(hris_create_employment_request_dto: ::StackOne::Shared::HrisCreateEmploymentRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisCreateEmployeeEmploymentResponse) }
|
266
|
+
def create_employee_employment(hris_create_employment_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
|
166
267
|
# create_employee_employment - Create Employee Employment
|
167
268
|
request = ::StackOne::Operations::HrisCreateEmployeeEmploymentRequest.new(
|
168
269
|
|
@@ -182,6 +283,14 @@ module StackOne
|
|
182
283
|
req_content_type, data, form = Utils.serialize_request_body(request, :hris_create_employment_request_dto, :json)
|
183
284
|
headers['content-type'] = req_content_type
|
184
285
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
286
|
+
|
287
|
+
if form
|
288
|
+
body = Utils.encode_form(form)
|
289
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
290
|
+
body = URI.encode_www_form(data)
|
291
|
+
else
|
292
|
+
body = data
|
293
|
+
end
|
185
294
|
headers['Accept'] = 'application/json'
|
186
295
|
headers['user-agent'] = @sdk_configuration.user_agent
|
187
296
|
retries ||= @sdk_configuration.retry_config
|
@@ -198,19 +307,61 @@ module StackOne
|
|
198
307
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
199
308
|
retry_options[:retry_statuses] = [429, 408]
|
200
309
|
|
310
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
311
|
+
|
312
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
313
|
+
timeout ||= @sdk_configuration.timeout
|
314
|
+
|
201
315
|
connection = @sdk_configuration.client.dup
|
202
316
|
connection.request :retry, retry_options
|
203
317
|
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
318
|
+
hook_ctx = SDKHooks::HookContext.new(
|
319
|
+
base_url: base_url,
|
320
|
+
oauth2_scopes: [],
|
321
|
+
operation_id: 'hris_create_employee_employment',
|
322
|
+
security_source: @sdk_configuration.security_source
|
323
|
+
)
|
324
|
+
|
325
|
+
error = T.let(nil, T.nilable(StandardError))
|
326
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
327
|
+
|
328
|
+
begin
|
329
|
+
r = connection.post(url) do |req|
|
330
|
+
req.body = body
|
331
|
+
req.headers.merge!(headers)
|
332
|
+
req.options.timeout = timeout unless timeout.nil?
|
333
|
+
Utils.configure_request_security(req, security)
|
334
|
+
|
335
|
+
@sdk_configuration.hooks.before_request(
|
336
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
337
|
+
hook_ctx: hook_ctx
|
338
|
+
),
|
339
|
+
request: req
|
340
|
+
)
|
341
|
+
end
|
342
|
+
rescue StandardError => e
|
343
|
+
error = e
|
344
|
+
ensure
|
345
|
+
if r.nil? || Utils.error_status?(r.status)
|
346
|
+
r = @sdk_configuration.hooks.after_error(
|
347
|
+
error: error,
|
348
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
349
|
+
hook_ctx: hook_ctx
|
350
|
+
),
|
351
|
+
response: r
|
352
|
+
)
|
212
353
|
else
|
213
|
-
|
354
|
+
r = @sdk_configuration.hooks.after_success(
|
355
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
356
|
+
hook_ctx: hook_ctx
|
357
|
+
),
|
358
|
+
response: r
|
359
|
+
)
|
360
|
+
end
|
361
|
+
|
362
|
+
if r.nil?
|
363
|
+
raise error if !error.nil?
|
364
|
+
raise 'no response'
|
214
365
|
end
|
215
366
|
end
|
216
367
|
|
@@ -234,8 +385,8 @@ module StackOne
|
|
234
385
|
end
|
235
386
|
|
236
387
|
|
237
|
-
sig { params(entity_skills_create_request_dto: ::StackOne::Shared::EntitySkillsCreateRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisCreateEmployeeSkillResponse) }
|
238
|
-
def create_employee_skill(entity_skills_create_request_dto, id, x_account_id, retries = nil)
|
388
|
+
sig { params(entity_skills_create_request_dto: ::StackOne::Shared::EntitySkillsCreateRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisCreateEmployeeSkillResponse) }
|
389
|
+
def create_employee_skill(entity_skills_create_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
|
239
390
|
# create_employee_skill - Create Employee Skill
|
240
391
|
request = ::StackOne::Operations::HrisCreateEmployeeSkillRequest.new(
|
241
392
|
|
@@ -255,6 +406,14 @@ module StackOne
|
|
255
406
|
req_content_type, data, form = Utils.serialize_request_body(request, :entity_skills_create_request_dto, :json)
|
256
407
|
headers['content-type'] = req_content_type
|
257
408
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
409
|
+
|
410
|
+
if form
|
411
|
+
body = Utils.encode_form(form)
|
412
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
413
|
+
body = URI.encode_www_form(data)
|
414
|
+
else
|
415
|
+
body = data
|
416
|
+
end
|
258
417
|
headers['Accept'] = 'application/json'
|
259
418
|
headers['user-agent'] = @sdk_configuration.user_agent
|
260
419
|
retries ||= @sdk_configuration.retry_config
|
@@ -271,19 +430,61 @@ module StackOne
|
|
271
430
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
272
431
|
retry_options[:retry_statuses] = [429, 408]
|
273
432
|
|
433
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
434
|
+
|
435
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
436
|
+
timeout ||= @sdk_configuration.timeout
|
437
|
+
|
274
438
|
connection = @sdk_configuration.client.dup
|
275
439
|
connection.request :retry, retry_options
|
276
440
|
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
441
|
+
hook_ctx = SDKHooks::HookContext.new(
|
442
|
+
base_url: base_url,
|
443
|
+
oauth2_scopes: [],
|
444
|
+
operation_id: 'hris_create_employee_skill',
|
445
|
+
security_source: @sdk_configuration.security_source
|
446
|
+
)
|
447
|
+
|
448
|
+
error = T.let(nil, T.nilable(StandardError))
|
449
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
450
|
+
|
451
|
+
begin
|
452
|
+
r = connection.post(url) do |req|
|
453
|
+
req.body = body
|
454
|
+
req.headers.merge!(headers)
|
455
|
+
req.options.timeout = timeout unless timeout.nil?
|
456
|
+
Utils.configure_request_security(req, security)
|
457
|
+
|
458
|
+
@sdk_configuration.hooks.before_request(
|
459
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
460
|
+
hook_ctx: hook_ctx
|
461
|
+
),
|
462
|
+
request: req
|
463
|
+
)
|
464
|
+
end
|
465
|
+
rescue StandardError => e
|
466
|
+
error = e
|
467
|
+
ensure
|
468
|
+
if r.nil? || Utils.error_status?(r.status)
|
469
|
+
r = @sdk_configuration.hooks.after_error(
|
470
|
+
error: error,
|
471
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
472
|
+
hook_ctx: hook_ctx
|
473
|
+
),
|
474
|
+
response: r
|
475
|
+
)
|
285
476
|
else
|
286
|
-
|
477
|
+
r = @sdk_configuration.hooks.after_success(
|
478
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
479
|
+
hook_ctx: hook_ctx
|
480
|
+
),
|
481
|
+
response: r
|
482
|
+
)
|
483
|
+
end
|
484
|
+
|
485
|
+
if r.nil?
|
486
|
+
raise error if !error.nil?
|
487
|
+
raise 'no response'
|
287
488
|
end
|
288
489
|
end
|
289
490
|
|
@@ -307,8 +508,8 @@ module StackOne
|
|
307
508
|
end
|
308
509
|
|
309
510
|
|
310
|
-
sig { params(hris_create_time_off_request_dto: ::StackOne::Shared::HrisCreateTimeOffRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisCreateEmployeeTimeOffRequestResponse) }
|
311
|
-
def create_employee_time_off_request(hris_create_time_off_request_dto, id, x_account_id, retries = nil)
|
511
|
+
sig { params(hris_create_time_off_request_dto: ::StackOne::Shared::HrisCreateTimeOffRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisCreateEmployeeTimeOffRequestResponse) }
|
512
|
+
def create_employee_time_off_request(hris_create_time_off_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
|
312
513
|
# create_employee_time_off_request - Create Employee Time Off Request
|
313
514
|
request = ::StackOne::Operations::HrisCreateEmployeeTimeOffRequestRequest.new(
|
314
515
|
|
@@ -328,6 +529,14 @@ module StackOne
|
|
328
529
|
req_content_type, data, form = Utils.serialize_request_body(request, :hris_create_time_off_request_dto, :json)
|
329
530
|
headers['content-type'] = req_content_type
|
330
531
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
532
|
+
|
533
|
+
if form
|
534
|
+
body = Utils.encode_form(form)
|
535
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
536
|
+
body = URI.encode_www_form(data)
|
537
|
+
else
|
538
|
+
body = data
|
539
|
+
end
|
331
540
|
headers['Accept'] = 'application/json'
|
332
541
|
headers['user-agent'] = @sdk_configuration.user_agent
|
333
542
|
retries ||= @sdk_configuration.retry_config
|
@@ -344,19 +553,61 @@ module StackOne
|
|
344
553
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
345
554
|
retry_options[:retry_statuses] = [429, 408]
|
346
555
|
|
556
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
557
|
+
|
558
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
559
|
+
timeout ||= @sdk_configuration.timeout
|
560
|
+
|
347
561
|
connection = @sdk_configuration.client.dup
|
348
562
|
connection.request :retry, retry_options
|
349
563
|
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
564
|
+
hook_ctx = SDKHooks::HookContext.new(
|
565
|
+
base_url: base_url,
|
566
|
+
oauth2_scopes: [],
|
567
|
+
operation_id: 'hris_create_employee_time_off_request',
|
568
|
+
security_source: @sdk_configuration.security_source
|
569
|
+
)
|
570
|
+
|
571
|
+
error = T.let(nil, T.nilable(StandardError))
|
572
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
573
|
+
|
574
|
+
begin
|
575
|
+
r = connection.post(url) do |req|
|
576
|
+
req.body = body
|
577
|
+
req.headers.merge!(headers)
|
578
|
+
req.options.timeout = timeout unless timeout.nil?
|
579
|
+
Utils.configure_request_security(req, security)
|
580
|
+
|
581
|
+
@sdk_configuration.hooks.before_request(
|
582
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
583
|
+
hook_ctx: hook_ctx
|
584
|
+
),
|
585
|
+
request: req
|
586
|
+
)
|
587
|
+
end
|
588
|
+
rescue StandardError => e
|
589
|
+
error = e
|
590
|
+
ensure
|
591
|
+
if r.nil? || Utils.error_status?(r.status)
|
592
|
+
r = @sdk_configuration.hooks.after_error(
|
593
|
+
error: error,
|
594
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
595
|
+
hook_ctx: hook_ctx
|
596
|
+
),
|
597
|
+
response: r
|
598
|
+
)
|
358
599
|
else
|
359
|
-
|
600
|
+
r = @sdk_configuration.hooks.after_success(
|
601
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
602
|
+
hook_ctx: hook_ctx
|
603
|
+
),
|
604
|
+
response: r
|
605
|
+
)
|
606
|
+
end
|
607
|
+
|
608
|
+
if r.nil?
|
609
|
+
raise error if !error.nil?
|
610
|
+
raise 'no response'
|
360
611
|
end
|
361
612
|
end
|
362
613
|
|
@@ -380,8 +631,8 @@ module StackOne
|
|
380
631
|
end
|
381
632
|
|
382
633
|
|
383
|
-
sig { params(hris_create_work_eligibility_request_dto: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisCreateEmployeeWorkEligibilityRequestResponse) }
|
384
|
-
def create_employee_work_eligibility_request(hris_create_work_eligibility_request_dto, id, x_account_id, retries = nil)
|
634
|
+
sig { params(hris_create_work_eligibility_request_dto: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisCreateEmployeeWorkEligibilityRequestResponse) }
|
635
|
+
def create_employee_work_eligibility_request(hris_create_work_eligibility_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
|
385
636
|
# create_employee_work_eligibility_request - Create Employee Work Eligibility Request
|
386
637
|
request = ::StackOne::Operations::HrisCreateEmployeeWorkEligibilityRequestRequest.new(
|
387
638
|
|
@@ -401,6 +652,14 @@ module StackOne
|
|
401
652
|
req_content_type, data, form = Utils.serialize_request_body(request, :hris_create_work_eligibility_request_dto, :json)
|
402
653
|
headers['content-type'] = req_content_type
|
403
654
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
655
|
+
|
656
|
+
if form
|
657
|
+
body = Utils.encode_form(form)
|
658
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
659
|
+
body = URI.encode_www_form(data)
|
660
|
+
else
|
661
|
+
body = data
|
662
|
+
end
|
404
663
|
headers['Accept'] = 'application/json'
|
405
664
|
headers['user-agent'] = @sdk_configuration.user_agent
|
406
665
|
retries ||= @sdk_configuration.retry_config
|
@@ -417,19 +676,61 @@ module StackOne
|
|
417
676
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
418
677
|
retry_options[:retry_statuses] = [429, 408]
|
419
678
|
|
679
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
680
|
+
|
681
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
682
|
+
timeout ||= @sdk_configuration.timeout
|
683
|
+
|
420
684
|
connection = @sdk_configuration.client.dup
|
421
685
|
connection.request :retry, retry_options
|
422
686
|
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
687
|
+
hook_ctx = SDKHooks::HookContext.new(
|
688
|
+
base_url: base_url,
|
689
|
+
oauth2_scopes: [],
|
690
|
+
operation_id: 'hris_create_employee_work_eligibility_request',
|
691
|
+
security_source: @sdk_configuration.security_source
|
692
|
+
)
|
693
|
+
|
694
|
+
error = T.let(nil, T.nilable(StandardError))
|
695
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
696
|
+
|
697
|
+
begin
|
698
|
+
r = connection.post(url) do |req|
|
699
|
+
req.body = body
|
700
|
+
req.headers.merge!(headers)
|
701
|
+
req.options.timeout = timeout unless timeout.nil?
|
702
|
+
Utils.configure_request_security(req, security)
|
703
|
+
|
704
|
+
@sdk_configuration.hooks.before_request(
|
705
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
706
|
+
hook_ctx: hook_ctx
|
707
|
+
),
|
708
|
+
request: req
|
709
|
+
)
|
710
|
+
end
|
711
|
+
rescue StandardError => e
|
712
|
+
error = e
|
713
|
+
ensure
|
714
|
+
if r.nil? || Utils.error_status?(r.status)
|
715
|
+
r = @sdk_configuration.hooks.after_error(
|
716
|
+
error: error,
|
717
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
718
|
+
hook_ctx: hook_ctx
|
719
|
+
),
|
720
|
+
response: r
|
721
|
+
)
|
431
722
|
else
|
432
|
-
|
723
|
+
r = @sdk_configuration.hooks.after_success(
|
724
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
725
|
+
hook_ctx: hook_ctx
|
726
|
+
),
|
727
|
+
response: r
|
728
|
+
)
|
729
|
+
end
|
730
|
+
|
731
|
+
if r.nil?
|
732
|
+
raise error if !error.nil?
|
733
|
+
raise 'no response'
|
433
734
|
end
|
434
735
|
end
|
435
736
|
|
@@ -453,9 +754,11 @@ module StackOne
|
|
453
754
|
end
|
454
755
|
|
455
756
|
|
456
|
-
sig { params(hris_create_time_off_request_dto: ::StackOne::Shared::HrisCreateTimeOffRequestDto, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisCreateTimeOffRequestResponse) }
|
457
|
-
def create_time_off_request(hris_create_time_off_request_dto, x_account_id, retries = nil)
|
757
|
+
sig { params(hris_create_time_off_request_dto: ::StackOne::Shared::HrisCreateTimeOffRequestDto, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisCreateTimeOffRequestResponse) }
|
758
|
+
def create_time_off_request(hris_create_time_off_request_dto, x_account_id, retries = nil, timeout_ms = nil)
|
458
759
|
# create_time_off_request - Creates a time off request
|
760
|
+
#
|
761
|
+
# @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
459
762
|
request = ::StackOne::Operations::HrisCreateTimeOffRequestRequest.new(
|
460
763
|
|
461
764
|
hris_create_time_off_request_dto: hris_create_time_off_request_dto,
|
@@ -468,6 +771,14 @@ module StackOne
|
|
468
771
|
req_content_type, data, form = Utils.serialize_request_body(request, :hris_create_time_off_request_dto, :json)
|
469
772
|
headers['content-type'] = req_content_type
|
470
773
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
774
|
+
|
775
|
+
if form
|
776
|
+
body = Utils.encode_form(form)
|
777
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
778
|
+
body = URI.encode_www_form(data)
|
779
|
+
else
|
780
|
+
body = data
|
781
|
+
end
|
471
782
|
headers['Accept'] = 'application/json'
|
472
783
|
headers['user-agent'] = @sdk_configuration.user_agent
|
473
784
|
retries ||= @sdk_configuration.retry_config
|
@@ -484,19 +795,61 @@ module StackOne
|
|
484
795
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
485
796
|
retry_options[:retry_statuses] = [429, 408]
|
486
797
|
|
798
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
799
|
+
|
800
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
801
|
+
timeout ||= @sdk_configuration.timeout
|
802
|
+
|
487
803
|
connection = @sdk_configuration.client.dup
|
488
804
|
connection.request :retry, retry_options
|
489
805
|
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
806
|
+
hook_ctx = SDKHooks::HookContext.new(
|
807
|
+
base_url: base_url,
|
808
|
+
oauth2_scopes: [],
|
809
|
+
operation_id: 'hris_create_time_off_request',
|
810
|
+
security_source: @sdk_configuration.security_source
|
811
|
+
)
|
812
|
+
|
813
|
+
error = T.let(nil, T.nilable(StandardError))
|
814
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
815
|
+
|
816
|
+
begin
|
817
|
+
r = connection.post(url) do |req|
|
818
|
+
req.body = body
|
819
|
+
req.headers.merge!(headers)
|
820
|
+
req.options.timeout = timeout unless timeout.nil?
|
821
|
+
Utils.configure_request_security(req, security)
|
822
|
+
|
823
|
+
@sdk_configuration.hooks.before_request(
|
824
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
825
|
+
hook_ctx: hook_ctx
|
826
|
+
),
|
827
|
+
request: req
|
828
|
+
)
|
829
|
+
end
|
830
|
+
rescue StandardError => e
|
831
|
+
error = e
|
832
|
+
ensure
|
833
|
+
if r.nil? || Utils.error_status?(r.status)
|
834
|
+
r = @sdk_configuration.hooks.after_error(
|
835
|
+
error: error,
|
836
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
837
|
+
hook_ctx: hook_ctx
|
838
|
+
),
|
839
|
+
response: r
|
840
|
+
)
|
498
841
|
else
|
499
|
-
|
842
|
+
r = @sdk_configuration.hooks.after_success(
|
843
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
844
|
+
hook_ctx: hook_ctx
|
845
|
+
),
|
846
|
+
response: r
|
847
|
+
)
|
848
|
+
end
|
849
|
+
|
850
|
+
if r.nil?
|
851
|
+
raise error if !error.nil?
|
852
|
+
raise 'no response'
|
500
853
|
end
|
501
854
|
end
|
502
855
|
|
@@ -520,8 +873,8 @@ module StackOne
|
|
520
873
|
end
|
521
874
|
|
522
875
|
|
523
|
-
sig { params(id: ::String, sub_resource_id: ::String, x_account_id: ::String, format: T.nilable(::String), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisDownloadEmployeeDocumentResponse) }
|
524
|
-
def download_employee_document(id, sub_resource_id, x_account_id, format = nil, retries = nil)
|
876
|
+
sig { params(id: ::String, sub_resource_id: ::String, x_account_id: ::String, format: T.nilable(::String), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisDownloadEmployeeDocumentResponse) }
|
877
|
+
def download_employee_document(id, sub_resource_id, x_account_id, format = nil, retries = nil, timeout_ms = nil)
|
525
878
|
# download_employee_document - Download Employee Document
|
526
879
|
request = ::StackOne::Operations::HrisDownloadEmployeeDocumentRequest.new(
|
527
880
|
|
@@ -556,14 +909,62 @@ module StackOne
|
|
556
909
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
557
910
|
retry_options[:retry_statuses] = [429, 408]
|
558
911
|
|
912
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
913
|
+
|
914
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
915
|
+
timeout ||= @sdk_configuration.timeout
|
916
|
+
|
559
917
|
connection = @sdk_configuration.client.dup
|
560
918
|
connection.request :retry, retry_options
|
561
919
|
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
920
|
+
hook_ctx = SDKHooks::HookContext.new(
|
921
|
+
base_url: base_url,
|
922
|
+
oauth2_scopes: [],
|
923
|
+
operation_id: 'hris_download_employee_document',
|
924
|
+
security_source: @sdk_configuration.security_source
|
925
|
+
)
|
926
|
+
|
927
|
+
error = T.let(nil, T.nilable(StandardError))
|
928
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
929
|
+
|
930
|
+
begin
|
931
|
+
r = connection.get(url) do |req|
|
932
|
+
req.headers.merge!(headers)
|
933
|
+
req.options.timeout = timeout unless timeout.nil?
|
934
|
+
req.params = query_params
|
935
|
+
Utils.configure_request_security(req, security)
|
936
|
+
|
937
|
+
@sdk_configuration.hooks.before_request(
|
938
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
939
|
+
hook_ctx: hook_ctx
|
940
|
+
),
|
941
|
+
request: req
|
942
|
+
)
|
943
|
+
end
|
944
|
+
rescue StandardError => e
|
945
|
+
error = e
|
946
|
+
ensure
|
947
|
+
if r.nil? || Utils.error_status?(r.status)
|
948
|
+
r = @sdk_configuration.hooks.after_error(
|
949
|
+
error: error,
|
950
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
951
|
+
hook_ctx: hook_ctx
|
952
|
+
),
|
953
|
+
response: r
|
954
|
+
)
|
955
|
+
else
|
956
|
+
r = @sdk_configuration.hooks.after_success(
|
957
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
958
|
+
hook_ctx: hook_ctx
|
959
|
+
),
|
960
|
+
response: r
|
961
|
+
)
|
962
|
+
end
|
963
|
+
|
964
|
+
if r.nil?
|
965
|
+
raise error if !error.nil?
|
966
|
+
raise 'no response'
|
967
|
+
end
|
567
968
|
end
|
568
969
|
|
569
970
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -583,8 +984,8 @@ module StackOne
|
|
583
984
|
end
|
584
985
|
|
585
986
|
|
586
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetBenefitRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetBenefitResponse) }
|
587
|
-
def get_benefit(request, retries = nil)
|
987
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetBenefitRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetBenefitResponse) }
|
988
|
+
def get_benefit(request, retries = nil, timeout_ms = nil)
|
588
989
|
# get_benefit - Get Benefit
|
589
990
|
url, params = @sdk_configuration.get_server_details
|
590
991
|
base_url = Utils.template_url(url, params)
|
@@ -612,14 +1013,62 @@ module StackOne
|
|
612
1013
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
613
1014
|
retry_options[:retry_statuses] = [429, 408]
|
614
1015
|
|
1016
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1017
|
+
|
1018
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1019
|
+
timeout ||= @sdk_configuration.timeout
|
1020
|
+
|
615
1021
|
connection = @sdk_configuration.client.dup
|
616
1022
|
connection.request :retry, retry_options
|
617
1023
|
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
1024
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1025
|
+
base_url: base_url,
|
1026
|
+
oauth2_scopes: [],
|
1027
|
+
operation_id: 'hris_get_benefit',
|
1028
|
+
security_source: @sdk_configuration.security_source
|
1029
|
+
)
|
1030
|
+
|
1031
|
+
error = T.let(nil, T.nilable(StandardError))
|
1032
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1033
|
+
|
1034
|
+
begin
|
1035
|
+
r = connection.get(url) do |req|
|
1036
|
+
req.headers.merge!(headers)
|
1037
|
+
req.options.timeout = timeout unless timeout.nil?
|
1038
|
+
req.params = query_params
|
1039
|
+
Utils.configure_request_security(req, security)
|
1040
|
+
|
1041
|
+
@sdk_configuration.hooks.before_request(
|
1042
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1043
|
+
hook_ctx: hook_ctx
|
1044
|
+
),
|
1045
|
+
request: req
|
1046
|
+
)
|
1047
|
+
end
|
1048
|
+
rescue StandardError => e
|
1049
|
+
error = e
|
1050
|
+
ensure
|
1051
|
+
if r.nil? || Utils.error_status?(r.status)
|
1052
|
+
r = @sdk_configuration.hooks.after_error(
|
1053
|
+
error: error,
|
1054
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1055
|
+
hook_ctx: hook_ctx
|
1056
|
+
),
|
1057
|
+
response: r
|
1058
|
+
)
|
1059
|
+
else
|
1060
|
+
r = @sdk_configuration.hooks.after_success(
|
1061
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1062
|
+
hook_ctx: hook_ctx
|
1063
|
+
),
|
1064
|
+
response: r
|
1065
|
+
)
|
1066
|
+
end
|
1067
|
+
|
1068
|
+
if r.nil?
|
1069
|
+
raise error if !error.nil?
|
1070
|
+
raise 'no response'
|
1071
|
+
end
|
623
1072
|
end
|
624
1073
|
|
625
1074
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -642,8 +1091,8 @@ module StackOne
|
|
642
1091
|
end
|
643
1092
|
|
644
1093
|
|
645
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetCompanyRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetCompanyResponse) }
|
646
|
-
def get_company(request, retries = nil)
|
1094
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetCompanyRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetCompanyResponse) }
|
1095
|
+
def get_company(request, retries = nil, timeout_ms = nil)
|
647
1096
|
# get_company - Get Company
|
648
1097
|
url, params = @sdk_configuration.get_server_details
|
649
1098
|
base_url = Utils.template_url(url, params)
|
@@ -671,14 +1120,62 @@ module StackOne
|
|
671
1120
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
672
1121
|
retry_options[:retry_statuses] = [429, 408]
|
673
1122
|
|
1123
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1124
|
+
|
1125
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1126
|
+
timeout ||= @sdk_configuration.timeout
|
1127
|
+
|
674
1128
|
connection = @sdk_configuration.client.dup
|
675
1129
|
connection.request :retry, retry_options
|
676
1130
|
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
1131
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1132
|
+
base_url: base_url,
|
1133
|
+
oauth2_scopes: [],
|
1134
|
+
operation_id: 'hris_get_company',
|
1135
|
+
security_source: @sdk_configuration.security_source
|
1136
|
+
)
|
1137
|
+
|
1138
|
+
error = T.let(nil, T.nilable(StandardError))
|
1139
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1140
|
+
|
1141
|
+
begin
|
1142
|
+
r = connection.get(url) do |req|
|
1143
|
+
req.headers.merge!(headers)
|
1144
|
+
req.options.timeout = timeout unless timeout.nil?
|
1145
|
+
req.params = query_params
|
1146
|
+
Utils.configure_request_security(req, security)
|
1147
|
+
|
1148
|
+
@sdk_configuration.hooks.before_request(
|
1149
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1150
|
+
hook_ctx: hook_ctx
|
1151
|
+
),
|
1152
|
+
request: req
|
1153
|
+
)
|
1154
|
+
end
|
1155
|
+
rescue StandardError => e
|
1156
|
+
error = e
|
1157
|
+
ensure
|
1158
|
+
if r.nil? || Utils.error_status?(r.status)
|
1159
|
+
r = @sdk_configuration.hooks.after_error(
|
1160
|
+
error: error,
|
1161
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1162
|
+
hook_ctx: hook_ctx
|
1163
|
+
),
|
1164
|
+
response: r
|
1165
|
+
)
|
1166
|
+
else
|
1167
|
+
r = @sdk_configuration.hooks.after_success(
|
1168
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1169
|
+
hook_ctx: hook_ctx
|
1170
|
+
),
|
1171
|
+
response: r
|
1172
|
+
)
|
1173
|
+
end
|
1174
|
+
|
1175
|
+
if r.nil?
|
1176
|
+
raise error if !error.nil?
|
1177
|
+
raise 'no response'
|
1178
|
+
end
|
682
1179
|
end
|
683
1180
|
|
684
1181
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -701,8 +1198,8 @@ module StackOne
|
|
701
1198
|
end
|
702
1199
|
|
703
1200
|
|
704
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetCostCenterGroupRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetCostCenterGroupResponse) }
|
705
|
-
def get_cost_center_group(request, retries = nil)
|
1201
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetCostCenterGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetCostCenterGroupResponse) }
|
1202
|
+
def get_cost_center_group(request, retries = nil, timeout_ms = nil)
|
706
1203
|
# get_cost_center_group - Get Cost Center Group
|
707
1204
|
url, params = @sdk_configuration.get_server_details
|
708
1205
|
base_url = Utils.template_url(url, params)
|
@@ -730,14 +1227,62 @@ module StackOne
|
|
730
1227
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
731
1228
|
retry_options[:retry_statuses] = [429, 408]
|
732
1229
|
|
1230
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1231
|
+
|
1232
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1233
|
+
timeout ||= @sdk_configuration.timeout
|
1234
|
+
|
733
1235
|
connection = @sdk_configuration.client.dup
|
734
1236
|
connection.request :retry, retry_options
|
735
1237
|
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
1238
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1239
|
+
base_url: base_url,
|
1240
|
+
oauth2_scopes: [],
|
1241
|
+
operation_id: 'hris_get_cost_center_group',
|
1242
|
+
security_source: @sdk_configuration.security_source
|
1243
|
+
)
|
1244
|
+
|
1245
|
+
error = T.let(nil, T.nilable(StandardError))
|
1246
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1247
|
+
|
1248
|
+
begin
|
1249
|
+
r = connection.get(url) do |req|
|
1250
|
+
req.headers.merge!(headers)
|
1251
|
+
req.options.timeout = timeout unless timeout.nil?
|
1252
|
+
req.params = query_params
|
1253
|
+
Utils.configure_request_security(req, security)
|
1254
|
+
|
1255
|
+
@sdk_configuration.hooks.before_request(
|
1256
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1257
|
+
hook_ctx: hook_ctx
|
1258
|
+
),
|
1259
|
+
request: req
|
1260
|
+
)
|
1261
|
+
end
|
1262
|
+
rescue StandardError => e
|
1263
|
+
error = e
|
1264
|
+
ensure
|
1265
|
+
if r.nil? || Utils.error_status?(r.status)
|
1266
|
+
r = @sdk_configuration.hooks.after_error(
|
1267
|
+
error: error,
|
1268
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1269
|
+
hook_ctx: hook_ctx
|
1270
|
+
),
|
1271
|
+
response: r
|
1272
|
+
)
|
1273
|
+
else
|
1274
|
+
r = @sdk_configuration.hooks.after_success(
|
1275
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1276
|
+
hook_ctx: hook_ctx
|
1277
|
+
),
|
1278
|
+
response: r
|
1279
|
+
)
|
1280
|
+
end
|
1281
|
+
|
1282
|
+
if r.nil?
|
1283
|
+
raise error if !error.nil?
|
1284
|
+
raise 'no response'
|
1285
|
+
end
|
741
1286
|
end
|
742
1287
|
|
743
1288
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -760,8 +1305,8 @@ module StackOne
|
|
760
1305
|
end
|
761
1306
|
|
762
1307
|
|
763
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetDepartmentGroupRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetDepartmentGroupResponse) }
|
764
|
-
def get_department_group(request, retries = nil)
|
1308
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetDepartmentGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetDepartmentGroupResponse) }
|
1309
|
+
def get_department_group(request, retries = nil, timeout_ms = nil)
|
765
1310
|
# get_department_group - Get Department Group
|
766
1311
|
url, params = @sdk_configuration.get_server_details
|
767
1312
|
base_url = Utils.template_url(url, params)
|
@@ -789,14 +1334,62 @@ module StackOne
|
|
789
1334
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
790
1335
|
retry_options[:retry_statuses] = [429, 408]
|
791
1336
|
|
1337
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1338
|
+
|
1339
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1340
|
+
timeout ||= @sdk_configuration.timeout
|
1341
|
+
|
792
1342
|
connection = @sdk_configuration.client.dup
|
793
1343
|
connection.request :retry, retry_options
|
794
1344
|
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
1345
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1346
|
+
base_url: base_url,
|
1347
|
+
oauth2_scopes: [],
|
1348
|
+
operation_id: 'hris_get_department_group',
|
1349
|
+
security_source: @sdk_configuration.security_source
|
1350
|
+
)
|
1351
|
+
|
1352
|
+
error = T.let(nil, T.nilable(StandardError))
|
1353
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1354
|
+
|
1355
|
+
begin
|
1356
|
+
r = connection.get(url) do |req|
|
1357
|
+
req.headers.merge!(headers)
|
1358
|
+
req.options.timeout = timeout unless timeout.nil?
|
1359
|
+
req.params = query_params
|
1360
|
+
Utils.configure_request_security(req, security)
|
1361
|
+
|
1362
|
+
@sdk_configuration.hooks.before_request(
|
1363
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1364
|
+
hook_ctx: hook_ctx
|
1365
|
+
),
|
1366
|
+
request: req
|
1367
|
+
)
|
1368
|
+
end
|
1369
|
+
rescue StandardError => e
|
1370
|
+
error = e
|
1371
|
+
ensure
|
1372
|
+
if r.nil? || Utils.error_status?(r.status)
|
1373
|
+
r = @sdk_configuration.hooks.after_error(
|
1374
|
+
error: error,
|
1375
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1376
|
+
hook_ctx: hook_ctx
|
1377
|
+
),
|
1378
|
+
response: r
|
1379
|
+
)
|
1380
|
+
else
|
1381
|
+
r = @sdk_configuration.hooks.after_success(
|
1382
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1383
|
+
hook_ctx: hook_ctx
|
1384
|
+
),
|
1385
|
+
response: r
|
1386
|
+
)
|
1387
|
+
end
|
1388
|
+
|
1389
|
+
if r.nil?
|
1390
|
+
raise error if !error.nil?
|
1391
|
+
raise 'no response'
|
1392
|
+
end
|
800
1393
|
end
|
801
1394
|
|
802
1395
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -819,8 +1412,8 @@ module StackOne
|
|
819
1412
|
end
|
820
1413
|
|
821
1414
|
|
822
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetEmployeeResponse) }
|
823
|
-
def get_employee(request, retries = nil)
|
1415
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetEmployeeResponse) }
|
1416
|
+
def get_employee(request, retries = nil, timeout_ms = nil)
|
824
1417
|
# get_employee - Get Employee
|
825
1418
|
url, params = @sdk_configuration.get_server_details
|
826
1419
|
base_url = Utils.template_url(url, params)
|
@@ -848,14 +1441,62 @@ module StackOne
|
|
848
1441
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
849
1442
|
retry_options[:retry_statuses] = [429, 408]
|
850
1443
|
|
1444
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1445
|
+
|
1446
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1447
|
+
timeout ||= @sdk_configuration.timeout
|
1448
|
+
|
851
1449
|
connection = @sdk_configuration.client.dup
|
852
1450
|
connection.request :retry, retry_options
|
853
1451
|
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
1452
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1453
|
+
base_url: base_url,
|
1454
|
+
oauth2_scopes: [],
|
1455
|
+
operation_id: 'hris_get_employee',
|
1456
|
+
security_source: @sdk_configuration.security_source
|
1457
|
+
)
|
1458
|
+
|
1459
|
+
error = T.let(nil, T.nilable(StandardError))
|
1460
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1461
|
+
|
1462
|
+
begin
|
1463
|
+
r = connection.get(url) do |req|
|
1464
|
+
req.headers.merge!(headers)
|
1465
|
+
req.options.timeout = timeout unless timeout.nil?
|
1466
|
+
req.params = query_params
|
1467
|
+
Utils.configure_request_security(req, security)
|
1468
|
+
|
1469
|
+
@sdk_configuration.hooks.before_request(
|
1470
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1471
|
+
hook_ctx: hook_ctx
|
1472
|
+
),
|
1473
|
+
request: req
|
1474
|
+
)
|
1475
|
+
end
|
1476
|
+
rescue StandardError => e
|
1477
|
+
error = e
|
1478
|
+
ensure
|
1479
|
+
if r.nil? || Utils.error_status?(r.status)
|
1480
|
+
r = @sdk_configuration.hooks.after_error(
|
1481
|
+
error: error,
|
1482
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1483
|
+
hook_ctx: hook_ctx
|
1484
|
+
),
|
1485
|
+
response: r
|
1486
|
+
)
|
1487
|
+
else
|
1488
|
+
r = @sdk_configuration.hooks.after_success(
|
1489
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1490
|
+
hook_ctx: hook_ctx
|
1491
|
+
),
|
1492
|
+
response: r
|
1493
|
+
)
|
1494
|
+
end
|
1495
|
+
|
1496
|
+
if r.nil?
|
1497
|
+
raise error if !error.nil?
|
1498
|
+
raise 'no response'
|
1499
|
+
end
|
859
1500
|
end
|
860
1501
|
|
861
1502
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -878,8 +1519,8 @@ module StackOne
|
|
878
1519
|
end
|
879
1520
|
|
880
1521
|
|
881
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeCustomFieldDefinitionRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetEmployeeCustomFieldDefinitionResponse) }
|
882
|
-
def get_employee_custom_field_definition(request, retries = nil)
|
1522
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeCustomFieldDefinitionRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetEmployeeCustomFieldDefinitionResponse) }
|
1523
|
+
def get_employee_custom_field_definition(request, retries = nil, timeout_ms = nil)
|
883
1524
|
# get_employee_custom_field_definition - Get employee Custom Field Definition
|
884
1525
|
url, params = @sdk_configuration.get_server_details
|
885
1526
|
base_url = Utils.template_url(url, params)
|
@@ -907,14 +1548,62 @@ module StackOne
|
|
907
1548
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
908
1549
|
retry_options[:retry_statuses] = [429, 408]
|
909
1550
|
|
1551
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1552
|
+
|
1553
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1554
|
+
timeout ||= @sdk_configuration.timeout
|
1555
|
+
|
910
1556
|
connection = @sdk_configuration.client.dup
|
911
1557
|
connection.request :retry, retry_options
|
912
1558
|
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
1559
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1560
|
+
base_url: base_url,
|
1561
|
+
oauth2_scopes: [],
|
1562
|
+
operation_id: 'hris_get_employee_custom_field_definition',
|
1563
|
+
security_source: @sdk_configuration.security_source
|
1564
|
+
)
|
1565
|
+
|
1566
|
+
error = T.let(nil, T.nilable(StandardError))
|
1567
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1568
|
+
|
1569
|
+
begin
|
1570
|
+
r = connection.get(url) do |req|
|
1571
|
+
req.headers.merge!(headers)
|
1572
|
+
req.options.timeout = timeout unless timeout.nil?
|
1573
|
+
req.params = query_params
|
1574
|
+
Utils.configure_request_security(req, security)
|
1575
|
+
|
1576
|
+
@sdk_configuration.hooks.before_request(
|
1577
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1578
|
+
hook_ctx: hook_ctx
|
1579
|
+
),
|
1580
|
+
request: req
|
1581
|
+
)
|
1582
|
+
end
|
1583
|
+
rescue StandardError => e
|
1584
|
+
error = e
|
1585
|
+
ensure
|
1586
|
+
if r.nil? || Utils.error_status?(r.status)
|
1587
|
+
r = @sdk_configuration.hooks.after_error(
|
1588
|
+
error: error,
|
1589
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1590
|
+
hook_ctx: hook_ctx
|
1591
|
+
),
|
1592
|
+
response: r
|
1593
|
+
)
|
1594
|
+
else
|
1595
|
+
r = @sdk_configuration.hooks.after_success(
|
1596
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1597
|
+
hook_ctx: hook_ctx
|
1598
|
+
),
|
1599
|
+
response: r
|
1600
|
+
)
|
1601
|
+
end
|
1602
|
+
|
1603
|
+
if r.nil?
|
1604
|
+
raise error if !error.nil?
|
1605
|
+
raise 'no response'
|
1606
|
+
end
|
918
1607
|
end
|
919
1608
|
|
920
1609
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -937,8 +1626,8 @@ module StackOne
|
|
937
1626
|
end
|
938
1627
|
|
939
1628
|
|
940
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeDocumentRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetEmployeeDocumentResponse) }
|
941
|
-
def get_employee_document(request, retries = nil)
|
1629
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeDocumentRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetEmployeeDocumentResponse) }
|
1630
|
+
def get_employee_document(request, retries = nil, timeout_ms = nil)
|
942
1631
|
# get_employee_document - Get Employee Document
|
943
1632
|
url, params = @sdk_configuration.get_server_details
|
944
1633
|
base_url = Utils.template_url(url, params)
|
@@ -966,14 +1655,62 @@ module StackOne
|
|
966
1655
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
967
1656
|
retry_options[:retry_statuses] = [429, 408]
|
968
1657
|
|
1658
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1659
|
+
|
1660
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1661
|
+
timeout ||= @sdk_configuration.timeout
|
1662
|
+
|
969
1663
|
connection = @sdk_configuration.client.dup
|
970
1664
|
connection.request :retry, retry_options
|
971
1665
|
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
1666
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1667
|
+
base_url: base_url,
|
1668
|
+
oauth2_scopes: [],
|
1669
|
+
operation_id: 'hris_get_employee_document',
|
1670
|
+
security_source: @sdk_configuration.security_source
|
1671
|
+
)
|
1672
|
+
|
1673
|
+
error = T.let(nil, T.nilable(StandardError))
|
1674
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1675
|
+
|
1676
|
+
begin
|
1677
|
+
r = connection.get(url) do |req|
|
1678
|
+
req.headers.merge!(headers)
|
1679
|
+
req.options.timeout = timeout unless timeout.nil?
|
1680
|
+
req.params = query_params
|
1681
|
+
Utils.configure_request_security(req, security)
|
1682
|
+
|
1683
|
+
@sdk_configuration.hooks.before_request(
|
1684
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1685
|
+
hook_ctx: hook_ctx
|
1686
|
+
),
|
1687
|
+
request: req
|
1688
|
+
)
|
1689
|
+
end
|
1690
|
+
rescue StandardError => e
|
1691
|
+
error = e
|
1692
|
+
ensure
|
1693
|
+
if r.nil? || Utils.error_status?(r.status)
|
1694
|
+
r = @sdk_configuration.hooks.after_error(
|
1695
|
+
error: error,
|
1696
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1697
|
+
hook_ctx: hook_ctx
|
1698
|
+
),
|
1699
|
+
response: r
|
1700
|
+
)
|
1701
|
+
else
|
1702
|
+
r = @sdk_configuration.hooks.after_success(
|
1703
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1704
|
+
hook_ctx: hook_ctx
|
1705
|
+
),
|
1706
|
+
response: r
|
1707
|
+
)
|
1708
|
+
end
|
1709
|
+
|
1710
|
+
if r.nil?
|
1711
|
+
raise error if !error.nil?
|
1712
|
+
raise 'no response'
|
1713
|
+
end
|
977
1714
|
end
|
978
1715
|
|
979
1716
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -996,8 +1733,8 @@ module StackOne
|
|
996
1733
|
end
|
997
1734
|
|
998
1735
|
|
999
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeDocumentCategoryRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetEmployeeDocumentCategoryResponse) }
|
1000
|
-
def get_employee_document_category(request, retries = nil)
|
1736
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeDocumentCategoryRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetEmployeeDocumentCategoryResponse) }
|
1737
|
+
def get_employee_document_category(request, retries = nil, timeout_ms = nil)
|
1001
1738
|
# get_employee_document_category - Get Employee Document Category
|
1002
1739
|
url, params = @sdk_configuration.get_server_details
|
1003
1740
|
base_url = Utils.template_url(url, params)
|
@@ -1025,14 +1762,62 @@ module StackOne
|
|
1025
1762
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1026
1763
|
retry_options[:retry_statuses] = [429, 408]
|
1027
1764
|
|
1765
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1766
|
+
|
1767
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1768
|
+
timeout ||= @sdk_configuration.timeout
|
1769
|
+
|
1028
1770
|
connection = @sdk_configuration.client.dup
|
1029
1771
|
connection.request :retry, retry_options
|
1030
1772
|
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1773
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1774
|
+
base_url: base_url,
|
1775
|
+
oauth2_scopes: [],
|
1776
|
+
operation_id: 'hris_get_employee_document_category',
|
1777
|
+
security_source: @sdk_configuration.security_source
|
1778
|
+
)
|
1779
|
+
|
1780
|
+
error = T.let(nil, T.nilable(StandardError))
|
1781
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1782
|
+
|
1783
|
+
begin
|
1784
|
+
r = connection.get(url) do |req|
|
1785
|
+
req.headers.merge!(headers)
|
1786
|
+
req.options.timeout = timeout unless timeout.nil?
|
1787
|
+
req.params = query_params
|
1788
|
+
Utils.configure_request_security(req, security)
|
1789
|
+
|
1790
|
+
@sdk_configuration.hooks.before_request(
|
1791
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1792
|
+
hook_ctx: hook_ctx
|
1793
|
+
),
|
1794
|
+
request: req
|
1795
|
+
)
|
1796
|
+
end
|
1797
|
+
rescue StandardError => e
|
1798
|
+
error = e
|
1799
|
+
ensure
|
1800
|
+
if r.nil? || Utils.error_status?(r.status)
|
1801
|
+
r = @sdk_configuration.hooks.after_error(
|
1802
|
+
error: error,
|
1803
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1804
|
+
hook_ctx: hook_ctx
|
1805
|
+
),
|
1806
|
+
response: r
|
1807
|
+
)
|
1808
|
+
else
|
1809
|
+
r = @sdk_configuration.hooks.after_success(
|
1810
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1811
|
+
hook_ctx: hook_ctx
|
1812
|
+
),
|
1813
|
+
response: r
|
1814
|
+
)
|
1815
|
+
end
|
1816
|
+
|
1817
|
+
if r.nil?
|
1818
|
+
raise error if !error.nil?
|
1819
|
+
raise 'no response'
|
1820
|
+
end
|
1036
1821
|
end
|
1037
1822
|
|
1038
1823
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1055,8 +1840,8 @@ module StackOne
|
|
1055
1840
|
end
|
1056
1841
|
|
1057
1842
|
|
1058
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeEmploymentRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetEmployeeEmploymentResponse) }
|
1059
|
-
def get_employee_employment(request, retries = nil)
|
1843
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeEmploymentRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetEmployeeEmploymentResponse) }
|
1844
|
+
def get_employee_employment(request, retries = nil, timeout_ms = nil)
|
1060
1845
|
# get_employee_employment - Get Employee Employment
|
1061
1846
|
url, params = @sdk_configuration.get_server_details
|
1062
1847
|
base_url = Utils.template_url(url, params)
|
@@ -1084,14 +1869,62 @@ module StackOne
|
|
1084
1869
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1085
1870
|
retry_options[:retry_statuses] = [429, 408]
|
1086
1871
|
|
1872
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1873
|
+
|
1874
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1875
|
+
timeout ||= @sdk_configuration.timeout
|
1876
|
+
|
1087
1877
|
connection = @sdk_configuration.client.dup
|
1088
1878
|
connection.request :retry, retry_options
|
1089
1879
|
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1880
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1881
|
+
base_url: base_url,
|
1882
|
+
oauth2_scopes: [],
|
1883
|
+
operation_id: 'hris_get_employee_employment',
|
1884
|
+
security_source: @sdk_configuration.security_source
|
1885
|
+
)
|
1886
|
+
|
1887
|
+
error = T.let(nil, T.nilable(StandardError))
|
1888
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1889
|
+
|
1890
|
+
begin
|
1891
|
+
r = connection.get(url) do |req|
|
1892
|
+
req.headers.merge!(headers)
|
1893
|
+
req.options.timeout = timeout unless timeout.nil?
|
1894
|
+
req.params = query_params
|
1895
|
+
Utils.configure_request_security(req, security)
|
1896
|
+
|
1897
|
+
@sdk_configuration.hooks.before_request(
|
1898
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
1899
|
+
hook_ctx: hook_ctx
|
1900
|
+
),
|
1901
|
+
request: req
|
1902
|
+
)
|
1903
|
+
end
|
1904
|
+
rescue StandardError => e
|
1905
|
+
error = e
|
1906
|
+
ensure
|
1907
|
+
if r.nil? || Utils.error_status?(r.status)
|
1908
|
+
r = @sdk_configuration.hooks.after_error(
|
1909
|
+
error: error,
|
1910
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
1911
|
+
hook_ctx: hook_ctx
|
1912
|
+
),
|
1913
|
+
response: r
|
1914
|
+
)
|
1915
|
+
else
|
1916
|
+
r = @sdk_configuration.hooks.after_success(
|
1917
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
1918
|
+
hook_ctx: hook_ctx
|
1919
|
+
),
|
1920
|
+
response: r
|
1921
|
+
)
|
1922
|
+
end
|
1923
|
+
|
1924
|
+
if r.nil?
|
1925
|
+
raise error if !error.nil?
|
1926
|
+
raise 'no response'
|
1927
|
+
end
|
1095
1928
|
end
|
1096
1929
|
|
1097
1930
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1114,8 +1947,8 @@ module StackOne
|
|
1114
1947
|
end
|
1115
1948
|
|
1116
1949
|
|
1117
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeSkillRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetEmployeeSkillResponse) }
|
1118
|
-
def get_employee_skill(request, retries = nil)
|
1950
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeSkillRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetEmployeeSkillResponse) }
|
1951
|
+
def get_employee_skill(request, retries = nil, timeout_ms = nil)
|
1119
1952
|
# get_employee_skill - Get Employee Skill
|
1120
1953
|
url, params = @sdk_configuration.get_server_details
|
1121
1954
|
base_url = Utils.template_url(url, params)
|
@@ -1143,14 +1976,62 @@ module StackOne
|
|
1143
1976
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1144
1977
|
retry_options[:retry_statuses] = [429, 408]
|
1145
1978
|
|
1979
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
1980
|
+
|
1981
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
1982
|
+
timeout ||= @sdk_configuration.timeout
|
1983
|
+
|
1146
1984
|
connection = @sdk_configuration.client.dup
|
1147
1985
|
connection.request :retry, retry_options
|
1148
1986
|
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1987
|
+
hook_ctx = SDKHooks::HookContext.new(
|
1988
|
+
base_url: base_url,
|
1989
|
+
oauth2_scopes: [],
|
1990
|
+
operation_id: 'hris_get_employee_skill',
|
1991
|
+
security_source: @sdk_configuration.security_source
|
1992
|
+
)
|
1993
|
+
|
1994
|
+
error = T.let(nil, T.nilable(StandardError))
|
1995
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
1996
|
+
|
1997
|
+
begin
|
1998
|
+
r = connection.get(url) do |req|
|
1999
|
+
req.headers.merge!(headers)
|
2000
|
+
req.options.timeout = timeout unless timeout.nil?
|
2001
|
+
req.params = query_params
|
2002
|
+
Utils.configure_request_security(req, security)
|
2003
|
+
|
2004
|
+
@sdk_configuration.hooks.before_request(
|
2005
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
2006
|
+
hook_ctx: hook_ctx
|
2007
|
+
),
|
2008
|
+
request: req
|
2009
|
+
)
|
2010
|
+
end
|
2011
|
+
rescue StandardError => e
|
2012
|
+
error = e
|
2013
|
+
ensure
|
2014
|
+
if r.nil? || Utils.error_status?(r.status)
|
2015
|
+
r = @sdk_configuration.hooks.after_error(
|
2016
|
+
error: error,
|
2017
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
2018
|
+
hook_ctx: hook_ctx
|
2019
|
+
),
|
2020
|
+
response: r
|
2021
|
+
)
|
2022
|
+
else
|
2023
|
+
r = @sdk_configuration.hooks.after_success(
|
2024
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
2025
|
+
hook_ctx: hook_ctx
|
2026
|
+
),
|
2027
|
+
response: r
|
2028
|
+
)
|
2029
|
+
end
|
2030
|
+
|
2031
|
+
if r.nil?
|
2032
|
+
raise error if !error.nil?
|
2033
|
+
raise 'no response'
|
2034
|
+
end
|
1154
2035
|
end
|
1155
2036
|
|
1156
2037
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1173,8 +2054,8 @@ module StackOne
|
|
1173
2054
|
end
|
1174
2055
|
|
1175
2056
|
|
1176
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeTimeOffBalanceRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetEmployeeTimeOffBalanceResponse) }
|
1177
|
-
def get_employee_time_off_balance(request, retries = nil)
|
2057
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeTimeOffBalanceRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetEmployeeTimeOffBalanceResponse) }
|
2058
|
+
def get_employee_time_off_balance(request, retries = nil, timeout_ms = nil)
|
1178
2059
|
# get_employee_time_off_balance - Get Employee Time Off Balance
|
1179
2060
|
url, params = @sdk_configuration.get_server_details
|
1180
2061
|
base_url = Utils.template_url(url, params)
|
@@ -1202,14 +2083,62 @@ module StackOne
|
|
1202
2083
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1203
2084
|
retry_options[:retry_statuses] = [429, 408]
|
1204
2085
|
|
2086
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
2087
|
+
|
2088
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
2089
|
+
timeout ||= @sdk_configuration.timeout
|
2090
|
+
|
1205
2091
|
connection = @sdk_configuration.client.dup
|
1206
2092
|
connection.request :retry, retry_options
|
1207
2093
|
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
2094
|
+
hook_ctx = SDKHooks::HookContext.new(
|
2095
|
+
base_url: base_url,
|
2096
|
+
oauth2_scopes: [],
|
2097
|
+
operation_id: 'hris_get_employee_time_off_balance',
|
2098
|
+
security_source: @sdk_configuration.security_source
|
2099
|
+
)
|
2100
|
+
|
2101
|
+
error = T.let(nil, T.nilable(StandardError))
|
2102
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
2103
|
+
|
2104
|
+
begin
|
2105
|
+
r = connection.get(url) do |req|
|
2106
|
+
req.headers.merge!(headers)
|
2107
|
+
req.options.timeout = timeout unless timeout.nil?
|
2108
|
+
req.params = query_params
|
2109
|
+
Utils.configure_request_security(req, security)
|
2110
|
+
|
2111
|
+
@sdk_configuration.hooks.before_request(
|
2112
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
2113
|
+
hook_ctx: hook_ctx
|
2114
|
+
),
|
2115
|
+
request: req
|
2116
|
+
)
|
2117
|
+
end
|
2118
|
+
rescue StandardError => e
|
2119
|
+
error = e
|
2120
|
+
ensure
|
2121
|
+
if r.nil? || Utils.error_status?(r.status)
|
2122
|
+
r = @sdk_configuration.hooks.after_error(
|
2123
|
+
error: error,
|
2124
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
2125
|
+
hook_ctx: hook_ctx
|
2126
|
+
),
|
2127
|
+
response: r
|
2128
|
+
)
|
2129
|
+
else
|
2130
|
+
r = @sdk_configuration.hooks.after_success(
|
2131
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
2132
|
+
hook_ctx: hook_ctx
|
2133
|
+
),
|
2134
|
+
response: r
|
2135
|
+
)
|
2136
|
+
end
|
2137
|
+
|
2138
|
+
if r.nil?
|
2139
|
+
raise error if !error.nil?
|
2140
|
+
raise 'no response'
|
2141
|
+
end
|
1213
2142
|
end
|
1214
2143
|
|
1215
2144
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1232,8 +2161,8 @@ module StackOne
|
|
1232
2161
|
end
|
1233
2162
|
|
1234
2163
|
|
1235
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeesTimeOffRequestRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetEmployeesTimeOffRequestResponse) }
|
1236
|
-
def get_employees_time_off_request(request, retries = nil)
|
2164
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeesTimeOffRequestRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetEmployeesTimeOffRequestResponse) }
|
2165
|
+
def get_employees_time_off_request(request, retries = nil, timeout_ms = nil)
|
1237
2166
|
# get_employees_time_off_request - Get Employees Time Off Request
|
1238
2167
|
url, params = @sdk_configuration.get_server_details
|
1239
2168
|
base_url = Utils.template_url(url, params)
|
@@ -1261,14 +2190,62 @@ module StackOne
|
|
1261
2190
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1262
2191
|
retry_options[:retry_statuses] = [429, 408]
|
1263
2192
|
|
2193
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
2194
|
+
|
2195
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
2196
|
+
timeout ||= @sdk_configuration.timeout
|
2197
|
+
|
1264
2198
|
connection = @sdk_configuration.client.dup
|
1265
2199
|
connection.request :retry, retry_options
|
1266
2200
|
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
2201
|
+
hook_ctx = SDKHooks::HookContext.new(
|
2202
|
+
base_url: base_url,
|
2203
|
+
oauth2_scopes: [],
|
2204
|
+
operation_id: 'hris_get_employees_time_off_request',
|
2205
|
+
security_source: @sdk_configuration.security_source
|
2206
|
+
)
|
2207
|
+
|
2208
|
+
error = T.let(nil, T.nilable(StandardError))
|
2209
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
2210
|
+
|
2211
|
+
begin
|
2212
|
+
r = connection.get(url) do |req|
|
2213
|
+
req.headers.merge!(headers)
|
2214
|
+
req.options.timeout = timeout unless timeout.nil?
|
2215
|
+
req.params = query_params
|
2216
|
+
Utils.configure_request_security(req, security)
|
2217
|
+
|
2218
|
+
@sdk_configuration.hooks.before_request(
|
2219
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
2220
|
+
hook_ctx: hook_ctx
|
2221
|
+
),
|
2222
|
+
request: req
|
2223
|
+
)
|
2224
|
+
end
|
2225
|
+
rescue StandardError => e
|
2226
|
+
error = e
|
2227
|
+
ensure
|
2228
|
+
if r.nil? || Utils.error_status?(r.status)
|
2229
|
+
r = @sdk_configuration.hooks.after_error(
|
2230
|
+
error: error,
|
2231
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
2232
|
+
hook_ctx: hook_ctx
|
2233
|
+
),
|
2234
|
+
response: r
|
2235
|
+
)
|
2236
|
+
else
|
2237
|
+
r = @sdk_configuration.hooks.after_success(
|
2238
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
2239
|
+
hook_ctx: hook_ctx
|
2240
|
+
),
|
2241
|
+
response: r
|
2242
|
+
)
|
2243
|
+
end
|
2244
|
+
|
2245
|
+
if r.nil?
|
2246
|
+
raise error if !error.nil?
|
2247
|
+
raise 'no response'
|
2248
|
+
end
|
1272
2249
|
end
|
1273
2250
|
|
1274
2251
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1291,8 +2268,8 @@ module StackOne
|
|
1291
2268
|
end
|
1292
2269
|
|
1293
2270
|
|
1294
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeesWorkEligibilityRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetEmployeesWorkEligibilityResponse) }
|
1295
|
-
def get_employees_work_eligibility(request, retries = nil)
|
2271
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeesWorkEligibilityRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetEmployeesWorkEligibilityResponse) }
|
2272
|
+
def get_employees_work_eligibility(request, retries = nil, timeout_ms = nil)
|
1296
2273
|
# get_employees_work_eligibility - Get Employees Work Eligibility
|
1297
2274
|
url, params = @sdk_configuration.get_server_details
|
1298
2275
|
base_url = Utils.template_url(url, params)
|
@@ -1320,14 +2297,62 @@ module StackOne
|
|
1320
2297
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1321
2298
|
retry_options[:retry_statuses] = [429, 408]
|
1322
2299
|
|
2300
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
2301
|
+
|
2302
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
2303
|
+
timeout ||= @sdk_configuration.timeout
|
2304
|
+
|
1323
2305
|
connection = @sdk_configuration.client.dup
|
1324
2306
|
connection.request :retry, retry_options
|
1325
2307
|
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
2308
|
+
hook_ctx = SDKHooks::HookContext.new(
|
2309
|
+
base_url: base_url,
|
2310
|
+
oauth2_scopes: [],
|
2311
|
+
operation_id: 'hris_get_employees_work_eligibility',
|
2312
|
+
security_source: @sdk_configuration.security_source
|
2313
|
+
)
|
2314
|
+
|
2315
|
+
error = T.let(nil, T.nilable(StandardError))
|
2316
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
2317
|
+
|
2318
|
+
begin
|
2319
|
+
r = connection.get(url) do |req|
|
2320
|
+
req.headers.merge!(headers)
|
2321
|
+
req.options.timeout = timeout unless timeout.nil?
|
2322
|
+
req.params = query_params
|
2323
|
+
Utils.configure_request_security(req, security)
|
2324
|
+
|
2325
|
+
@sdk_configuration.hooks.before_request(
|
2326
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
2327
|
+
hook_ctx: hook_ctx
|
2328
|
+
),
|
2329
|
+
request: req
|
2330
|
+
)
|
2331
|
+
end
|
2332
|
+
rescue StandardError => e
|
2333
|
+
error = e
|
2334
|
+
ensure
|
2335
|
+
if r.nil? || Utils.error_status?(r.status)
|
2336
|
+
r = @sdk_configuration.hooks.after_error(
|
2337
|
+
error: error,
|
2338
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
2339
|
+
hook_ctx: hook_ctx
|
2340
|
+
),
|
2341
|
+
response: r
|
2342
|
+
)
|
2343
|
+
else
|
2344
|
+
r = @sdk_configuration.hooks.after_success(
|
2345
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
2346
|
+
hook_ctx: hook_ctx
|
2347
|
+
),
|
2348
|
+
response: r
|
2349
|
+
)
|
2350
|
+
end
|
2351
|
+
|
2352
|
+
if r.nil?
|
2353
|
+
raise error if !error.nil?
|
2354
|
+
raise 'no response'
|
2355
|
+
end
|
1331
2356
|
end
|
1332
2357
|
|
1333
2358
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1350,8 +2375,8 @@ module StackOne
|
|
1350
2375
|
end
|
1351
2376
|
|
1352
2377
|
|
1353
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmploymentRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetEmploymentResponse) }
|
1354
|
-
def get_employment(request, retries = nil)
|
2378
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmploymentRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetEmploymentResponse) }
|
2379
|
+
def get_employment(request, retries = nil, timeout_ms = nil)
|
1355
2380
|
# get_employment - Get Employment
|
1356
2381
|
url, params = @sdk_configuration.get_server_details
|
1357
2382
|
base_url = Utils.template_url(url, params)
|
@@ -1379,14 +2404,62 @@ module StackOne
|
|
1379
2404
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1380
2405
|
retry_options[:retry_statuses] = [429, 408]
|
1381
2406
|
|
2407
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
2408
|
+
|
2409
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
2410
|
+
timeout ||= @sdk_configuration.timeout
|
2411
|
+
|
1382
2412
|
connection = @sdk_configuration.client.dup
|
1383
2413
|
connection.request :retry, retry_options
|
1384
2414
|
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
2415
|
+
hook_ctx = SDKHooks::HookContext.new(
|
2416
|
+
base_url: base_url,
|
2417
|
+
oauth2_scopes: [],
|
2418
|
+
operation_id: 'hris_get_employment',
|
2419
|
+
security_source: @sdk_configuration.security_source
|
2420
|
+
)
|
2421
|
+
|
2422
|
+
error = T.let(nil, T.nilable(StandardError))
|
2423
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
2424
|
+
|
2425
|
+
begin
|
2426
|
+
r = connection.get(url) do |req|
|
2427
|
+
req.headers.merge!(headers)
|
2428
|
+
req.options.timeout = timeout unless timeout.nil?
|
2429
|
+
req.params = query_params
|
2430
|
+
Utils.configure_request_security(req, security)
|
2431
|
+
|
2432
|
+
@sdk_configuration.hooks.before_request(
|
2433
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
2434
|
+
hook_ctx: hook_ctx
|
2435
|
+
),
|
2436
|
+
request: req
|
2437
|
+
)
|
2438
|
+
end
|
2439
|
+
rescue StandardError => e
|
2440
|
+
error = e
|
2441
|
+
ensure
|
2442
|
+
if r.nil? || Utils.error_status?(r.status)
|
2443
|
+
r = @sdk_configuration.hooks.after_error(
|
2444
|
+
error: error,
|
2445
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
2446
|
+
hook_ctx: hook_ctx
|
2447
|
+
),
|
2448
|
+
response: r
|
2449
|
+
)
|
2450
|
+
else
|
2451
|
+
r = @sdk_configuration.hooks.after_success(
|
2452
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
2453
|
+
hook_ctx: hook_ctx
|
2454
|
+
),
|
2455
|
+
response: r
|
2456
|
+
)
|
2457
|
+
end
|
2458
|
+
|
2459
|
+
if r.nil?
|
2460
|
+
raise error if !error.nil?
|
2461
|
+
raise 'no response'
|
2462
|
+
end
|
1390
2463
|
end
|
1391
2464
|
|
1392
2465
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1409,8 +2482,8 @@ module StackOne
|
|
1409
2482
|
end
|
1410
2483
|
|
1411
2484
|
|
1412
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetGroupRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetGroupResponse) }
|
1413
|
-
def get_group(request, retries = nil)
|
2485
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetGroupResponse) }
|
2486
|
+
def get_group(request, retries = nil, timeout_ms = nil)
|
1414
2487
|
# get_group - Get Group
|
1415
2488
|
url, params = @sdk_configuration.get_server_details
|
1416
2489
|
base_url = Utils.template_url(url, params)
|
@@ -1438,14 +2511,62 @@ module StackOne
|
|
1438
2511
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1439
2512
|
retry_options[:retry_statuses] = [429, 408]
|
1440
2513
|
|
2514
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
2515
|
+
|
2516
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
2517
|
+
timeout ||= @sdk_configuration.timeout
|
2518
|
+
|
1441
2519
|
connection = @sdk_configuration.client.dup
|
1442
2520
|
connection.request :retry, retry_options
|
1443
2521
|
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
2522
|
+
hook_ctx = SDKHooks::HookContext.new(
|
2523
|
+
base_url: base_url,
|
2524
|
+
oauth2_scopes: [],
|
2525
|
+
operation_id: 'hris_get_group',
|
2526
|
+
security_source: @sdk_configuration.security_source
|
2527
|
+
)
|
2528
|
+
|
2529
|
+
error = T.let(nil, T.nilable(StandardError))
|
2530
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
2531
|
+
|
2532
|
+
begin
|
2533
|
+
r = connection.get(url) do |req|
|
2534
|
+
req.headers.merge!(headers)
|
2535
|
+
req.options.timeout = timeout unless timeout.nil?
|
2536
|
+
req.params = query_params
|
2537
|
+
Utils.configure_request_security(req, security)
|
2538
|
+
|
2539
|
+
@sdk_configuration.hooks.before_request(
|
2540
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
2541
|
+
hook_ctx: hook_ctx
|
2542
|
+
),
|
2543
|
+
request: req
|
2544
|
+
)
|
2545
|
+
end
|
2546
|
+
rescue StandardError => e
|
2547
|
+
error = e
|
2548
|
+
ensure
|
2549
|
+
if r.nil? || Utils.error_status?(r.status)
|
2550
|
+
r = @sdk_configuration.hooks.after_error(
|
2551
|
+
error: error,
|
2552
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
2553
|
+
hook_ctx: hook_ctx
|
2554
|
+
),
|
2555
|
+
response: r
|
2556
|
+
)
|
2557
|
+
else
|
2558
|
+
r = @sdk_configuration.hooks.after_success(
|
2559
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
2560
|
+
hook_ctx: hook_ctx
|
2561
|
+
),
|
2562
|
+
response: r
|
2563
|
+
)
|
2564
|
+
end
|
2565
|
+
|
2566
|
+
if r.nil?
|
2567
|
+
raise error if !error.nil?
|
2568
|
+
raise 'no response'
|
2569
|
+
end
|
1449
2570
|
end
|
1450
2571
|
|
1451
2572
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1468,8 +2589,8 @@ module StackOne
|
|
1468
2589
|
end
|
1469
2590
|
|
1470
2591
|
|
1471
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetJobRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetJobResponse) }
|
1472
|
-
def get_job(request, retries = nil)
|
2592
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetJobRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetJobResponse) }
|
2593
|
+
def get_job(request, retries = nil, timeout_ms = nil)
|
1473
2594
|
# get_job - Get Job
|
1474
2595
|
url, params = @sdk_configuration.get_server_details
|
1475
2596
|
base_url = Utils.template_url(url, params)
|
@@ -1497,14 +2618,62 @@ module StackOne
|
|
1497
2618
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1498
2619
|
retry_options[:retry_statuses] = [429, 408]
|
1499
2620
|
|
2621
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
2622
|
+
|
2623
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
2624
|
+
timeout ||= @sdk_configuration.timeout
|
2625
|
+
|
1500
2626
|
connection = @sdk_configuration.client.dup
|
1501
2627
|
connection.request :retry, retry_options
|
1502
2628
|
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
2629
|
+
hook_ctx = SDKHooks::HookContext.new(
|
2630
|
+
base_url: base_url,
|
2631
|
+
oauth2_scopes: [],
|
2632
|
+
operation_id: 'hris_get_job',
|
2633
|
+
security_source: @sdk_configuration.security_source
|
2634
|
+
)
|
2635
|
+
|
2636
|
+
error = T.let(nil, T.nilable(StandardError))
|
2637
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
2638
|
+
|
2639
|
+
begin
|
2640
|
+
r = connection.get(url) do |req|
|
2641
|
+
req.headers.merge!(headers)
|
2642
|
+
req.options.timeout = timeout unless timeout.nil?
|
2643
|
+
req.params = query_params
|
2644
|
+
Utils.configure_request_security(req, security)
|
2645
|
+
|
2646
|
+
@sdk_configuration.hooks.before_request(
|
2647
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
2648
|
+
hook_ctx: hook_ctx
|
2649
|
+
),
|
2650
|
+
request: req
|
2651
|
+
)
|
2652
|
+
end
|
2653
|
+
rescue StandardError => e
|
2654
|
+
error = e
|
2655
|
+
ensure
|
2656
|
+
if r.nil? || Utils.error_status?(r.status)
|
2657
|
+
r = @sdk_configuration.hooks.after_error(
|
2658
|
+
error: error,
|
2659
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
2660
|
+
hook_ctx: hook_ctx
|
2661
|
+
),
|
2662
|
+
response: r
|
2663
|
+
)
|
2664
|
+
else
|
2665
|
+
r = @sdk_configuration.hooks.after_success(
|
2666
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
2667
|
+
hook_ctx: hook_ctx
|
2668
|
+
),
|
2669
|
+
response: r
|
2670
|
+
)
|
2671
|
+
end
|
2672
|
+
|
2673
|
+
if r.nil?
|
2674
|
+
raise error if !error.nil?
|
2675
|
+
raise 'no response'
|
2676
|
+
end
|
1508
2677
|
end
|
1509
2678
|
|
1510
2679
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1527,8 +2696,8 @@ module StackOne
|
|
1527
2696
|
end
|
1528
2697
|
|
1529
2698
|
|
1530
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetLocationRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetLocationResponse) }
|
1531
|
-
def get_location(request, retries = nil)
|
2699
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetLocationRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetLocationResponse) }
|
2700
|
+
def get_location(request, retries = nil, timeout_ms = nil)
|
1532
2701
|
# get_location - Get Work Location
|
1533
2702
|
url, params = @sdk_configuration.get_server_details
|
1534
2703
|
base_url = Utils.template_url(url, params)
|
@@ -1556,14 +2725,62 @@ module StackOne
|
|
1556
2725
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1557
2726
|
retry_options[:retry_statuses] = [429, 408]
|
1558
2727
|
|
2728
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
2729
|
+
|
2730
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
2731
|
+
timeout ||= @sdk_configuration.timeout
|
2732
|
+
|
1559
2733
|
connection = @sdk_configuration.client.dup
|
1560
2734
|
connection.request :retry, retry_options
|
1561
2735
|
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
2736
|
+
hook_ctx = SDKHooks::HookContext.new(
|
2737
|
+
base_url: base_url,
|
2738
|
+
oauth2_scopes: [],
|
2739
|
+
operation_id: 'hris_get_location',
|
2740
|
+
security_source: @sdk_configuration.security_source
|
2741
|
+
)
|
2742
|
+
|
2743
|
+
error = T.let(nil, T.nilable(StandardError))
|
2744
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
2745
|
+
|
2746
|
+
begin
|
2747
|
+
r = connection.get(url) do |req|
|
2748
|
+
req.headers.merge!(headers)
|
2749
|
+
req.options.timeout = timeout unless timeout.nil?
|
2750
|
+
req.params = query_params
|
2751
|
+
Utils.configure_request_security(req, security)
|
2752
|
+
|
2753
|
+
@sdk_configuration.hooks.before_request(
|
2754
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
2755
|
+
hook_ctx: hook_ctx
|
2756
|
+
),
|
2757
|
+
request: req
|
2758
|
+
)
|
2759
|
+
end
|
2760
|
+
rescue StandardError => e
|
2761
|
+
error = e
|
2762
|
+
ensure
|
2763
|
+
if r.nil? || Utils.error_status?(r.status)
|
2764
|
+
r = @sdk_configuration.hooks.after_error(
|
2765
|
+
error: error,
|
2766
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
2767
|
+
hook_ctx: hook_ctx
|
2768
|
+
),
|
2769
|
+
response: r
|
2770
|
+
)
|
2771
|
+
else
|
2772
|
+
r = @sdk_configuration.hooks.after_success(
|
2773
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
2774
|
+
hook_ctx: hook_ctx
|
2775
|
+
),
|
2776
|
+
response: r
|
2777
|
+
)
|
2778
|
+
end
|
2779
|
+
|
2780
|
+
if r.nil?
|
2781
|
+
raise error if !error.nil?
|
2782
|
+
raise 'no response'
|
2783
|
+
end
|
1567
2784
|
end
|
1568
2785
|
|
1569
2786
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1586,8 +2803,8 @@ module StackOne
|
|
1586
2803
|
end
|
1587
2804
|
|
1588
2805
|
|
1589
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetTeamGroupRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetTeamGroupResponse) }
|
1590
|
-
def get_team_group(request, retries = nil)
|
2806
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetTeamGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetTeamGroupResponse) }
|
2807
|
+
def get_team_group(request, retries = nil, timeout_ms = nil)
|
1591
2808
|
# get_team_group - Get Team Group
|
1592
2809
|
url, params = @sdk_configuration.get_server_details
|
1593
2810
|
base_url = Utils.template_url(url, params)
|
@@ -1615,14 +2832,62 @@ module StackOne
|
|
1615
2832
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1616
2833
|
retry_options[:retry_statuses] = [429, 408]
|
1617
2834
|
|
2835
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
2836
|
+
|
2837
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
2838
|
+
timeout ||= @sdk_configuration.timeout
|
2839
|
+
|
1618
2840
|
connection = @sdk_configuration.client.dup
|
1619
2841
|
connection.request :retry, retry_options
|
1620
2842
|
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
2843
|
+
hook_ctx = SDKHooks::HookContext.new(
|
2844
|
+
base_url: base_url,
|
2845
|
+
oauth2_scopes: [],
|
2846
|
+
operation_id: 'hris_get_team_group',
|
2847
|
+
security_source: @sdk_configuration.security_source
|
2848
|
+
)
|
2849
|
+
|
2850
|
+
error = T.let(nil, T.nilable(StandardError))
|
2851
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
2852
|
+
|
2853
|
+
begin
|
2854
|
+
r = connection.get(url) do |req|
|
2855
|
+
req.headers.merge!(headers)
|
2856
|
+
req.options.timeout = timeout unless timeout.nil?
|
2857
|
+
req.params = query_params
|
2858
|
+
Utils.configure_request_security(req, security)
|
2859
|
+
|
2860
|
+
@sdk_configuration.hooks.before_request(
|
2861
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
2862
|
+
hook_ctx: hook_ctx
|
2863
|
+
),
|
2864
|
+
request: req
|
2865
|
+
)
|
2866
|
+
end
|
2867
|
+
rescue StandardError => e
|
2868
|
+
error = e
|
2869
|
+
ensure
|
2870
|
+
if r.nil? || Utils.error_status?(r.status)
|
2871
|
+
r = @sdk_configuration.hooks.after_error(
|
2872
|
+
error: error,
|
2873
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
2874
|
+
hook_ctx: hook_ctx
|
2875
|
+
),
|
2876
|
+
response: r
|
2877
|
+
)
|
2878
|
+
else
|
2879
|
+
r = @sdk_configuration.hooks.after_success(
|
2880
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
2881
|
+
hook_ctx: hook_ctx
|
2882
|
+
),
|
2883
|
+
response: r
|
2884
|
+
)
|
2885
|
+
end
|
2886
|
+
|
2887
|
+
if r.nil?
|
2888
|
+
raise error if !error.nil?
|
2889
|
+
raise 'no response'
|
2890
|
+
end
|
1626
2891
|
end
|
1627
2892
|
|
1628
2893
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1645,8 +2910,8 @@ module StackOne
|
|
1645
2910
|
end
|
1646
2911
|
|
1647
2912
|
|
1648
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetTimeEntriesRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetTimeEntriesResponse) }
|
1649
|
-
def get_time_entries(request, retries = nil)
|
2913
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetTimeEntriesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetTimeEntriesResponse) }
|
2914
|
+
def get_time_entries(request, retries = nil, timeout_ms = nil)
|
1650
2915
|
# get_time_entries - Get Time Entry
|
1651
2916
|
url, params = @sdk_configuration.get_server_details
|
1652
2917
|
base_url = Utils.template_url(url, params)
|
@@ -1674,14 +2939,62 @@ module StackOne
|
|
1674
2939
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1675
2940
|
retry_options[:retry_statuses] = [429, 408]
|
1676
2941
|
|
2942
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
2943
|
+
|
2944
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
2945
|
+
timeout ||= @sdk_configuration.timeout
|
2946
|
+
|
1677
2947
|
connection = @sdk_configuration.client.dup
|
1678
2948
|
connection.request :retry, retry_options
|
1679
2949
|
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
2950
|
+
hook_ctx = SDKHooks::HookContext.new(
|
2951
|
+
base_url: base_url,
|
2952
|
+
oauth2_scopes: [],
|
2953
|
+
operation_id: 'hris_get_time_entries',
|
2954
|
+
security_source: @sdk_configuration.security_source
|
2955
|
+
)
|
2956
|
+
|
2957
|
+
error = T.let(nil, T.nilable(StandardError))
|
2958
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
2959
|
+
|
2960
|
+
begin
|
2961
|
+
r = connection.get(url) do |req|
|
2962
|
+
req.headers.merge!(headers)
|
2963
|
+
req.options.timeout = timeout unless timeout.nil?
|
2964
|
+
req.params = query_params
|
2965
|
+
Utils.configure_request_security(req, security)
|
2966
|
+
|
2967
|
+
@sdk_configuration.hooks.before_request(
|
2968
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
2969
|
+
hook_ctx: hook_ctx
|
2970
|
+
),
|
2971
|
+
request: req
|
2972
|
+
)
|
2973
|
+
end
|
2974
|
+
rescue StandardError => e
|
2975
|
+
error = e
|
2976
|
+
ensure
|
2977
|
+
if r.nil? || Utils.error_status?(r.status)
|
2978
|
+
r = @sdk_configuration.hooks.after_error(
|
2979
|
+
error: error,
|
2980
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
2981
|
+
hook_ctx: hook_ctx
|
2982
|
+
),
|
2983
|
+
response: r
|
2984
|
+
)
|
2985
|
+
else
|
2986
|
+
r = @sdk_configuration.hooks.after_success(
|
2987
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
2988
|
+
hook_ctx: hook_ctx
|
2989
|
+
),
|
2990
|
+
response: r
|
2991
|
+
)
|
2992
|
+
end
|
2993
|
+
|
2994
|
+
if r.nil?
|
2995
|
+
raise error if !error.nil?
|
2996
|
+
raise 'no response'
|
2997
|
+
end
|
1685
2998
|
end
|
1686
2999
|
|
1687
3000
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1704,8 +3017,8 @@ module StackOne
|
|
1704
3017
|
end
|
1705
3018
|
|
1706
3019
|
|
1707
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetTimeOffPolicyRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetTimeOffPolicyResponse) }
|
1708
|
-
def get_time_off_policy(request, retries = nil)
|
3020
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetTimeOffPolicyRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetTimeOffPolicyResponse) }
|
3021
|
+
def get_time_off_policy(request, retries = nil, timeout_ms = nil)
|
1709
3022
|
# get_time_off_policy - Get Time Off Policy
|
1710
3023
|
url, params = @sdk_configuration.get_server_details
|
1711
3024
|
base_url = Utils.template_url(url, params)
|
@@ -1733,14 +3046,62 @@ module StackOne
|
|
1733
3046
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1734
3047
|
retry_options[:retry_statuses] = [429, 408]
|
1735
3048
|
|
3049
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
3050
|
+
|
3051
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
3052
|
+
timeout ||= @sdk_configuration.timeout
|
3053
|
+
|
1736
3054
|
connection = @sdk_configuration.client.dup
|
1737
3055
|
connection.request :retry, retry_options
|
1738
3056
|
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
3057
|
+
hook_ctx = SDKHooks::HookContext.new(
|
3058
|
+
base_url: base_url,
|
3059
|
+
oauth2_scopes: [],
|
3060
|
+
operation_id: 'hris_get_time_off_policy',
|
3061
|
+
security_source: @sdk_configuration.security_source
|
3062
|
+
)
|
3063
|
+
|
3064
|
+
error = T.let(nil, T.nilable(StandardError))
|
3065
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
3066
|
+
|
3067
|
+
begin
|
3068
|
+
r = connection.get(url) do |req|
|
3069
|
+
req.headers.merge!(headers)
|
3070
|
+
req.options.timeout = timeout unless timeout.nil?
|
3071
|
+
req.params = query_params
|
3072
|
+
Utils.configure_request_security(req, security)
|
3073
|
+
|
3074
|
+
@sdk_configuration.hooks.before_request(
|
3075
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
3076
|
+
hook_ctx: hook_ctx
|
3077
|
+
),
|
3078
|
+
request: req
|
3079
|
+
)
|
3080
|
+
end
|
3081
|
+
rescue StandardError => e
|
3082
|
+
error = e
|
3083
|
+
ensure
|
3084
|
+
if r.nil? || Utils.error_status?(r.status)
|
3085
|
+
r = @sdk_configuration.hooks.after_error(
|
3086
|
+
error: error,
|
3087
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
3088
|
+
hook_ctx: hook_ctx
|
3089
|
+
),
|
3090
|
+
response: r
|
3091
|
+
)
|
3092
|
+
else
|
3093
|
+
r = @sdk_configuration.hooks.after_success(
|
3094
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
3095
|
+
hook_ctx: hook_ctx
|
3096
|
+
),
|
3097
|
+
response: r
|
3098
|
+
)
|
3099
|
+
end
|
3100
|
+
|
3101
|
+
if r.nil?
|
3102
|
+
raise error if !error.nil?
|
3103
|
+
raise 'no response'
|
3104
|
+
end
|
1744
3105
|
end
|
1745
3106
|
|
1746
3107
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1763,8 +3124,8 @@ module StackOne
|
|
1763
3124
|
end
|
1764
3125
|
|
1765
3126
|
|
1766
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetTimeOffRequestRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetTimeOffRequestResponse) }
|
1767
|
-
def get_time_off_request(request, retries = nil)
|
3127
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetTimeOffRequestRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetTimeOffRequestResponse) }
|
3128
|
+
def get_time_off_request(request, retries = nil, timeout_ms = nil)
|
1768
3129
|
# get_time_off_request - Get time off request
|
1769
3130
|
url, params = @sdk_configuration.get_server_details
|
1770
3131
|
base_url = Utils.template_url(url, params)
|
@@ -1792,14 +3153,62 @@ module StackOne
|
|
1792
3153
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1793
3154
|
retry_options[:retry_statuses] = [429, 408]
|
1794
3155
|
|
3156
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
3157
|
+
|
3158
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
3159
|
+
timeout ||= @sdk_configuration.timeout
|
3160
|
+
|
1795
3161
|
connection = @sdk_configuration.client.dup
|
1796
3162
|
connection.request :retry, retry_options
|
1797
3163
|
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
3164
|
+
hook_ctx = SDKHooks::HookContext.new(
|
3165
|
+
base_url: base_url,
|
3166
|
+
oauth2_scopes: [],
|
3167
|
+
operation_id: 'hris_get_time_off_request',
|
3168
|
+
security_source: @sdk_configuration.security_source
|
3169
|
+
)
|
3170
|
+
|
3171
|
+
error = T.let(nil, T.nilable(StandardError))
|
3172
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
3173
|
+
|
3174
|
+
begin
|
3175
|
+
r = connection.get(url) do |req|
|
3176
|
+
req.headers.merge!(headers)
|
3177
|
+
req.options.timeout = timeout unless timeout.nil?
|
3178
|
+
req.params = query_params
|
3179
|
+
Utils.configure_request_security(req, security)
|
3180
|
+
|
3181
|
+
@sdk_configuration.hooks.before_request(
|
3182
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
3183
|
+
hook_ctx: hook_ctx
|
3184
|
+
),
|
3185
|
+
request: req
|
3186
|
+
)
|
3187
|
+
end
|
3188
|
+
rescue StandardError => e
|
3189
|
+
error = e
|
3190
|
+
ensure
|
3191
|
+
if r.nil? || Utils.error_status?(r.status)
|
3192
|
+
r = @sdk_configuration.hooks.after_error(
|
3193
|
+
error: error,
|
3194
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
3195
|
+
hook_ctx: hook_ctx
|
3196
|
+
),
|
3197
|
+
response: r
|
3198
|
+
)
|
3199
|
+
else
|
3200
|
+
r = @sdk_configuration.hooks.after_success(
|
3201
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
3202
|
+
hook_ctx: hook_ctx
|
3203
|
+
),
|
3204
|
+
response: r
|
3205
|
+
)
|
3206
|
+
end
|
3207
|
+
|
3208
|
+
if r.nil?
|
3209
|
+
raise error if !error.nil?
|
3210
|
+
raise 'no response'
|
3211
|
+
end
|
1803
3212
|
end
|
1804
3213
|
|
1805
3214
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1822,9 +3231,11 @@ module StackOne
|
|
1822
3231
|
end
|
1823
3232
|
|
1824
3233
|
|
1825
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisGetTimeOffTypeRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisGetTimeOffTypeResponse) }
|
1826
|
-
def get_time_off_type(request, retries = nil)
|
3234
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetTimeOffTypeRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisGetTimeOffTypeResponse) }
|
3235
|
+
def get_time_off_type(request, retries = nil, timeout_ms = nil)
|
1827
3236
|
# get_time_off_type - Get time off type
|
3237
|
+
#
|
3238
|
+
# @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
1828
3239
|
url, params = @sdk_configuration.get_server_details
|
1829
3240
|
base_url = Utils.template_url(url, params)
|
1830
3241
|
url = Utils.generate_url(
|
@@ -1851,14 +3262,62 @@ module StackOne
|
|
1851
3262
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1852
3263
|
retry_options[:retry_statuses] = [429, 408]
|
1853
3264
|
|
3265
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
3266
|
+
|
3267
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
3268
|
+
timeout ||= @sdk_configuration.timeout
|
3269
|
+
|
1854
3270
|
connection = @sdk_configuration.client.dup
|
1855
3271
|
connection.request :retry, retry_options
|
1856
3272
|
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
3273
|
+
hook_ctx = SDKHooks::HookContext.new(
|
3274
|
+
base_url: base_url,
|
3275
|
+
oauth2_scopes: [],
|
3276
|
+
operation_id: 'hris_get_time_off_type',
|
3277
|
+
security_source: @sdk_configuration.security_source
|
3278
|
+
)
|
3279
|
+
|
3280
|
+
error = T.let(nil, T.nilable(StandardError))
|
3281
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
3282
|
+
|
3283
|
+
begin
|
3284
|
+
r = connection.get(url) do |req|
|
3285
|
+
req.headers.merge!(headers)
|
3286
|
+
req.options.timeout = timeout unless timeout.nil?
|
3287
|
+
req.params = query_params
|
3288
|
+
Utils.configure_request_security(req, security)
|
3289
|
+
|
3290
|
+
@sdk_configuration.hooks.before_request(
|
3291
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
3292
|
+
hook_ctx: hook_ctx
|
3293
|
+
),
|
3294
|
+
request: req
|
3295
|
+
)
|
3296
|
+
end
|
3297
|
+
rescue StandardError => e
|
3298
|
+
error = e
|
3299
|
+
ensure
|
3300
|
+
if r.nil? || Utils.error_status?(r.status)
|
3301
|
+
r = @sdk_configuration.hooks.after_error(
|
3302
|
+
error: error,
|
3303
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
3304
|
+
hook_ctx: hook_ctx
|
3305
|
+
),
|
3306
|
+
response: r
|
3307
|
+
)
|
3308
|
+
else
|
3309
|
+
r = @sdk_configuration.hooks.after_success(
|
3310
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
3311
|
+
hook_ctx: hook_ctx
|
3312
|
+
),
|
3313
|
+
response: r
|
3314
|
+
)
|
3315
|
+
end
|
3316
|
+
|
3317
|
+
if r.nil?
|
3318
|
+
raise error if !error.nil?
|
3319
|
+
raise 'no response'
|
3320
|
+
end
|
1862
3321
|
end
|
1863
3322
|
|
1864
3323
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -1881,8 +3340,8 @@ module StackOne
|
|
1881
3340
|
end
|
1882
3341
|
|
1883
3342
|
|
1884
|
-
sig { params(hris_invite_employee_request_dto: ::StackOne::Shared::HrisInviteEmployeeRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisInviteEmployeeResponse) }
|
1885
|
-
def invite_employee(hris_invite_employee_request_dto, id, x_account_id, retries = nil)
|
3343
|
+
sig { params(hris_invite_employee_request_dto: ::StackOne::Shared::HrisInviteEmployeeRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisInviteEmployeeResponse) }
|
3344
|
+
def invite_employee(hris_invite_employee_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
|
1886
3345
|
# invite_employee - Invite Employee
|
1887
3346
|
request = ::StackOne::Operations::HrisInviteEmployeeRequest.new(
|
1888
3347
|
|
@@ -1902,6 +3361,14 @@ module StackOne
|
|
1902
3361
|
req_content_type, data, form = Utils.serialize_request_body(request, :hris_invite_employee_request_dto, :json)
|
1903
3362
|
headers['content-type'] = req_content_type
|
1904
3363
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
3364
|
+
|
3365
|
+
if form
|
3366
|
+
body = Utils.encode_form(form)
|
3367
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
3368
|
+
body = URI.encode_www_form(data)
|
3369
|
+
else
|
3370
|
+
body = data
|
3371
|
+
end
|
1905
3372
|
headers['Accept'] = 'application/json'
|
1906
3373
|
headers['user-agent'] = @sdk_configuration.user_agent
|
1907
3374
|
retries ||= @sdk_configuration.retry_config
|
@@ -1918,19 +3385,61 @@ module StackOne
|
|
1918
3385
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1919
3386
|
retry_options[:retry_statuses] = [429, 408]
|
1920
3387
|
|
3388
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
3389
|
+
|
3390
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
3391
|
+
timeout ||= @sdk_configuration.timeout
|
3392
|
+
|
1921
3393
|
connection = @sdk_configuration.client.dup
|
1922
3394
|
connection.request :retry, retry_options
|
1923
3395
|
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
3396
|
+
hook_ctx = SDKHooks::HookContext.new(
|
3397
|
+
base_url: base_url,
|
3398
|
+
oauth2_scopes: [],
|
3399
|
+
operation_id: 'hris_invite_employee',
|
3400
|
+
security_source: @sdk_configuration.security_source
|
3401
|
+
)
|
3402
|
+
|
3403
|
+
error = T.let(nil, T.nilable(StandardError))
|
3404
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
3405
|
+
|
3406
|
+
begin
|
3407
|
+
r = connection.post(url) do |req|
|
3408
|
+
req.body = body
|
3409
|
+
req.headers.merge!(headers)
|
3410
|
+
req.options.timeout = timeout unless timeout.nil?
|
3411
|
+
Utils.configure_request_security(req, security)
|
3412
|
+
|
3413
|
+
@sdk_configuration.hooks.before_request(
|
3414
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
3415
|
+
hook_ctx: hook_ctx
|
3416
|
+
),
|
3417
|
+
request: req
|
3418
|
+
)
|
3419
|
+
end
|
3420
|
+
rescue StandardError => e
|
3421
|
+
error = e
|
3422
|
+
ensure
|
3423
|
+
if r.nil? || Utils.error_status?(r.status)
|
3424
|
+
r = @sdk_configuration.hooks.after_error(
|
3425
|
+
error: error,
|
3426
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
3427
|
+
hook_ctx: hook_ctx
|
3428
|
+
),
|
3429
|
+
response: r
|
3430
|
+
)
|
1932
3431
|
else
|
1933
|
-
|
3432
|
+
r = @sdk_configuration.hooks.after_success(
|
3433
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
3434
|
+
hook_ctx: hook_ctx
|
3435
|
+
),
|
3436
|
+
response: r
|
3437
|
+
)
|
3438
|
+
end
|
3439
|
+
|
3440
|
+
if r.nil?
|
3441
|
+
raise error if !error.nil?
|
3442
|
+
raise 'no response'
|
1934
3443
|
end
|
1935
3444
|
end
|
1936
3445
|
|
@@ -1954,8 +3463,8 @@ module StackOne
|
|
1954
3463
|
end
|
1955
3464
|
|
1956
3465
|
|
1957
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListBenefitsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListBenefitsResponse) }
|
1958
|
-
def list_benefits(request, retries = nil)
|
3466
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListBenefitsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListBenefitsResponse) }
|
3467
|
+
def list_benefits(request, retries = nil, timeout_ms = nil)
|
1959
3468
|
# list_benefits - List benefits
|
1960
3469
|
url, params = @sdk_configuration.get_server_details
|
1961
3470
|
base_url = Utils.template_url(url, params)
|
@@ -1978,14 +3487,62 @@ module StackOne
|
|
1978
3487
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
1979
3488
|
retry_options[:retry_statuses] = [429, 408]
|
1980
3489
|
|
3490
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
3491
|
+
|
3492
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
3493
|
+
timeout ||= @sdk_configuration.timeout
|
3494
|
+
|
1981
3495
|
connection = @sdk_configuration.client.dup
|
1982
3496
|
connection.request :retry, retry_options
|
1983
3497
|
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
|
1988
|
-
|
3498
|
+
hook_ctx = SDKHooks::HookContext.new(
|
3499
|
+
base_url: base_url,
|
3500
|
+
oauth2_scopes: [],
|
3501
|
+
operation_id: 'hris_list_benefits',
|
3502
|
+
security_source: @sdk_configuration.security_source
|
3503
|
+
)
|
3504
|
+
|
3505
|
+
error = T.let(nil, T.nilable(StandardError))
|
3506
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
3507
|
+
|
3508
|
+
begin
|
3509
|
+
r = connection.get(url) do |req|
|
3510
|
+
req.headers.merge!(headers)
|
3511
|
+
req.options.timeout = timeout unless timeout.nil?
|
3512
|
+
req.params = query_params
|
3513
|
+
Utils.configure_request_security(req, security)
|
3514
|
+
|
3515
|
+
@sdk_configuration.hooks.before_request(
|
3516
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
3517
|
+
hook_ctx: hook_ctx
|
3518
|
+
),
|
3519
|
+
request: req
|
3520
|
+
)
|
3521
|
+
end
|
3522
|
+
rescue StandardError => e
|
3523
|
+
error = e
|
3524
|
+
ensure
|
3525
|
+
if r.nil? || Utils.error_status?(r.status)
|
3526
|
+
r = @sdk_configuration.hooks.after_error(
|
3527
|
+
error: error,
|
3528
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
3529
|
+
hook_ctx: hook_ctx
|
3530
|
+
),
|
3531
|
+
response: r
|
3532
|
+
)
|
3533
|
+
else
|
3534
|
+
r = @sdk_configuration.hooks.after_success(
|
3535
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
3536
|
+
hook_ctx: hook_ctx
|
3537
|
+
),
|
3538
|
+
response: r
|
3539
|
+
)
|
3540
|
+
end
|
3541
|
+
|
3542
|
+
if r.nil?
|
3543
|
+
raise error if !error.nil?
|
3544
|
+
raise 'no response'
|
3545
|
+
end
|
1989
3546
|
end
|
1990
3547
|
|
1991
3548
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2008,8 +3565,8 @@ module StackOne
|
|
2008
3565
|
end
|
2009
3566
|
|
2010
3567
|
|
2011
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListCompaniesRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListCompaniesResponse) }
|
2012
|
-
def list_companies(request, retries = nil)
|
3568
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListCompaniesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListCompaniesResponse) }
|
3569
|
+
def list_companies(request, retries = nil, timeout_ms = nil)
|
2013
3570
|
# list_companies - List Companies
|
2014
3571
|
url, params = @sdk_configuration.get_server_details
|
2015
3572
|
base_url = Utils.template_url(url, params)
|
@@ -2032,14 +3589,62 @@ module StackOne
|
|
2032
3589
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2033
3590
|
retry_options[:retry_statuses] = [429, 408]
|
2034
3591
|
|
3592
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
3593
|
+
|
3594
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
3595
|
+
timeout ||= @sdk_configuration.timeout
|
3596
|
+
|
2035
3597
|
connection = @sdk_configuration.client.dup
|
2036
3598
|
connection.request :retry, retry_options
|
2037
3599
|
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
3600
|
+
hook_ctx = SDKHooks::HookContext.new(
|
3601
|
+
base_url: base_url,
|
3602
|
+
oauth2_scopes: [],
|
3603
|
+
operation_id: 'hris_list_companies',
|
3604
|
+
security_source: @sdk_configuration.security_source
|
3605
|
+
)
|
3606
|
+
|
3607
|
+
error = T.let(nil, T.nilable(StandardError))
|
3608
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
3609
|
+
|
3610
|
+
begin
|
3611
|
+
r = connection.get(url) do |req|
|
3612
|
+
req.headers.merge!(headers)
|
3613
|
+
req.options.timeout = timeout unless timeout.nil?
|
3614
|
+
req.params = query_params
|
3615
|
+
Utils.configure_request_security(req, security)
|
3616
|
+
|
3617
|
+
@sdk_configuration.hooks.before_request(
|
3618
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
3619
|
+
hook_ctx: hook_ctx
|
3620
|
+
),
|
3621
|
+
request: req
|
3622
|
+
)
|
3623
|
+
end
|
3624
|
+
rescue StandardError => e
|
3625
|
+
error = e
|
3626
|
+
ensure
|
3627
|
+
if r.nil? || Utils.error_status?(r.status)
|
3628
|
+
r = @sdk_configuration.hooks.after_error(
|
3629
|
+
error: error,
|
3630
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
3631
|
+
hook_ctx: hook_ctx
|
3632
|
+
),
|
3633
|
+
response: r
|
3634
|
+
)
|
3635
|
+
else
|
3636
|
+
r = @sdk_configuration.hooks.after_success(
|
3637
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
3638
|
+
hook_ctx: hook_ctx
|
3639
|
+
),
|
3640
|
+
response: r
|
3641
|
+
)
|
3642
|
+
end
|
3643
|
+
|
3644
|
+
if r.nil?
|
3645
|
+
raise error if !error.nil?
|
3646
|
+
raise 'no response'
|
3647
|
+
end
|
2043
3648
|
end
|
2044
3649
|
|
2045
3650
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2062,8 +3667,8 @@ module StackOne
|
|
2062
3667
|
end
|
2063
3668
|
|
2064
3669
|
|
2065
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListCostCenterGroupsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListCostCenterGroupsResponse) }
|
2066
|
-
def list_cost_center_groups(request, retries = nil)
|
3670
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListCostCenterGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListCostCenterGroupsResponse) }
|
3671
|
+
def list_cost_center_groups(request, retries = nil, timeout_ms = nil)
|
2067
3672
|
# list_cost_center_groups - List Cost Center Groups
|
2068
3673
|
url, params = @sdk_configuration.get_server_details
|
2069
3674
|
base_url = Utils.template_url(url, params)
|
@@ -2086,14 +3691,62 @@ module StackOne
|
|
2086
3691
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2087
3692
|
retry_options[:retry_statuses] = [429, 408]
|
2088
3693
|
|
3694
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
3695
|
+
|
3696
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
3697
|
+
timeout ||= @sdk_configuration.timeout
|
3698
|
+
|
2089
3699
|
connection = @sdk_configuration.client.dup
|
2090
3700
|
connection.request :retry, retry_options
|
2091
3701
|
|
2092
|
-
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
3702
|
+
hook_ctx = SDKHooks::HookContext.new(
|
3703
|
+
base_url: base_url,
|
3704
|
+
oauth2_scopes: [],
|
3705
|
+
operation_id: 'hris_list_cost_center_groups',
|
3706
|
+
security_source: @sdk_configuration.security_source
|
3707
|
+
)
|
3708
|
+
|
3709
|
+
error = T.let(nil, T.nilable(StandardError))
|
3710
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
3711
|
+
|
3712
|
+
begin
|
3713
|
+
r = connection.get(url) do |req|
|
3714
|
+
req.headers.merge!(headers)
|
3715
|
+
req.options.timeout = timeout unless timeout.nil?
|
3716
|
+
req.params = query_params
|
3717
|
+
Utils.configure_request_security(req, security)
|
3718
|
+
|
3719
|
+
@sdk_configuration.hooks.before_request(
|
3720
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
3721
|
+
hook_ctx: hook_ctx
|
3722
|
+
),
|
3723
|
+
request: req
|
3724
|
+
)
|
3725
|
+
end
|
3726
|
+
rescue StandardError => e
|
3727
|
+
error = e
|
3728
|
+
ensure
|
3729
|
+
if r.nil? || Utils.error_status?(r.status)
|
3730
|
+
r = @sdk_configuration.hooks.after_error(
|
3731
|
+
error: error,
|
3732
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
3733
|
+
hook_ctx: hook_ctx
|
3734
|
+
),
|
3735
|
+
response: r
|
3736
|
+
)
|
3737
|
+
else
|
3738
|
+
r = @sdk_configuration.hooks.after_success(
|
3739
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
3740
|
+
hook_ctx: hook_ctx
|
3741
|
+
),
|
3742
|
+
response: r
|
3743
|
+
)
|
3744
|
+
end
|
3745
|
+
|
3746
|
+
if r.nil?
|
3747
|
+
raise error if !error.nil?
|
3748
|
+
raise 'no response'
|
3749
|
+
end
|
2097
3750
|
end
|
2098
3751
|
|
2099
3752
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2116,8 +3769,8 @@ module StackOne
|
|
2116
3769
|
end
|
2117
3770
|
|
2118
3771
|
|
2119
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListDepartmentGroupsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListDepartmentGroupsResponse) }
|
2120
|
-
def list_department_groups(request, retries = nil)
|
3772
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListDepartmentGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListDepartmentGroupsResponse) }
|
3773
|
+
def list_department_groups(request, retries = nil, timeout_ms = nil)
|
2121
3774
|
# list_department_groups - List Department Groups
|
2122
3775
|
url, params = @sdk_configuration.get_server_details
|
2123
3776
|
base_url = Utils.template_url(url, params)
|
@@ -2140,14 +3793,62 @@ module StackOne
|
|
2140
3793
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2141
3794
|
retry_options[:retry_statuses] = [429, 408]
|
2142
3795
|
|
3796
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
3797
|
+
|
3798
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
3799
|
+
timeout ||= @sdk_configuration.timeout
|
3800
|
+
|
2143
3801
|
connection = @sdk_configuration.client.dup
|
2144
3802
|
connection.request :retry, retry_options
|
2145
3803
|
|
2146
|
-
|
2147
|
-
|
2148
|
-
|
2149
|
-
|
2150
|
-
|
3804
|
+
hook_ctx = SDKHooks::HookContext.new(
|
3805
|
+
base_url: base_url,
|
3806
|
+
oauth2_scopes: [],
|
3807
|
+
operation_id: 'hris_list_department_groups',
|
3808
|
+
security_source: @sdk_configuration.security_source
|
3809
|
+
)
|
3810
|
+
|
3811
|
+
error = T.let(nil, T.nilable(StandardError))
|
3812
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
3813
|
+
|
3814
|
+
begin
|
3815
|
+
r = connection.get(url) do |req|
|
3816
|
+
req.headers.merge!(headers)
|
3817
|
+
req.options.timeout = timeout unless timeout.nil?
|
3818
|
+
req.params = query_params
|
3819
|
+
Utils.configure_request_security(req, security)
|
3820
|
+
|
3821
|
+
@sdk_configuration.hooks.before_request(
|
3822
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
3823
|
+
hook_ctx: hook_ctx
|
3824
|
+
),
|
3825
|
+
request: req
|
3826
|
+
)
|
3827
|
+
end
|
3828
|
+
rescue StandardError => e
|
3829
|
+
error = e
|
3830
|
+
ensure
|
3831
|
+
if r.nil? || Utils.error_status?(r.status)
|
3832
|
+
r = @sdk_configuration.hooks.after_error(
|
3833
|
+
error: error,
|
3834
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
3835
|
+
hook_ctx: hook_ctx
|
3836
|
+
),
|
3837
|
+
response: r
|
3838
|
+
)
|
3839
|
+
else
|
3840
|
+
r = @sdk_configuration.hooks.after_success(
|
3841
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
3842
|
+
hook_ctx: hook_ctx
|
3843
|
+
),
|
3844
|
+
response: r
|
3845
|
+
)
|
3846
|
+
end
|
3847
|
+
|
3848
|
+
if r.nil?
|
3849
|
+
raise error if !error.nil?
|
3850
|
+
raise 'no response'
|
3851
|
+
end
|
2151
3852
|
end
|
2152
3853
|
|
2153
3854
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2170,8 +3871,8 @@ module StackOne
|
|
2170
3871
|
end
|
2171
3872
|
|
2172
3873
|
|
2173
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeCategoriesRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListEmployeeCategoriesResponse) }
|
2174
|
-
def list_employee_categories(request, retries = nil)
|
3874
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeCategoriesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListEmployeeCategoriesResponse) }
|
3875
|
+
def list_employee_categories(request, retries = nil, timeout_ms = nil)
|
2175
3876
|
# list_employee_categories - List Employee Document Categories
|
2176
3877
|
url, params = @sdk_configuration.get_server_details
|
2177
3878
|
base_url = Utils.template_url(url, params)
|
@@ -2194,14 +3895,62 @@ module StackOne
|
|
2194
3895
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2195
3896
|
retry_options[:retry_statuses] = [429, 408]
|
2196
3897
|
|
3898
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
3899
|
+
|
3900
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
3901
|
+
timeout ||= @sdk_configuration.timeout
|
3902
|
+
|
2197
3903
|
connection = @sdk_configuration.client.dup
|
2198
3904
|
connection.request :retry, retry_options
|
2199
3905
|
|
2200
|
-
|
2201
|
-
|
2202
|
-
|
2203
|
-
|
2204
|
-
|
3906
|
+
hook_ctx = SDKHooks::HookContext.new(
|
3907
|
+
base_url: base_url,
|
3908
|
+
oauth2_scopes: [],
|
3909
|
+
operation_id: 'hris_list_employee_categories',
|
3910
|
+
security_source: @sdk_configuration.security_source
|
3911
|
+
)
|
3912
|
+
|
3913
|
+
error = T.let(nil, T.nilable(StandardError))
|
3914
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
3915
|
+
|
3916
|
+
begin
|
3917
|
+
r = connection.get(url) do |req|
|
3918
|
+
req.headers.merge!(headers)
|
3919
|
+
req.options.timeout = timeout unless timeout.nil?
|
3920
|
+
req.params = query_params
|
3921
|
+
Utils.configure_request_security(req, security)
|
3922
|
+
|
3923
|
+
@sdk_configuration.hooks.before_request(
|
3924
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
3925
|
+
hook_ctx: hook_ctx
|
3926
|
+
),
|
3927
|
+
request: req
|
3928
|
+
)
|
3929
|
+
end
|
3930
|
+
rescue StandardError => e
|
3931
|
+
error = e
|
3932
|
+
ensure
|
3933
|
+
if r.nil? || Utils.error_status?(r.status)
|
3934
|
+
r = @sdk_configuration.hooks.after_error(
|
3935
|
+
error: error,
|
3936
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
3937
|
+
hook_ctx: hook_ctx
|
3938
|
+
),
|
3939
|
+
response: r
|
3940
|
+
)
|
3941
|
+
else
|
3942
|
+
r = @sdk_configuration.hooks.after_success(
|
3943
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
3944
|
+
hook_ctx: hook_ctx
|
3945
|
+
),
|
3946
|
+
response: r
|
3947
|
+
)
|
3948
|
+
end
|
3949
|
+
|
3950
|
+
if r.nil?
|
3951
|
+
raise error if !error.nil?
|
3952
|
+
raise 'no response'
|
3953
|
+
end
|
2205
3954
|
end
|
2206
3955
|
|
2207
3956
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2224,8 +3973,8 @@ module StackOne
|
|
2224
3973
|
end
|
2225
3974
|
|
2226
3975
|
|
2227
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeCustomFieldDefinitionsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListEmployeeCustomFieldDefinitionsResponse) }
|
2228
|
-
def list_employee_custom_field_definitions(request, retries = nil)
|
3976
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeCustomFieldDefinitionsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListEmployeeCustomFieldDefinitionsResponse) }
|
3977
|
+
def list_employee_custom_field_definitions(request, retries = nil, timeout_ms = nil)
|
2229
3978
|
# list_employee_custom_field_definitions - List employee Custom Field Definitions
|
2230
3979
|
url, params = @sdk_configuration.get_server_details
|
2231
3980
|
base_url = Utils.template_url(url, params)
|
@@ -2248,14 +3997,62 @@ module StackOne
|
|
2248
3997
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2249
3998
|
retry_options[:retry_statuses] = [429, 408]
|
2250
3999
|
|
4000
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
4001
|
+
|
4002
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
4003
|
+
timeout ||= @sdk_configuration.timeout
|
4004
|
+
|
2251
4005
|
connection = @sdk_configuration.client.dup
|
2252
4006
|
connection.request :retry, retry_options
|
2253
4007
|
|
2254
|
-
|
2255
|
-
|
2256
|
-
|
2257
|
-
|
2258
|
-
|
4008
|
+
hook_ctx = SDKHooks::HookContext.new(
|
4009
|
+
base_url: base_url,
|
4010
|
+
oauth2_scopes: [],
|
4011
|
+
operation_id: 'hris_list_employee_custom_field_definitions',
|
4012
|
+
security_source: @sdk_configuration.security_source
|
4013
|
+
)
|
4014
|
+
|
4015
|
+
error = T.let(nil, T.nilable(StandardError))
|
4016
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
4017
|
+
|
4018
|
+
begin
|
4019
|
+
r = connection.get(url) do |req|
|
4020
|
+
req.headers.merge!(headers)
|
4021
|
+
req.options.timeout = timeout unless timeout.nil?
|
4022
|
+
req.params = query_params
|
4023
|
+
Utils.configure_request_security(req, security)
|
4024
|
+
|
4025
|
+
@sdk_configuration.hooks.before_request(
|
4026
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
4027
|
+
hook_ctx: hook_ctx
|
4028
|
+
),
|
4029
|
+
request: req
|
4030
|
+
)
|
4031
|
+
end
|
4032
|
+
rescue StandardError => e
|
4033
|
+
error = e
|
4034
|
+
ensure
|
4035
|
+
if r.nil? || Utils.error_status?(r.status)
|
4036
|
+
r = @sdk_configuration.hooks.after_error(
|
4037
|
+
error: error,
|
4038
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
4039
|
+
hook_ctx: hook_ctx
|
4040
|
+
),
|
4041
|
+
response: r
|
4042
|
+
)
|
4043
|
+
else
|
4044
|
+
r = @sdk_configuration.hooks.after_success(
|
4045
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
4046
|
+
hook_ctx: hook_ctx
|
4047
|
+
),
|
4048
|
+
response: r
|
4049
|
+
)
|
4050
|
+
end
|
4051
|
+
|
4052
|
+
if r.nil?
|
4053
|
+
raise error if !error.nil?
|
4054
|
+
raise 'no response'
|
4055
|
+
end
|
2259
4056
|
end
|
2260
4057
|
|
2261
4058
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2278,8 +4075,8 @@ module StackOne
|
|
2278
4075
|
end
|
2279
4076
|
|
2280
4077
|
|
2281
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeDocumentsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListEmployeeDocumentsResponse) }
|
2282
|
-
def list_employee_documents(request, retries = nil)
|
4078
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeDocumentsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListEmployeeDocumentsResponse) }
|
4079
|
+
def list_employee_documents(request, retries = nil, timeout_ms = nil)
|
2283
4080
|
# list_employee_documents - List Employee Documents
|
2284
4081
|
url, params = @sdk_configuration.get_server_details
|
2285
4082
|
base_url = Utils.template_url(url, params)
|
@@ -2307,14 +4104,62 @@ module StackOne
|
|
2307
4104
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2308
4105
|
retry_options[:retry_statuses] = [429, 408]
|
2309
4106
|
|
4107
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
4108
|
+
|
4109
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
4110
|
+
timeout ||= @sdk_configuration.timeout
|
4111
|
+
|
2310
4112
|
connection = @sdk_configuration.client.dup
|
2311
4113
|
connection.request :retry, retry_options
|
2312
4114
|
|
2313
|
-
|
2314
|
-
|
2315
|
-
|
2316
|
-
|
2317
|
-
|
4115
|
+
hook_ctx = SDKHooks::HookContext.new(
|
4116
|
+
base_url: base_url,
|
4117
|
+
oauth2_scopes: [],
|
4118
|
+
operation_id: 'hris_list_employee_documents',
|
4119
|
+
security_source: @sdk_configuration.security_source
|
4120
|
+
)
|
4121
|
+
|
4122
|
+
error = T.let(nil, T.nilable(StandardError))
|
4123
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
4124
|
+
|
4125
|
+
begin
|
4126
|
+
r = connection.get(url) do |req|
|
4127
|
+
req.headers.merge!(headers)
|
4128
|
+
req.options.timeout = timeout unless timeout.nil?
|
4129
|
+
req.params = query_params
|
4130
|
+
Utils.configure_request_security(req, security)
|
4131
|
+
|
4132
|
+
@sdk_configuration.hooks.before_request(
|
4133
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
4134
|
+
hook_ctx: hook_ctx
|
4135
|
+
),
|
4136
|
+
request: req
|
4137
|
+
)
|
4138
|
+
end
|
4139
|
+
rescue StandardError => e
|
4140
|
+
error = e
|
4141
|
+
ensure
|
4142
|
+
if r.nil? || Utils.error_status?(r.status)
|
4143
|
+
r = @sdk_configuration.hooks.after_error(
|
4144
|
+
error: error,
|
4145
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
4146
|
+
hook_ctx: hook_ctx
|
4147
|
+
),
|
4148
|
+
response: r
|
4149
|
+
)
|
4150
|
+
else
|
4151
|
+
r = @sdk_configuration.hooks.after_success(
|
4152
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
4153
|
+
hook_ctx: hook_ctx
|
4154
|
+
),
|
4155
|
+
response: r
|
4156
|
+
)
|
4157
|
+
end
|
4158
|
+
|
4159
|
+
if r.nil?
|
4160
|
+
raise error if !error.nil?
|
4161
|
+
raise 'no response'
|
4162
|
+
end
|
2318
4163
|
end
|
2319
4164
|
|
2320
4165
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2337,8 +4182,8 @@ module StackOne
|
|
2337
4182
|
end
|
2338
4183
|
|
2339
4184
|
|
2340
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeEmploymentsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListEmployeeEmploymentsResponse) }
|
2341
|
-
def list_employee_employments(request, retries = nil)
|
4185
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeEmploymentsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListEmployeeEmploymentsResponse) }
|
4186
|
+
def list_employee_employments(request, retries = nil, timeout_ms = nil)
|
2342
4187
|
# list_employee_employments - List Employee Employments
|
2343
4188
|
url, params = @sdk_configuration.get_server_details
|
2344
4189
|
base_url = Utils.template_url(url, params)
|
@@ -2366,14 +4211,62 @@ module StackOne
|
|
2366
4211
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2367
4212
|
retry_options[:retry_statuses] = [429, 408]
|
2368
4213
|
|
4214
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
4215
|
+
|
4216
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
4217
|
+
timeout ||= @sdk_configuration.timeout
|
4218
|
+
|
2369
4219
|
connection = @sdk_configuration.client.dup
|
2370
4220
|
connection.request :retry, retry_options
|
2371
4221
|
|
2372
|
-
|
2373
|
-
|
2374
|
-
|
2375
|
-
|
2376
|
-
|
4222
|
+
hook_ctx = SDKHooks::HookContext.new(
|
4223
|
+
base_url: base_url,
|
4224
|
+
oauth2_scopes: [],
|
4225
|
+
operation_id: 'hris_list_employee_employments',
|
4226
|
+
security_source: @sdk_configuration.security_source
|
4227
|
+
)
|
4228
|
+
|
4229
|
+
error = T.let(nil, T.nilable(StandardError))
|
4230
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
4231
|
+
|
4232
|
+
begin
|
4233
|
+
r = connection.get(url) do |req|
|
4234
|
+
req.headers.merge!(headers)
|
4235
|
+
req.options.timeout = timeout unless timeout.nil?
|
4236
|
+
req.params = query_params
|
4237
|
+
Utils.configure_request_security(req, security)
|
4238
|
+
|
4239
|
+
@sdk_configuration.hooks.before_request(
|
4240
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
4241
|
+
hook_ctx: hook_ctx
|
4242
|
+
),
|
4243
|
+
request: req
|
4244
|
+
)
|
4245
|
+
end
|
4246
|
+
rescue StandardError => e
|
4247
|
+
error = e
|
4248
|
+
ensure
|
4249
|
+
if r.nil? || Utils.error_status?(r.status)
|
4250
|
+
r = @sdk_configuration.hooks.after_error(
|
4251
|
+
error: error,
|
4252
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
4253
|
+
hook_ctx: hook_ctx
|
4254
|
+
),
|
4255
|
+
response: r
|
4256
|
+
)
|
4257
|
+
else
|
4258
|
+
r = @sdk_configuration.hooks.after_success(
|
4259
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
4260
|
+
hook_ctx: hook_ctx
|
4261
|
+
),
|
4262
|
+
response: r
|
4263
|
+
)
|
4264
|
+
end
|
4265
|
+
|
4266
|
+
if r.nil?
|
4267
|
+
raise error if !error.nil?
|
4268
|
+
raise 'no response'
|
4269
|
+
end
|
2377
4270
|
end
|
2378
4271
|
|
2379
4272
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2396,8 +4289,8 @@ module StackOne
|
|
2396
4289
|
end
|
2397
4290
|
|
2398
4291
|
|
2399
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeSkillsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListEmployeeSkillsResponse) }
|
2400
|
-
def list_employee_skills(request, retries = nil)
|
4292
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeSkillsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListEmployeeSkillsResponse) }
|
4293
|
+
def list_employee_skills(request, retries = nil, timeout_ms = nil)
|
2401
4294
|
# list_employee_skills - List Employee Skills
|
2402
4295
|
url, params = @sdk_configuration.get_server_details
|
2403
4296
|
base_url = Utils.template_url(url, params)
|
@@ -2425,14 +4318,62 @@ module StackOne
|
|
2425
4318
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2426
4319
|
retry_options[:retry_statuses] = [429, 408]
|
2427
4320
|
|
4321
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
4322
|
+
|
4323
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
4324
|
+
timeout ||= @sdk_configuration.timeout
|
4325
|
+
|
2428
4326
|
connection = @sdk_configuration.client.dup
|
2429
4327
|
connection.request :retry, retry_options
|
2430
4328
|
|
2431
|
-
|
2432
|
-
|
2433
|
-
|
2434
|
-
|
2435
|
-
|
4329
|
+
hook_ctx = SDKHooks::HookContext.new(
|
4330
|
+
base_url: base_url,
|
4331
|
+
oauth2_scopes: [],
|
4332
|
+
operation_id: 'hris_list_employee_skills',
|
4333
|
+
security_source: @sdk_configuration.security_source
|
4334
|
+
)
|
4335
|
+
|
4336
|
+
error = T.let(nil, T.nilable(StandardError))
|
4337
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
4338
|
+
|
4339
|
+
begin
|
4340
|
+
r = connection.get(url) do |req|
|
4341
|
+
req.headers.merge!(headers)
|
4342
|
+
req.options.timeout = timeout unless timeout.nil?
|
4343
|
+
req.params = query_params
|
4344
|
+
Utils.configure_request_security(req, security)
|
4345
|
+
|
4346
|
+
@sdk_configuration.hooks.before_request(
|
4347
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
4348
|
+
hook_ctx: hook_ctx
|
4349
|
+
),
|
4350
|
+
request: req
|
4351
|
+
)
|
4352
|
+
end
|
4353
|
+
rescue StandardError => e
|
4354
|
+
error = e
|
4355
|
+
ensure
|
4356
|
+
if r.nil? || Utils.error_status?(r.status)
|
4357
|
+
r = @sdk_configuration.hooks.after_error(
|
4358
|
+
error: error,
|
4359
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
4360
|
+
hook_ctx: hook_ctx
|
4361
|
+
),
|
4362
|
+
response: r
|
4363
|
+
)
|
4364
|
+
else
|
4365
|
+
r = @sdk_configuration.hooks.after_success(
|
4366
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
4367
|
+
hook_ctx: hook_ctx
|
4368
|
+
),
|
4369
|
+
response: r
|
4370
|
+
)
|
4371
|
+
end
|
4372
|
+
|
4373
|
+
if r.nil?
|
4374
|
+
raise error if !error.nil?
|
4375
|
+
raise 'no response'
|
4376
|
+
end
|
2436
4377
|
end
|
2437
4378
|
|
2438
4379
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2455,8 +4396,8 @@ module StackOne
|
|
2455
4396
|
end
|
2456
4397
|
|
2457
4398
|
|
2458
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeTimeOffBalancesRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListEmployeeTimeOffBalancesResponse) }
|
2459
|
-
def list_employee_time_off_balances(request, retries = nil)
|
4399
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeTimeOffBalancesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListEmployeeTimeOffBalancesResponse) }
|
4400
|
+
def list_employee_time_off_balances(request, retries = nil, timeout_ms = nil)
|
2460
4401
|
# list_employee_time_off_balances - List Employee Time Off Balances
|
2461
4402
|
url, params = @sdk_configuration.get_server_details
|
2462
4403
|
base_url = Utils.template_url(url, params)
|
@@ -2484,14 +4425,62 @@ module StackOne
|
|
2484
4425
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2485
4426
|
retry_options[:retry_statuses] = [429, 408]
|
2486
4427
|
|
4428
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
4429
|
+
|
4430
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
4431
|
+
timeout ||= @sdk_configuration.timeout
|
4432
|
+
|
2487
4433
|
connection = @sdk_configuration.client.dup
|
2488
4434
|
connection.request :retry, retry_options
|
2489
4435
|
|
2490
|
-
|
2491
|
-
|
2492
|
-
|
2493
|
-
|
2494
|
-
|
4436
|
+
hook_ctx = SDKHooks::HookContext.new(
|
4437
|
+
base_url: base_url,
|
4438
|
+
oauth2_scopes: [],
|
4439
|
+
operation_id: 'hris_list_employee_time_off_balances',
|
4440
|
+
security_source: @sdk_configuration.security_source
|
4441
|
+
)
|
4442
|
+
|
4443
|
+
error = T.let(nil, T.nilable(StandardError))
|
4444
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
4445
|
+
|
4446
|
+
begin
|
4447
|
+
r = connection.get(url) do |req|
|
4448
|
+
req.headers.merge!(headers)
|
4449
|
+
req.options.timeout = timeout unless timeout.nil?
|
4450
|
+
req.params = query_params
|
4451
|
+
Utils.configure_request_security(req, security)
|
4452
|
+
|
4453
|
+
@sdk_configuration.hooks.before_request(
|
4454
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
4455
|
+
hook_ctx: hook_ctx
|
4456
|
+
),
|
4457
|
+
request: req
|
4458
|
+
)
|
4459
|
+
end
|
4460
|
+
rescue StandardError => e
|
4461
|
+
error = e
|
4462
|
+
ensure
|
4463
|
+
if r.nil? || Utils.error_status?(r.status)
|
4464
|
+
r = @sdk_configuration.hooks.after_error(
|
4465
|
+
error: error,
|
4466
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
4467
|
+
hook_ctx: hook_ctx
|
4468
|
+
),
|
4469
|
+
response: r
|
4470
|
+
)
|
4471
|
+
else
|
4472
|
+
r = @sdk_configuration.hooks.after_success(
|
4473
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
4474
|
+
hook_ctx: hook_ctx
|
4475
|
+
),
|
4476
|
+
response: r
|
4477
|
+
)
|
4478
|
+
end
|
4479
|
+
|
4480
|
+
if r.nil?
|
4481
|
+
raise error if !error.nil?
|
4482
|
+
raise 'no response'
|
4483
|
+
end
|
2495
4484
|
end
|
2496
4485
|
|
2497
4486
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2514,8 +4503,8 @@ module StackOne
|
|
2514
4503
|
end
|
2515
4504
|
|
2516
4505
|
|
2517
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeTimeOffRequestsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListEmployeeTimeOffRequestsResponse) }
|
2518
|
-
def list_employee_time_off_requests(request, retries = nil)
|
4506
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeTimeOffRequestsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListEmployeeTimeOffRequestsResponse) }
|
4507
|
+
def list_employee_time_off_requests(request, retries = nil, timeout_ms = nil)
|
2519
4508
|
# list_employee_time_off_requests - List Employee Time Off Requests
|
2520
4509
|
url, params = @sdk_configuration.get_server_details
|
2521
4510
|
base_url = Utils.template_url(url, params)
|
@@ -2543,14 +4532,62 @@ module StackOne
|
|
2543
4532
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2544
4533
|
retry_options[:retry_statuses] = [429, 408]
|
2545
4534
|
|
4535
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
4536
|
+
|
4537
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
4538
|
+
timeout ||= @sdk_configuration.timeout
|
4539
|
+
|
2546
4540
|
connection = @sdk_configuration.client.dup
|
2547
4541
|
connection.request :retry, retry_options
|
2548
4542
|
|
2549
|
-
|
2550
|
-
|
2551
|
-
|
2552
|
-
|
2553
|
-
|
4543
|
+
hook_ctx = SDKHooks::HookContext.new(
|
4544
|
+
base_url: base_url,
|
4545
|
+
oauth2_scopes: [],
|
4546
|
+
operation_id: 'hris_list_employee_time_off_requests',
|
4547
|
+
security_source: @sdk_configuration.security_source
|
4548
|
+
)
|
4549
|
+
|
4550
|
+
error = T.let(nil, T.nilable(StandardError))
|
4551
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
4552
|
+
|
4553
|
+
begin
|
4554
|
+
r = connection.get(url) do |req|
|
4555
|
+
req.headers.merge!(headers)
|
4556
|
+
req.options.timeout = timeout unless timeout.nil?
|
4557
|
+
req.params = query_params
|
4558
|
+
Utils.configure_request_security(req, security)
|
4559
|
+
|
4560
|
+
@sdk_configuration.hooks.before_request(
|
4561
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
4562
|
+
hook_ctx: hook_ctx
|
4563
|
+
),
|
4564
|
+
request: req
|
4565
|
+
)
|
4566
|
+
end
|
4567
|
+
rescue StandardError => e
|
4568
|
+
error = e
|
4569
|
+
ensure
|
4570
|
+
if r.nil? || Utils.error_status?(r.status)
|
4571
|
+
r = @sdk_configuration.hooks.after_error(
|
4572
|
+
error: error,
|
4573
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
4574
|
+
hook_ctx: hook_ctx
|
4575
|
+
),
|
4576
|
+
response: r
|
4577
|
+
)
|
4578
|
+
else
|
4579
|
+
r = @sdk_configuration.hooks.after_success(
|
4580
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
4581
|
+
hook_ctx: hook_ctx
|
4582
|
+
),
|
4583
|
+
response: r
|
4584
|
+
)
|
4585
|
+
end
|
4586
|
+
|
4587
|
+
if r.nil?
|
4588
|
+
raise error if !error.nil?
|
4589
|
+
raise 'no response'
|
4590
|
+
end
|
2554
4591
|
end
|
2555
4592
|
|
2556
4593
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2573,8 +4610,8 @@ module StackOne
|
|
2573
4610
|
end
|
2574
4611
|
|
2575
4612
|
|
2576
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeWorkEligibilityRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListEmployeeWorkEligibilityResponse) }
|
2577
|
-
def list_employee_work_eligibility(request, retries = nil)
|
4613
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeWorkEligibilityRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListEmployeeWorkEligibilityResponse) }
|
4614
|
+
def list_employee_work_eligibility(request, retries = nil, timeout_ms = nil)
|
2578
4615
|
# list_employee_work_eligibility - List Employee Work Eligibility
|
2579
4616
|
url, params = @sdk_configuration.get_server_details
|
2580
4617
|
base_url = Utils.template_url(url, params)
|
@@ -2602,14 +4639,62 @@ module StackOne
|
|
2602
4639
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2603
4640
|
retry_options[:retry_statuses] = [429, 408]
|
2604
4641
|
|
4642
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
4643
|
+
|
4644
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
4645
|
+
timeout ||= @sdk_configuration.timeout
|
4646
|
+
|
2605
4647
|
connection = @sdk_configuration.client.dup
|
2606
4648
|
connection.request :retry, retry_options
|
2607
4649
|
|
2608
|
-
|
2609
|
-
|
2610
|
-
|
2611
|
-
|
2612
|
-
|
4650
|
+
hook_ctx = SDKHooks::HookContext.new(
|
4651
|
+
base_url: base_url,
|
4652
|
+
oauth2_scopes: [],
|
4653
|
+
operation_id: 'hris_list_employee_work_eligibility',
|
4654
|
+
security_source: @sdk_configuration.security_source
|
4655
|
+
)
|
4656
|
+
|
4657
|
+
error = T.let(nil, T.nilable(StandardError))
|
4658
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
4659
|
+
|
4660
|
+
begin
|
4661
|
+
r = connection.get(url) do |req|
|
4662
|
+
req.headers.merge!(headers)
|
4663
|
+
req.options.timeout = timeout unless timeout.nil?
|
4664
|
+
req.params = query_params
|
4665
|
+
Utils.configure_request_security(req, security)
|
4666
|
+
|
4667
|
+
@sdk_configuration.hooks.before_request(
|
4668
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
4669
|
+
hook_ctx: hook_ctx
|
4670
|
+
),
|
4671
|
+
request: req
|
4672
|
+
)
|
4673
|
+
end
|
4674
|
+
rescue StandardError => e
|
4675
|
+
error = e
|
4676
|
+
ensure
|
4677
|
+
if r.nil? || Utils.error_status?(r.status)
|
4678
|
+
r = @sdk_configuration.hooks.after_error(
|
4679
|
+
error: error,
|
4680
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
4681
|
+
hook_ctx: hook_ctx
|
4682
|
+
),
|
4683
|
+
response: r
|
4684
|
+
)
|
4685
|
+
else
|
4686
|
+
r = @sdk_configuration.hooks.after_success(
|
4687
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
4688
|
+
hook_ctx: hook_ctx
|
4689
|
+
),
|
4690
|
+
response: r
|
4691
|
+
)
|
4692
|
+
end
|
4693
|
+
|
4694
|
+
if r.nil?
|
4695
|
+
raise error if !error.nil?
|
4696
|
+
raise 'no response'
|
4697
|
+
end
|
2613
4698
|
end
|
2614
4699
|
|
2615
4700
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2632,8 +4717,8 @@ module StackOne
|
|
2632
4717
|
end
|
2633
4718
|
|
2634
4719
|
|
2635
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeesRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListEmployeesResponse) }
|
2636
|
-
def list_employees(request, retries = nil)
|
4720
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListEmployeesResponse) }
|
4721
|
+
def list_employees(request, retries = nil, timeout_ms = nil)
|
2637
4722
|
# list_employees - List Employees
|
2638
4723
|
url, params = @sdk_configuration.get_server_details
|
2639
4724
|
base_url = Utils.template_url(url, params)
|
@@ -2656,14 +4741,62 @@ module StackOne
|
|
2656
4741
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2657
4742
|
retry_options[:retry_statuses] = [429, 408]
|
2658
4743
|
|
4744
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
4745
|
+
|
4746
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
4747
|
+
timeout ||= @sdk_configuration.timeout
|
4748
|
+
|
2659
4749
|
connection = @sdk_configuration.client.dup
|
2660
4750
|
connection.request :retry, retry_options
|
2661
4751
|
|
2662
|
-
|
2663
|
-
|
2664
|
-
|
2665
|
-
|
2666
|
-
|
4752
|
+
hook_ctx = SDKHooks::HookContext.new(
|
4753
|
+
base_url: base_url,
|
4754
|
+
oauth2_scopes: [],
|
4755
|
+
operation_id: 'hris_list_employees',
|
4756
|
+
security_source: @sdk_configuration.security_source
|
4757
|
+
)
|
4758
|
+
|
4759
|
+
error = T.let(nil, T.nilable(StandardError))
|
4760
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
4761
|
+
|
4762
|
+
begin
|
4763
|
+
r = connection.get(url) do |req|
|
4764
|
+
req.headers.merge!(headers)
|
4765
|
+
req.options.timeout = timeout unless timeout.nil?
|
4766
|
+
req.params = query_params
|
4767
|
+
Utils.configure_request_security(req, security)
|
4768
|
+
|
4769
|
+
@sdk_configuration.hooks.before_request(
|
4770
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
4771
|
+
hook_ctx: hook_ctx
|
4772
|
+
),
|
4773
|
+
request: req
|
4774
|
+
)
|
4775
|
+
end
|
4776
|
+
rescue StandardError => e
|
4777
|
+
error = e
|
4778
|
+
ensure
|
4779
|
+
if r.nil? || Utils.error_status?(r.status)
|
4780
|
+
r = @sdk_configuration.hooks.after_error(
|
4781
|
+
error: error,
|
4782
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
4783
|
+
hook_ctx: hook_ctx
|
4784
|
+
),
|
4785
|
+
response: r
|
4786
|
+
)
|
4787
|
+
else
|
4788
|
+
r = @sdk_configuration.hooks.after_success(
|
4789
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
4790
|
+
hook_ctx: hook_ctx
|
4791
|
+
),
|
4792
|
+
response: r
|
4793
|
+
)
|
4794
|
+
end
|
4795
|
+
|
4796
|
+
if r.nil?
|
4797
|
+
raise error if !error.nil?
|
4798
|
+
raise 'no response'
|
4799
|
+
end
|
2667
4800
|
end
|
2668
4801
|
|
2669
4802
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2686,8 +4819,8 @@ module StackOne
|
|
2686
4819
|
end
|
2687
4820
|
|
2688
4821
|
|
2689
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmploymentsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListEmploymentsResponse) }
|
2690
|
-
def list_employments(request, retries = nil)
|
4822
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmploymentsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListEmploymentsResponse) }
|
4823
|
+
def list_employments(request, retries = nil, timeout_ms = nil)
|
2691
4824
|
# list_employments - List Employments
|
2692
4825
|
url, params = @sdk_configuration.get_server_details
|
2693
4826
|
base_url = Utils.template_url(url, params)
|
@@ -2710,14 +4843,62 @@ module StackOne
|
|
2710
4843
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2711
4844
|
retry_options[:retry_statuses] = [429, 408]
|
2712
4845
|
|
4846
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
4847
|
+
|
4848
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
4849
|
+
timeout ||= @sdk_configuration.timeout
|
4850
|
+
|
2713
4851
|
connection = @sdk_configuration.client.dup
|
2714
4852
|
connection.request :retry, retry_options
|
2715
4853
|
|
2716
|
-
|
2717
|
-
|
2718
|
-
|
2719
|
-
|
2720
|
-
|
4854
|
+
hook_ctx = SDKHooks::HookContext.new(
|
4855
|
+
base_url: base_url,
|
4856
|
+
oauth2_scopes: [],
|
4857
|
+
operation_id: 'hris_list_employments',
|
4858
|
+
security_source: @sdk_configuration.security_source
|
4859
|
+
)
|
4860
|
+
|
4861
|
+
error = T.let(nil, T.nilable(StandardError))
|
4862
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
4863
|
+
|
4864
|
+
begin
|
4865
|
+
r = connection.get(url) do |req|
|
4866
|
+
req.headers.merge!(headers)
|
4867
|
+
req.options.timeout = timeout unless timeout.nil?
|
4868
|
+
req.params = query_params
|
4869
|
+
Utils.configure_request_security(req, security)
|
4870
|
+
|
4871
|
+
@sdk_configuration.hooks.before_request(
|
4872
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
4873
|
+
hook_ctx: hook_ctx
|
4874
|
+
),
|
4875
|
+
request: req
|
4876
|
+
)
|
4877
|
+
end
|
4878
|
+
rescue StandardError => e
|
4879
|
+
error = e
|
4880
|
+
ensure
|
4881
|
+
if r.nil? || Utils.error_status?(r.status)
|
4882
|
+
r = @sdk_configuration.hooks.after_error(
|
4883
|
+
error: error,
|
4884
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
4885
|
+
hook_ctx: hook_ctx
|
4886
|
+
),
|
4887
|
+
response: r
|
4888
|
+
)
|
4889
|
+
else
|
4890
|
+
r = @sdk_configuration.hooks.after_success(
|
4891
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
4892
|
+
hook_ctx: hook_ctx
|
4893
|
+
),
|
4894
|
+
response: r
|
4895
|
+
)
|
4896
|
+
end
|
4897
|
+
|
4898
|
+
if r.nil?
|
4899
|
+
raise error if !error.nil?
|
4900
|
+
raise 'no response'
|
4901
|
+
end
|
2721
4902
|
end
|
2722
4903
|
|
2723
4904
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2740,8 +4921,8 @@ module StackOne
|
|
2740
4921
|
end
|
2741
4922
|
|
2742
4923
|
|
2743
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListGroupsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListGroupsResponse) }
|
2744
|
-
def list_groups(request, retries = nil)
|
4924
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListGroupsResponse) }
|
4925
|
+
def list_groups(request, retries = nil, timeout_ms = nil)
|
2745
4926
|
# list_groups - List Groups
|
2746
4927
|
url, params = @sdk_configuration.get_server_details
|
2747
4928
|
base_url = Utils.template_url(url, params)
|
@@ -2764,14 +4945,62 @@ module StackOne
|
|
2764
4945
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2765
4946
|
retry_options[:retry_statuses] = [429, 408]
|
2766
4947
|
|
4948
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
4949
|
+
|
4950
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
4951
|
+
timeout ||= @sdk_configuration.timeout
|
4952
|
+
|
2767
4953
|
connection = @sdk_configuration.client.dup
|
2768
4954
|
connection.request :retry, retry_options
|
2769
4955
|
|
2770
|
-
|
2771
|
-
|
2772
|
-
|
2773
|
-
|
2774
|
-
|
4956
|
+
hook_ctx = SDKHooks::HookContext.new(
|
4957
|
+
base_url: base_url,
|
4958
|
+
oauth2_scopes: [],
|
4959
|
+
operation_id: 'hris_list_groups',
|
4960
|
+
security_source: @sdk_configuration.security_source
|
4961
|
+
)
|
4962
|
+
|
4963
|
+
error = T.let(nil, T.nilable(StandardError))
|
4964
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
4965
|
+
|
4966
|
+
begin
|
4967
|
+
r = connection.get(url) do |req|
|
4968
|
+
req.headers.merge!(headers)
|
4969
|
+
req.options.timeout = timeout unless timeout.nil?
|
4970
|
+
req.params = query_params
|
4971
|
+
Utils.configure_request_security(req, security)
|
4972
|
+
|
4973
|
+
@sdk_configuration.hooks.before_request(
|
4974
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
4975
|
+
hook_ctx: hook_ctx
|
4976
|
+
),
|
4977
|
+
request: req
|
4978
|
+
)
|
4979
|
+
end
|
4980
|
+
rescue StandardError => e
|
4981
|
+
error = e
|
4982
|
+
ensure
|
4983
|
+
if r.nil? || Utils.error_status?(r.status)
|
4984
|
+
r = @sdk_configuration.hooks.after_error(
|
4985
|
+
error: error,
|
4986
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
4987
|
+
hook_ctx: hook_ctx
|
4988
|
+
),
|
4989
|
+
response: r
|
4990
|
+
)
|
4991
|
+
else
|
4992
|
+
r = @sdk_configuration.hooks.after_success(
|
4993
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
4994
|
+
hook_ctx: hook_ctx
|
4995
|
+
),
|
4996
|
+
response: r
|
4997
|
+
)
|
4998
|
+
end
|
4999
|
+
|
5000
|
+
if r.nil?
|
5001
|
+
raise error if !error.nil?
|
5002
|
+
raise 'no response'
|
5003
|
+
end
|
2775
5004
|
end
|
2776
5005
|
|
2777
5006
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2794,8 +5023,8 @@ module StackOne
|
|
2794
5023
|
end
|
2795
5024
|
|
2796
5025
|
|
2797
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListJobsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListJobsResponse) }
|
2798
|
-
def list_jobs(request, retries = nil)
|
5026
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListJobsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListJobsResponse) }
|
5027
|
+
def list_jobs(request, retries = nil, timeout_ms = nil)
|
2799
5028
|
# list_jobs - List Jobs
|
2800
5029
|
url, params = @sdk_configuration.get_server_details
|
2801
5030
|
base_url = Utils.template_url(url, params)
|
@@ -2818,14 +5047,62 @@ module StackOne
|
|
2818
5047
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2819
5048
|
retry_options[:retry_statuses] = [429, 408]
|
2820
5049
|
|
5050
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
5051
|
+
|
5052
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
5053
|
+
timeout ||= @sdk_configuration.timeout
|
5054
|
+
|
2821
5055
|
connection = @sdk_configuration.client.dup
|
2822
5056
|
connection.request :retry, retry_options
|
2823
5057
|
|
2824
|
-
|
2825
|
-
|
2826
|
-
|
2827
|
-
|
2828
|
-
|
5058
|
+
hook_ctx = SDKHooks::HookContext.new(
|
5059
|
+
base_url: base_url,
|
5060
|
+
oauth2_scopes: [],
|
5061
|
+
operation_id: 'hris_list_jobs',
|
5062
|
+
security_source: @sdk_configuration.security_source
|
5063
|
+
)
|
5064
|
+
|
5065
|
+
error = T.let(nil, T.nilable(StandardError))
|
5066
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
5067
|
+
|
5068
|
+
begin
|
5069
|
+
r = connection.get(url) do |req|
|
5070
|
+
req.headers.merge!(headers)
|
5071
|
+
req.options.timeout = timeout unless timeout.nil?
|
5072
|
+
req.params = query_params
|
5073
|
+
Utils.configure_request_security(req, security)
|
5074
|
+
|
5075
|
+
@sdk_configuration.hooks.before_request(
|
5076
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
5077
|
+
hook_ctx: hook_ctx
|
5078
|
+
),
|
5079
|
+
request: req
|
5080
|
+
)
|
5081
|
+
end
|
5082
|
+
rescue StandardError => e
|
5083
|
+
error = e
|
5084
|
+
ensure
|
5085
|
+
if r.nil? || Utils.error_status?(r.status)
|
5086
|
+
r = @sdk_configuration.hooks.after_error(
|
5087
|
+
error: error,
|
5088
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
5089
|
+
hook_ctx: hook_ctx
|
5090
|
+
),
|
5091
|
+
response: r
|
5092
|
+
)
|
5093
|
+
else
|
5094
|
+
r = @sdk_configuration.hooks.after_success(
|
5095
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
5096
|
+
hook_ctx: hook_ctx
|
5097
|
+
),
|
5098
|
+
response: r
|
5099
|
+
)
|
5100
|
+
end
|
5101
|
+
|
5102
|
+
if r.nil?
|
5103
|
+
raise error if !error.nil?
|
5104
|
+
raise 'no response'
|
5105
|
+
end
|
2829
5106
|
end
|
2830
5107
|
|
2831
5108
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2848,8 +5125,8 @@ module StackOne
|
|
2848
5125
|
end
|
2849
5126
|
|
2850
5127
|
|
2851
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListLocationsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListLocationsResponse) }
|
2852
|
-
def list_locations(request, retries = nil)
|
5128
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListLocationsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListLocationsResponse) }
|
5129
|
+
def list_locations(request, retries = nil, timeout_ms = nil)
|
2853
5130
|
# list_locations - List Work Locations
|
2854
5131
|
url, params = @sdk_configuration.get_server_details
|
2855
5132
|
base_url = Utils.template_url(url, params)
|
@@ -2872,14 +5149,62 @@ module StackOne
|
|
2872
5149
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2873
5150
|
retry_options[:retry_statuses] = [429, 408]
|
2874
5151
|
|
5152
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
5153
|
+
|
5154
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
5155
|
+
timeout ||= @sdk_configuration.timeout
|
5156
|
+
|
2875
5157
|
connection = @sdk_configuration.client.dup
|
2876
5158
|
connection.request :retry, retry_options
|
2877
5159
|
|
2878
|
-
|
2879
|
-
|
2880
|
-
|
2881
|
-
|
2882
|
-
|
5160
|
+
hook_ctx = SDKHooks::HookContext.new(
|
5161
|
+
base_url: base_url,
|
5162
|
+
oauth2_scopes: [],
|
5163
|
+
operation_id: 'hris_list_locations',
|
5164
|
+
security_source: @sdk_configuration.security_source
|
5165
|
+
)
|
5166
|
+
|
5167
|
+
error = T.let(nil, T.nilable(StandardError))
|
5168
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
5169
|
+
|
5170
|
+
begin
|
5171
|
+
r = connection.get(url) do |req|
|
5172
|
+
req.headers.merge!(headers)
|
5173
|
+
req.options.timeout = timeout unless timeout.nil?
|
5174
|
+
req.params = query_params
|
5175
|
+
Utils.configure_request_security(req, security)
|
5176
|
+
|
5177
|
+
@sdk_configuration.hooks.before_request(
|
5178
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
5179
|
+
hook_ctx: hook_ctx
|
5180
|
+
),
|
5181
|
+
request: req
|
5182
|
+
)
|
5183
|
+
end
|
5184
|
+
rescue StandardError => e
|
5185
|
+
error = e
|
5186
|
+
ensure
|
5187
|
+
if r.nil? || Utils.error_status?(r.status)
|
5188
|
+
r = @sdk_configuration.hooks.after_error(
|
5189
|
+
error: error,
|
5190
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
5191
|
+
hook_ctx: hook_ctx
|
5192
|
+
),
|
5193
|
+
response: r
|
5194
|
+
)
|
5195
|
+
else
|
5196
|
+
r = @sdk_configuration.hooks.after_success(
|
5197
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
5198
|
+
hook_ctx: hook_ctx
|
5199
|
+
),
|
5200
|
+
response: r
|
5201
|
+
)
|
5202
|
+
end
|
5203
|
+
|
5204
|
+
if r.nil?
|
5205
|
+
raise error if !error.nil?
|
5206
|
+
raise 'no response'
|
5207
|
+
end
|
2883
5208
|
end
|
2884
5209
|
|
2885
5210
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2902,8 +5227,8 @@ module StackOne
|
|
2902
5227
|
end
|
2903
5228
|
|
2904
5229
|
|
2905
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListTeamGroupsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListTeamGroupsResponse) }
|
2906
|
-
def list_team_groups(request, retries = nil)
|
5230
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListTeamGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListTeamGroupsResponse) }
|
5231
|
+
def list_team_groups(request, retries = nil, timeout_ms = nil)
|
2907
5232
|
# list_team_groups - List Team Groups
|
2908
5233
|
url, params = @sdk_configuration.get_server_details
|
2909
5234
|
base_url = Utils.template_url(url, params)
|
@@ -2926,14 +5251,62 @@ module StackOne
|
|
2926
5251
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2927
5252
|
retry_options[:retry_statuses] = [429, 408]
|
2928
5253
|
|
5254
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
5255
|
+
|
5256
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
5257
|
+
timeout ||= @sdk_configuration.timeout
|
5258
|
+
|
2929
5259
|
connection = @sdk_configuration.client.dup
|
2930
5260
|
connection.request :retry, retry_options
|
2931
5261
|
|
2932
|
-
|
2933
|
-
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
5262
|
+
hook_ctx = SDKHooks::HookContext.new(
|
5263
|
+
base_url: base_url,
|
5264
|
+
oauth2_scopes: [],
|
5265
|
+
operation_id: 'hris_list_team_groups',
|
5266
|
+
security_source: @sdk_configuration.security_source
|
5267
|
+
)
|
5268
|
+
|
5269
|
+
error = T.let(nil, T.nilable(StandardError))
|
5270
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
5271
|
+
|
5272
|
+
begin
|
5273
|
+
r = connection.get(url) do |req|
|
5274
|
+
req.headers.merge!(headers)
|
5275
|
+
req.options.timeout = timeout unless timeout.nil?
|
5276
|
+
req.params = query_params
|
5277
|
+
Utils.configure_request_security(req, security)
|
5278
|
+
|
5279
|
+
@sdk_configuration.hooks.before_request(
|
5280
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
5281
|
+
hook_ctx: hook_ctx
|
5282
|
+
),
|
5283
|
+
request: req
|
5284
|
+
)
|
5285
|
+
end
|
5286
|
+
rescue StandardError => e
|
5287
|
+
error = e
|
5288
|
+
ensure
|
5289
|
+
if r.nil? || Utils.error_status?(r.status)
|
5290
|
+
r = @sdk_configuration.hooks.after_error(
|
5291
|
+
error: error,
|
5292
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
5293
|
+
hook_ctx: hook_ctx
|
5294
|
+
),
|
5295
|
+
response: r
|
5296
|
+
)
|
5297
|
+
else
|
5298
|
+
r = @sdk_configuration.hooks.after_success(
|
5299
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
5300
|
+
hook_ctx: hook_ctx
|
5301
|
+
),
|
5302
|
+
response: r
|
5303
|
+
)
|
5304
|
+
end
|
5305
|
+
|
5306
|
+
if r.nil?
|
5307
|
+
raise error if !error.nil?
|
5308
|
+
raise 'no response'
|
5309
|
+
end
|
2937
5310
|
end
|
2938
5311
|
|
2939
5312
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -2956,8 +5329,8 @@ module StackOne
|
|
2956
5329
|
end
|
2957
5330
|
|
2958
5331
|
|
2959
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListTimeEntriesRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListTimeEntriesResponse) }
|
2960
|
-
def list_time_entries(request, retries = nil)
|
5332
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListTimeEntriesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListTimeEntriesResponse) }
|
5333
|
+
def list_time_entries(request, retries = nil, timeout_ms = nil)
|
2961
5334
|
# list_time_entries - List Time Entries
|
2962
5335
|
url, params = @sdk_configuration.get_server_details
|
2963
5336
|
base_url = Utils.template_url(url, params)
|
@@ -2980,14 +5353,62 @@ module StackOne
|
|
2980
5353
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
2981
5354
|
retry_options[:retry_statuses] = [429, 408]
|
2982
5355
|
|
5356
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
5357
|
+
|
5358
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
5359
|
+
timeout ||= @sdk_configuration.timeout
|
5360
|
+
|
2983
5361
|
connection = @sdk_configuration.client.dup
|
2984
5362
|
connection.request :retry, retry_options
|
2985
5363
|
|
2986
|
-
|
2987
|
-
|
2988
|
-
|
2989
|
-
|
2990
|
-
|
5364
|
+
hook_ctx = SDKHooks::HookContext.new(
|
5365
|
+
base_url: base_url,
|
5366
|
+
oauth2_scopes: [],
|
5367
|
+
operation_id: 'hris_list_time_entries',
|
5368
|
+
security_source: @sdk_configuration.security_source
|
5369
|
+
)
|
5370
|
+
|
5371
|
+
error = T.let(nil, T.nilable(StandardError))
|
5372
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
5373
|
+
|
5374
|
+
begin
|
5375
|
+
r = connection.get(url) do |req|
|
5376
|
+
req.headers.merge!(headers)
|
5377
|
+
req.options.timeout = timeout unless timeout.nil?
|
5378
|
+
req.params = query_params
|
5379
|
+
Utils.configure_request_security(req, security)
|
5380
|
+
|
5381
|
+
@sdk_configuration.hooks.before_request(
|
5382
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
5383
|
+
hook_ctx: hook_ctx
|
5384
|
+
),
|
5385
|
+
request: req
|
5386
|
+
)
|
5387
|
+
end
|
5388
|
+
rescue StandardError => e
|
5389
|
+
error = e
|
5390
|
+
ensure
|
5391
|
+
if r.nil? || Utils.error_status?(r.status)
|
5392
|
+
r = @sdk_configuration.hooks.after_error(
|
5393
|
+
error: error,
|
5394
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
5395
|
+
hook_ctx: hook_ctx
|
5396
|
+
),
|
5397
|
+
response: r
|
5398
|
+
)
|
5399
|
+
else
|
5400
|
+
r = @sdk_configuration.hooks.after_success(
|
5401
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
5402
|
+
hook_ctx: hook_ctx
|
5403
|
+
),
|
5404
|
+
response: r
|
5405
|
+
)
|
5406
|
+
end
|
5407
|
+
|
5408
|
+
if r.nil?
|
5409
|
+
raise error if !error.nil?
|
5410
|
+
raise 'no response'
|
5411
|
+
end
|
2991
5412
|
end
|
2992
5413
|
|
2993
5414
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -3010,8 +5431,8 @@ module StackOne
|
|
3010
5431
|
end
|
3011
5432
|
|
3012
5433
|
|
3013
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListTimeOffPoliciesRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListTimeOffPoliciesResponse) }
|
3014
|
-
def list_time_off_policies(request, retries = nil)
|
5434
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListTimeOffPoliciesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListTimeOffPoliciesResponse) }
|
5435
|
+
def list_time_off_policies(request, retries = nil, timeout_ms = nil)
|
3015
5436
|
# list_time_off_policies - List Time Off Policies
|
3016
5437
|
url, params = @sdk_configuration.get_server_details
|
3017
5438
|
base_url = Utils.template_url(url, params)
|
@@ -3034,14 +5455,62 @@ module StackOne
|
|
3034
5455
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
3035
5456
|
retry_options[:retry_statuses] = [429, 408]
|
3036
5457
|
|
5458
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
5459
|
+
|
5460
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
5461
|
+
timeout ||= @sdk_configuration.timeout
|
5462
|
+
|
3037
5463
|
connection = @sdk_configuration.client.dup
|
3038
5464
|
connection.request :retry, retry_options
|
3039
5465
|
|
3040
|
-
|
3041
|
-
|
3042
|
-
|
3043
|
-
|
3044
|
-
|
5466
|
+
hook_ctx = SDKHooks::HookContext.new(
|
5467
|
+
base_url: base_url,
|
5468
|
+
oauth2_scopes: [],
|
5469
|
+
operation_id: 'hris_list_time_off_policies',
|
5470
|
+
security_source: @sdk_configuration.security_source
|
5471
|
+
)
|
5472
|
+
|
5473
|
+
error = T.let(nil, T.nilable(StandardError))
|
5474
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
5475
|
+
|
5476
|
+
begin
|
5477
|
+
r = connection.get(url) do |req|
|
5478
|
+
req.headers.merge!(headers)
|
5479
|
+
req.options.timeout = timeout unless timeout.nil?
|
5480
|
+
req.params = query_params
|
5481
|
+
Utils.configure_request_security(req, security)
|
5482
|
+
|
5483
|
+
@sdk_configuration.hooks.before_request(
|
5484
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
5485
|
+
hook_ctx: hook_ctx
|
5486
|
+
),
|
5487
|
+
request: req
|
5488
|
+
)
|
5489
|
+
end
|
5490
|
+
rescue StandardError => e
|
5491
|
+
error = e
|
5492
|
+
ensure
|
5493
|
+
if r.nil? || Utils.error_status?(r.status)
|
5494
|
+
r = @sdk_configuration.hooks.after_error(
|
5495
|
+
error: error,
|
5496
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
5497
|
+
hook_ctx: hook_ctx
|
5498
|
+
),
|
5499
|
+
response: r
|
5500
|
+
)
|
5501
|
+
else
|
5502
|
+
r = @sdk_configuration.hooks.after_success(
|
5503
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
5504
|
+
hook_ctx: hook_ctx
|
5505
|
+
),
|
5506
|
+
response: r
|
5507
|
+
)
|
5508
|
+
end
|
5509
|
+
|
5510
|
+
if r.nil?
|
5511
|
+
raise error if !error.nil?
|
5512
|
+
raise 'no response'
|
5513
|
+
end
|
3045
5514
|
end
|
3046
5515
|
|
3047
5516
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -3064,8 +5533,8 @@ module StackOne
|
|
3064
5533
|
end
|
3065
5534
|
|
3066
5535
|
|
3067
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListTimeOffRequestsRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListTimeOffRequestsResponse) }
|
3068
|
-
def list_time_off_requests(request, retries = nil)
|
5536
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListTimeOffRequestsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListTimeOffRequestsResponse) }
|
5537
|
+
def list_time_off_requests(request, retries = nil, timeout_ms = nil)
|
3069
5538
|
# list_time_off_requests - List time off requests
|
3070
5539
|
url, params = @sdk_configuration.get_server_details
|
3071
5540
|
base_url = Utils.template_url(url, params)
|
@@ -3088,14 +5557,62 @@ module StackOne
|
|
3088
5557
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
3089
5558
|
retry_options[:retry_statuses] = [429, 408]
|
3090
5559
|
|
5560
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
5561
|
+
|
5562
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
5563
|
+
timeout ||= @sdk_configuration.timeout
|
5564
|
+
|
3091
5565
|
connection = @sdk_configuration.client.dup
|
3092
5566
|
connection.request :retry, retry_options
|
3093
5567
|
|
3094
|
-
|
3095
|
-
|
3096
|
-
|
3097
|
-
|
3098
|
-
|
5568
|
+
hook_ctx = SDKHooks::HookContext.new(
|
5569
|
+
base_url: base_url,
|
5570
|
+
oauth2_scopes: [],
|
5571
|
+
operation_id: 'hris_list_time_off_requests',
|
5572
|
+
security_source: @sdk_configuration.security_source
|
5573
|
+
)
|
5574
|
+
|
5575
|
+
error = T.let(nil, T.nilable(StandardError))
|
5576
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
5577
|
+
|
5578
|
+
begin
|
5579
|
+
r = connection.get(url) do |req|
|
5580
|
+
req.headers.merge!(headers)
|
5581
|
+
req.options.timeout = timeout unless timeout.nil?
|
5582
|
+
req.params = query_params
|
5583
|
+
Utils.configure_request_security(req, security)
|
5584
|
+
|
5585
|
+
@sdk_configuration.hooks.before_request(
|
5586
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
5587
|
+
hook_ctx: hook_ctx
|
5588
|
+
),
|
5589
|
+
request: req
|
5590
|
+
)
|
5591
|
+
end
|
5592
|
+
rescue StandardError => e
|
5593
|
+
error = e
|
5594
|
+
ensure
|
5595
|
+
if r.nil? || Utils.error_status?(r.status)
|
5596
|
+
r = @sdk_configuration.hooks.after_error(
|
5597
|
+
error: error,
|
5598
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
5599
|
+
hook_ctx: hook_ctx
|
5600
|
+
),
|
5601
|
+
response: r
|
5602
|
+
)
|
5603
|
+
else
|
5604
|
+
r = @sdk_configuration.hooks.after_success(
|
5605
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
5606
|
+
hook_ctx: hook_ctx
|
5607
|
+
),
|
5608
|
+
response: r
|
5609
|
+
)
|
5610
|
+
end
|
5611
|
+
|
5612
|
+
if r.nil?
|
5613
|
+
raise error if !error.nil?
|
5614
|
+
raise 'no response'
|
5615
|
+
end
|
3099
5616
|
end
|
3100
5617
|
|
3101
5618
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -3118,9 +5635,11 @@ module StackOne
|
|
3118
5635
|
end
|
3119
5636
|
|
3120
5637
|
|
3121
|
-
sig { params(request: T.nilable(::StackOne::Operations::HrisListTimeOffTypesRequest), retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisListTimeOffTypesResponse) }
|
3122
|
-
def list_time_off_types(request, retries = nil)
|
5638
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListTimeOffTypesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisListTimeOffTypesResponse) }
|
5639
|
+
def list_time_off_types(request, retries = nil, timeout_ms = nil)
|
3123
5640
|
# list_time_off_types - List time off types
|
5641
|
+
#
|
5642
|
+
# @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
3124
5643
|
url, params = @sdk_configuration.get_server_details
|
3125
5644
|
base_url = Utils.template_url(url, params)
|
3126
5645
|
url = "#{base_url}/unified/hris/time_off_types"
|
@@ -3142,14 +5661,62 @@ module StackOne
|
|
3142
5661
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
3143
5662
|
retry_options[:retry_statuses] = [429, 408]
|
3144
5663
|
|
5664
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
5665
|
+
|
5666
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
5667
|
+
timeout ||= @sdk_configuration.timeout
|
5668
|
+
|
3145
5669
|
connection = @sdk_configuration.client.dup
|
3146
5670
|
connection.request :retry, retry_options
|
3147
5671
|
|
3148
|
-
|
3149
|
-
|
3150
|
-
|
3151
|
-
|
3152
|
-
|
5672
|
+
hook_ctx = SDKHooks::HookContext.new(
|
5673
|
+
base_url: base_url,
|
5674
|
+
oauth2_scopes: [],
|
5675
|
+
operation_id: 'hris_list_time_off_types',
|
5676
|
+
security_source: @sdk_configuration.security_source
|
5677
|
+
)
|
5678
|
+
|
5679
|
+
error = T.let(nil, T.nilable(StandardError))
|
5680
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
5681
|
+
|
5682
|
+
begin
|
5683
|
+
r = connection.get(url) do |req|
|
5684
|
+
req.headers.merge!(headers)
|
5685
|
+
req.options.timeout = timeout unless timeout.nil?
|
5686
|
+
req.params = query_params
|
5687
|
+
Utils.configure_request_security(req, security)
|
5688
|
+
|
5689
|
+
@sdk_configuration.hooks.before_request(
|
5690
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
5691
|
+
hook_ctx: hook_ctx
|
5692
|
+
),
|
5693
|
+
request: req
|
5694
|
+
)
|
5695
|
+
end
|
5696
|
+
rescue StandardError => e
|
5697
|
+
error = e
|
5698
|
+
ensure
|
5699
|
+
if r.nil? || Utils.error_status?(r.status)
|
5700
|
+
r = @sdk_configuration.hooks.after_error(
|
5701
|
+
error: error,
|
5702
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
5703
|
+
hook_ctx: hook_ctx
|
5704
|
+
),
|
5705
|
+
response: r
|
5706
|
+
)
|
5707
|
+
else
|
5708
|
+
r = @sdk_configuration.hooks.after_success(
|
5709
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
5710
|
+
hook_ctx: hook_ctx
|
5711
|
+
),
|
5712
|
+
response: r
|
5713
|
+
)
|
5714
|
+
end
|
5715
|
+
|
5716
|
+
if r.nil?
|
5717
|
+
raise error if !error.nil?
|
5718
|
+
raise 'no response'
|
5719
|
+
end
|
3153
5720
|
end
|
3154
5721
|
|
3155
5722
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -3172,8 +5739,8 @@ module StackOne
|
|
3172
5739
|
end
|
3173
5740
|
|
3174
5741
|
|
3175
|
-
sig { params(hris_update_employee_request_dto: ::StackOne::Shared::HrisUpdateEmployeeRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisUpdateEmployeeResponse) }
|
3176
|
-
def update_employee(hris_update_employee_request_dto, id, x_account_id, retries = nil)
|
5742
|
+
sig { params(hris_update_employee_request_dto: ::StackOne::Shared::HrisUpdateEmployeeRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisUpdateEmployeeResponse) }
|
5743
|
+
def update_employee(hris_update_employee_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
|
3177
5744
|
# update_employee - Updates an employee
|
3178
5745
|
request = ::StackOne::Operations::HrisUpdateEmployeeRequest.new(
|
3179
5746
|
|
@@ -3193,6 +5760,14 @@ module StackOne
|
|
3193
5760
|
req_content_type, data, form = Utils.serialize_request_body(request, :hris_update_employee_request_dto, :json)
|
3194
5761
|
headers['content-type'] = req_content_type
|
3195
5762
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
5763
|
+
|
5764
|
+
if form
|
5765
|
+
body = Utils.encode_form(form)
|
5766
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
5767
|
+
body = URI.encode_www_form(data)
|
5768
|
+
else
|
5769
|
+
body = data
|
5770
|
+
end
|
3196
5771
|
headers['Accept'] = 'application/json'
|
3197
5772
|
headers['user-agent'] = @sdk_configuration.user_agent
|
3198
5773
|
retries ||= @sdk_configuration.retry_config
|
@@ -3209,19 +5784,61 @@ module StackOne
|
|
3209
5784
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
3210
5785
|
retry_options[:retry_statuses] = [429, 408]
|
3211
5786
|
|
5787
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
5788
|
+
|
5789
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
5790
|
+
timeout ||= @sdk_configuration.timeout
|
5791
|
+
|
3212
5792
|
connection = @sdk_configuration.client.dup
|
3213
5793
|
connection.request :retry, retry_options
|
3214
5794
|
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
5795
|
+
hook_ctx = SDKHooks::HookContext.new(
|
5796
|
+
base_url: base_url,
|
5797
|
+
oauth2_scopes: [],
|
5798
|
+
operation_id: 'hris_update_employee',
|
5799
|
+
security_source: @sdk_configuration.security_source
|
5800
|
+
)
|
5801
|
+
|
5802
|
+
error = T.let(nil, T.nilable(StandardError))
|
5803
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
5804
|
+
|
5805
|
+
begin
|
5806
|
+
r = connection.patch(url) do |req|
|
5807
|
+
req.body = body
|
5808
|
+
req.headers.merge!(headers)
|
5809
|
+
req.options.timeout = timeout unless timeout.nil?
|
5810
|
+
Utils.configure_request_security(req, security)
|
5811
|
+
|
5812
|
+
@sdk_configuration.hooks.before_request(
|
5813
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
5814
|
+
hook_ctx: hook_ctx
|
5815
|
+
),
|
5816
|
+
request: req
|
5817
|
+
)
|
5818
|
+
end
|
5819
|
+
rescue StandardError => e
|
5820
|
+
error = e
|
5821
|
+
ensure
|
5822
|
+
if r.nil? || Utils.error_status?(r.status)
|
5823
|
+
r = @sdk_configuration.hooks.after_error(
|
5824
|
+
error: error,
|
5825
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
5826
|
+
hook_ctx: hook_ctx
|
5827
|
+
),
|
5828
|
+
response: r
|
5829
|
+
)
|
3223
5830
|
else
|
3224
|
-
|
5831
|
+
r = @sdk_configuration.hooks.after_success(
|
5832
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
5833
|
+
hook_ctx: hook_ctx
|
5834
|
+
),
|
5835
|
+
response: r
|
5836
|
+
)
|
5837
|
+
end
|
5838
|
+
|
5839
|
+
if r.nil?
|
5840
|
+
raise error if !error.nil?
|
5841
|
+
raise 'no response'
|
3225
5842
|
end
|
3226
5843
|
end
|
3227
5844
|
|
@@ -3245,8 +5862,8 @@ module StackOne
|
|
3245
5862
|
end
|
3246
5863
|
|
3247
5864
|
|
3248
|
-
sig { params(hris_create_employment_request_dto: ::StackOne::Shared::HrisCreateEmploymentRequestDto, id: ::String, sub_resource_id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisUpdateEmployeeEmploymentResponse) }
|
3249
|
-
def update_employee_employment(hris_create_employment_request_dto, id, sub_resource_id, x_account_id, retries = nil)
|
5865
|
+
sig { params(hris_create_employment_request_dto: ::StackOne::Shared::HrisCreateEmploymentRequestDto, id: ::String, sub_resource_id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisUpdateEmployeeEmploymentResponse) }
|
5866
|
+
def update_employee_employment(hris_create_employment_request_dto, id, sub_resource_id, x_account_id, retries = nil, timeout_ms = nil)
|
3250
5867
|
# update_employee_employment - Update Employee Employment
|
3251
5868
|
request = ::StackOne::Operations::HrisUpdateEmployeeEmploymentRequest.new(
|
3252
5869
|
|
@@ -3267,6 +5884,14 @@ module StackOne
|
|
3267
5884
|
req_content_type, data, form = Utils.serialize_request_body(request, :hris_create_employment_request_dto, :json)
|
3268
5885
|
headers['content-type'] = req_content_type
|
3269
5886
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
5887
|
+
|
5888
|
+
if form
|
5889
|
+
body = Utils.encode_form(form)
|
5890
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
5891
|
+
body = URI.encode_www_form(data)
|
5892
|
+
else
|
5893
|
+
body = data
|
5894
|
+
end
|
3270
5895
|
headers['Accept'] = 'application/json'
|
3271
5896
|
headers['user-agent'] = @sdk_configuration.user_agent
|
3272
5897
|
retries ||= @sdk_configuration.retry_config
|
@@ -3283,19 +5908,61 @@ module StackOne
|
|
3283
5908
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
3284
5909
|
retry_options[:retry_statuses] = [429, 408]
|
3285
5910
|
|
5911
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
5912
|
+
|
5913
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
5914
|
+
timeout ||= @sdk_configuration.timeout
|
5915
|
+
|
3286
5916
|
connection = @sdk_configuration.client.dup
|
3287
5917
|
connection.request :retry, retry_options
|
3288
5918
|
|
3289
|
-
|
3290
|
-
|
3291
|
-
|
3292
|
-
|
3293
|
-
|
3294
|
-
|
3295
|
-
|
3296
|
-
|
5919
|
+
hook_ctx = SDKHooks::HookContext.new(
|
5920
|
+
base_url: base_url,
|
5921
|
+
oauth2_scopes: [],
|
5922
|
+
operation_id: 'hris_update_employee_employment',
|
5923
|
+
security_source: @sdk_configuration.security_source
|
5924
|
+
)
|
5925
|
+
|
5926
|
+
error = T.let(nil, T.nilable(StandardError))
|
5927
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
5928
|
+
|
5929
|
+
begin
|
5930
|
+
r = connection.patch(url) do |req|
|
5931
|
+
req.body = body
|
5932
|
+
req.headers.merge!(headers)
|
5933
|
+
req.options.timeout = timeout unless timeout.nil?
|
5934
|
+
Utils.configure_request_security(req, security)
|
5935
|
+
|
5936
|
+
@sdk_configuration.hooks.before_request(
|
5937
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
5938
|
+
hook_ctx: hook_ctx
|
5939
|
+
),
|
5940
|
+
request: req
|
5941
|
+
)
|
5942
|
+
end
|
5943
|
+
rescue StandardError => e
|
5944
|
+
error = e
|
5945
|
+
ensure
|
5946
|
+
if r.nil? || Utils.error_status?(r.status)
|
5947
|
+
r = @sdk_configuration.hooks.after_error(
|
5948
|
+
error: error,
|
5949
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
5950
|
+
hook_ctx: hook_ctx
|
5951
|
+
),
|
5952
|
+
response: r
|
5953
|
+
)
|
3297
5954
|
else
|
3298
|
-
|
5955
|
+
r = @sdk_configuration.hooks.after_success(
|
5956
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
5957
|
+
hook_ctx: hook_ctx
|
5958
|
+
),
|
5959
|
+
response: r
|
5960
|
+
)
|
5961
|
+
end
|
5962
|
+
|
5963
|
+
if r.nil?
|
5964
|
+
raise error if !error.nil?
|
5965
|
+
raise 'no response'
|
3299
5966
|
end
|
3300
5967
|
end
|
3301
5968
|
|
@@ -3319,8 +5986,132 @@ module StackOne
|
|
3319
5986
|
end
|
3320
5987
|
|
3321
5988
|
|
3322
|
-
sig { params(
|
3323
|
-
def
|
5989
|
+
sig { params(hris_create_time_off_request_dto: ::StackOne::Shared::HrisCreateTimeOffRequestDto, id: ::String, sub_resource_id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisUpdateEmployeeTimeOffRequestResponse) }
|
5990
|
+
def update_employee_time_off_request(hris_create_time_off_request_dto, id, sub_resource_id, x_account_id, retries = nil, timeout_ms = nil)
|
5991
|
+
# update_employee_time_off_request - Update Employee Time Off Request
|
5992
|
+
request = ::StackOne::Operations::HrisUpdateEmployeeTimeOffRequestRequest.new(
|
5993
|
+
|
5994
|
+
hris_create_time_off_request_dto: hris_create_time_off_request_dto,
|
5995
|
+
id: id,
|
5996
|
+
sub_resource_id: sub_resource_id,
|
5997
|
+
x_account_id: x_account_id
|
5998
|
+
)
|
5999
|
+
url, params = @sdk_configuration.get_server_details
|
6000
|
+
base_url = Utils.template_url(url, params)
|
6001
|
+
url = Utils.generate_url(
|
6002
|
+
::StackOne::Operations::HrisUpdateEmployeeTimeOffRequestRequest,
|
6003
|
+
base_url,
|
6004
|
+
'/unified/hris/employees/{id}/time_off/{subResourceId}',
|
6005
|
+
request
|
6006
|
+
)
|
6007
|
+
headers = Utils.get_headers(request)
|
6008
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :hris_create_time_off_request_dto, :json)
|
6009
|
+
headers['content-type'] = req_content_type
|
6010
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
6011
|
+
|
6012
|
+
if form
|
6013
|
+
body = Utils.encode_form(form)
|
6014
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
6015
|
+
body = URI.encode_www_form(data)
|
6016
|
+
else
|
6017
|
+
body = data
|
6018
|
+
end
|
6019
|
+
headers['Accept'] = 'application/json'
|
6020
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
6021
|
+
retries ||= @sdk_configuration.retry_config
|
6022
|
+
retries ||= Utils::RetryConfig.new(
|
6023
|
+
backoff: Utils::BackoffStrategy.new(
|
6024
|
+
exponent: 1.5,
|
6025
|
+
initial_interval: 500,
|
6026
|
+
max_elapsed_time: 3_600_000,
|
6027
|
+
max_interval: 60_000
|
6028
|
+
),
|
6029
|
+
retry_connection_errors: true,
|
6030
|
+
strategy: 'backoff'
|
6031
|
+
)
|
6032
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
6033
|
+
retry_options[:retry_statuses] = [429, 408]
|
6034
|
+
|
6035
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
6036
|
+
|
6037
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
6038
|
+
timeout ||= @sdk_configuration.timeout
|
6039
|
+
|
6040
|
+
connection = @sdk_configuration.client.dup
|
6041
|
+
connection.request :retry, retry_options
|
6042
|
+
|
6043
|
+
hook_ctx = SDKHooks::HookContext.new(
|
6044
|
+
base_url: base_url,
|
6045
|
+
oauth2_scopes: [],
|
6046
|
+
operation_id: 'hris_update_employee_time_off_request',
|
6047
|
+
security_source: @sdk_configuration.security_source
|
6048
|
+
)
|
6049
|
+
|
6050
|
+
error = T.let(nil, T.nilable(StandardError))
|
6051
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
6052
|
+
|
6053
|
+
begin
|
6054
|
+
r = connection.patch(url) do |req|
|
6055
|
+
req.body = body
|
6056
|
+
req.headers.merge!(headers)
|
6057
|
+
req.options.timeout = timeout unless timeout.nil?
|
6058
|
+
Utils.configure_request_security(req, security)
|
6059
|
+
|
6060
|
+
@sdk_configuration.hooks.before_request(
|
6061
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
6062
|
+
hook_ctx: hook_ctx
|
6063
|
+
),
|
6064
|
+
request: req
|
6065
|
+
)
|
6066
|
+
end
|
6067
|
+
rescue StandardError => e
|
6068
|
+
error = e
|
6069
|
+
ensure
|
6070
|
+
if r.nil? || Utils.error_status?(r.status)
|
6071
|
+
r = @sdk_configuration.hooks.after_error(
|
6072
|
+
error: error,
|
6073
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
6074
|
+
hook_ctx: hook_ctx
|
6075
|
+
),
|
6076
|
+
response: r
|
6077
|
+
)
|
6078
|
+
else
|
6079
|
+
r = @sdk_configuration.hooks.after_success(
|
6080
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
6081
|
+
hook_ctx: hook_ctx
|
6082
|
+
),
|
6083
|
+
response: r
|
6084
|
+
)
|
6085
|
+
end
|
6086
|
+
|
6087
|
+
if r.nil?
|
6088
|
+
raise error if !error.nil?
|
6089
|
+
raise 'no response'
|
6090
|
+
end
|
6091
|
+
end
|
6092
|
+
|
6093
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
6094
|
+
|
6095
|
+
res = ::StackOne::Operations::HrisUpdateEmployeeTimeOffRequestResponse.new(
|
6096
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
6097
|
+
)
|
6098
|
+
if r.status == 200
|
6099
|
+
if Utils.match_content_type(content_type, 'application/json')
|
6100
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::StackOne::Shared::CreateResult)
|
6101
|
+
res.create_result = out
|
6102
|
+
end
|
6103
|
+
elsif r.status == 408
|
6104
|
+
res.headers = r.headers
|
6105
|
+
elsif [400, 403, 412, 429].include?(r.status)
|
6106
|
+
elsif [500, 501].include?(r.status)
|
6107
|
+
end
|
6108
|
+
|
6109
|
+
res
|
6110
|
+
end
|
6111
|
+
|
6112
|
+
|
6113
|
+
sig { params(hris_create_work_eligibility_request_dto: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDto, id: ::String, sub_resource_id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisUpdateEmployeeWorkEligibilityRequestResponse) }
|
6114
|
+
def update_employee_work_eligibility_request(hris_create_work_eligibility_request_dto, id, sub_resource_id, x_account_id, retries = nil, timeout_ms = nil)
|
3324
6115
|
# update_employee_work_eligibility_request - Update Employee Work Eligibility Request
|
3325
6116
|
request = ::StackOne::Operations::HrisUpdateEmployeeWorkEligibilityRequestRequest.new(
|
3326
6117
|
|
@@ -3341,6 +6132,14 @@ module StackOne
|
|
3341
6132
|
req_content_type, data, form = Utils.serialize_request_body(request, :hris_create_work_eligibility_request_dto, :json)
|
3342
6133
|
headers['content-type'] = req_content_type
|
3343
6134
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
6135
|
+
|
6136
|
+
if form
|
6137
|
+
body = Utils.encode_form(form)
|
6138
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
6139
|
+
body = URI.encode_www_form(data)
|
6140
|
+
else
|
6141
|
+
body = data
|
6142
|
+
end
|
3344
6143
|
headers['Accept'] = '*/*'
|
3345
6144
|
headers['user-agent'] = @sdk_configuration.user_agent
|
3346
6145
|
retries ||= @sdk_configuration.retry_config
|
@@ -3357,19 +6156,61 @@ module StackOne
|
|
3357
6156
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
3358
6157
|
retry_options[:retry_statuses] = [429, 408]
|
3359
6158
|
|
6159
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
6160
|
+
|
6161
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
6162
|
+
timeout ||= @sdk_configuration.timeout
|
6163
|
+
|
3360
6164
|
connection = @sdk_configuration.client.dup
|
3361
6165
|
connection.request :retry, retry_options
|
3362
6166
|
|
3363
|
-
|
3364
|
-
|
3365
|
-
|
3366
|
-
|
3367
|
-
|
3368
|
-
|
3369
|
-
|
3370
|
-
|
6167
|
+
hook_ctx = SDKHooks::HookContext.new(
|
6168
|
+
base_url: base_url,
|
6169
|
+
oauth2_scopes: [],
|
6170
|
+
operation_id: 'hris_update_employee_work_eligibility_request',
|
6171
|
+
security_source: @sdk_configuration.security_source
|
6172
|
+
)
|
6173
|
+
|
6174
|
+
error = T.let(nil, T.nilable(StandardError))
|
6175
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
6176
|
+
|
6177
|
+
begin
|
6178
|
+
r = connection.patch(url) do |req|
|
6179
|
+
req.body = body
|
6180
|
+
req.headers.merge!(headers)
|
6181
|
+
req.options.timeout = timeout unless timeout.nil?
|
6182
|
+
Utils.configure_request_security(req, security)
|
6183
|
+
|
6184
|
+
@sdk_configuration.hooks.before_request(
|
6185
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
6186
|
+
hook_ctx: hook_ctx
|
6187
|
+
),
|
6188
|
+
request: req
|
6189
|
+
)
|
6190
|
+
end
|
6191
|
+
rescue StandardError => e
|
6192
|
+
error = e
|
6193
|
+
ensure
|
6194
|
+
if r.nil? || Utils.error_status?(r.status)
|
6195
|
+
r = @sdk_configuration.hooks.after_error(
|
6196
|
+
error: error,
|
6197
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
6198
|
+
hook_ctx: hook_ctx
|
6199
|
+
),
|
6200
|
+
response: r
|
6201
|
+
)
|
3371
6202
|
else
|
3372
|
-
|
6203
|
+
r = @sdk_configuration.hooks.after_success(
|
6204
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
6205
|
+
hook_ctx: hook_ctx
|
6206
|
+
),
|
6207
|
+
response: r
|
6208
|
+
)
|
6209
|
+
end
|
6210
|
+
|
6211
|
+
if r.nil?
|
6212
|
+
raise error if !error.nil?
|
6213
|
+
raise 'no response'
|
3373
6214
|
end
|
3374
6215
|
end
|
3375
6216
|
|
@@ -3389,9 +6230,11 @@ module StackOne
|
|
3389
6230
|
end
|
3390
6231
|
|
3391
6232
|
|
3392
|
-
sig { params(hris_create_time_off_request_dto: ::StackOne::Shared::HrisCreateTimeOffRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisUpdateTimeOffRequestResponse) }
|
3393
|
-
def update_time_off_request(hris_create_time_off_request_dto, id, x_account_id, retries = nil)
|
6233
|
+
sig { params(hris_create_time_off_request_dto: ::StackOne::Shared::HrisCreateTimeOffRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisUpdateTimeOffRequestResponse) }
|
6234
|
+
def update_time_off_request(hris_create_time_off_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
|
3394
6235
|
# update_time_off_request - Update time off request
|
6236
|
+
#
|
6237
|
+
# @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
3395
6238
|
request = ::StackOne::Operations::HrisUpdateTimeOffRequestRequest.new(
|
3396
6239
|
|
3397
6240
|
hris_create_time_off_request_dto: hris_create_time_off_request_dto,
|
@@ -3410,6 +6253,14 @@ module StackOne
|
|
3410
6253
|
req_content_type, data, form = Utils.serialize_request_body(request, :hris_create_time_off_request_dto, :json)
|
3411
6254
|
headers['content-type'] = req_content_type
|
3412
6255
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
6256
|
+
|
6257
|
+
if form
|
6258
|
+
body = Utils.encode_form(form)
|
6259
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
6260
|
+
body = URI.encode_www_form(data)
|
6261
|
+
else
|
6262
|
+
body = data
|
6263
|
+
end
|
3413
6264
|
headers['Accept'] = 'application/json'
|
3414
6265
|
headers['user-agent'] = @sdk_configuration.user_agent
|
3415
6266
|
retries ||= @sdk_configuration.retry_config
|
@@ -3426,19 +6277,61 @@ module StackOne
|
|
3426
6277
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
3427
6278
|
retry_options[:retry_statuses] = [429, 408]
|
3428
6279
|
|
6280
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
6281
|
+
|
6282
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
6283
|
+
timeout ||= @sdk_configuration.timeout
|
6284
|
+
|
3429
6285
|
connection = @sdk_configuration.client.dup
|
3430
6286
|
connection.request :retry, retry_options
|
3431
6287
|
|
3432
|
-
|
3433
|
-
|
3434
|
-
|
3435
|
-
|
3436
|
-
|
3437
|
-
|
3438
|
-
|
3439
|
-
|
6288
|
+
hook_ctx = SDKHooks::HookContext.new(
|
6289
|
+
base_url: base_url,
|
6290
|
+
oauth2_scopes: [],
|
6291
|
+
operation_id: 'hris_update_time_off_request',
|
6292
|
+
security_source: @sdk_configuration.security_source
|
6293
|
+
)
|
6294
|
+
|
6295
|
+
error = T.let(nil, T.nilable(StandardError))
|
6296
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
6297
|
+
|
6298
|
+
begin
|
6299
|
+
r = connection.patch(url) do |req|
|
6300
|
+
req.body = body
|
6301
|
+
req.headers.merge!(headers)
|
6302
|
+
req.options.timeout = timeout unless timeout.nil?
|
6303
|
+
Utils.configure_request_security(req, security)
|
6304
|
+
|
6305
|
+
@sdk_configuration.hooks.before_request(
|
6306
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
6307
|
+
hook_ctx: hook_ctx
|
6308
|
+
),
|
6309
|
+
request: req
|
6310
|
+
)
|
6311
|
+
end
|
6312
|
+
rescue StandardError => e
|
6313
|
+
error = e
|
6314
|
+
ensure
|
6315
|
+
if r.nil? || Utils.error_status?(r.status)
|
6316
|
+
r = @sdk_configuration.hooks.after_error(
|
6317
|
+
error: error,
|
6318
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
6319
|
+
hook_ctx: hook_ctx
|
6320
|
+
),
|
6321
|
+
response: r
|
6322
|
+
)
|
3440
6323
|
else
|
3441
|
-
|
6324
|
+
r = @sdk_configuration.hooks.after_success(
|
6325
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
6326
|
+
hook_ctx: hook_ctx
|
6327
|
+
),
|
6328
|
+
response: r
|
6329
|
+
)
|
6330
|
+
end
|
6331
|
+
|
6332
|
+
if r.nil?
|
6333
|
+
raise error if !error.nil?
|
6334
|
+
raise 'no response'
|
3442
6335
|
end
|
3443
6336
|
end
|
3444
6337
|
|
@@ -3462,8 +6355,8 @@ module StackOne
|
|
3462
6355
|
end
|
3463
6356
|
|
3464
6357
|
|
3465
|
-
sig { params(hris_documents_upload_request_dto: ::StackOne::Shared::HrisDocumentsUploadRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig)).returns(::StackOne::Operations::HrisUploadEmployeeDocumentResponse) }
|
3466
|
-
def upload_employee_document(hris_documents_upload_request_dto, id, x_account_id, retries = nil)
|
6358
|
+
sig { params(hris_documents_upload_request_dto: ::StackOne::Shared::HrisDocumentsUploadRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(::StackOne::Operations::HrisUploadEmployeeDocumentResponse) }
|
6359
|
+
def upload_employee_document(hris_documents_upload_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
|
3467
6360
|
# upload_employee_document - Upload Employee Document
|
3468
6361
|
request = ::StackOne::Operations::HrisUploadEmployeeDocumentRequest.new(
|
3469
6362
|
|
@@ -3483,6 +6376,14 @@ module StackOne
|
|
3483
6376
|
req_content_type, data, form = Utils.serialize_request_body(request, :hris_documents_upload_request_dto, :json)
|
3484
6377
|
headers['content-type'] = req_content_type
|
3485
6378
|
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
6379
|
+
|
6380
|
+
if form
|
6381
|
+
body = Utils.encode_form(form)
|
6382
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
6383
|
+
body = URI.encode_www_form(data)
|
6384
|
+
else
|
6385
|
+
body = data
|
6386
|
+
end
|
3486
6387
|
headers['Accept'] = 'application/json'
|
3487
6388
|
headers['user-agent'] = @sdk_configuration.user_agent
|
3488
6389
|
retries ||= @sdk_configuration.retry_config
|
@@ -3499,19 +6400,61 @@ module StackOne
|
|
3499
6400
|
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
3500
6401
|
retry_options[:retry_statuses] = [429, 408]
|
3501
6402
|
|
6403
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
6404
|
+
|
6405
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
6406
|
+
timeout ||= @sdk_configuration.timeout
|
6407
|
+
|
3502
6408
|
connection = @sdk_configuration.client.dup
|
3503
6409
|
connection.request :retry, retry_options
|
3504
6410
|
|
3505
|
-
|
3506
|
-
|
3507
|
-
|
3508
|
-
|
3509
|
-
|
3510
|
-
|
3511
|
-
|
3512
|
-
|
6411
|
+
hook_ctx = SDKHooks::HookContext.new(
|
6412
|
+
base_url: base_url,
|
6413
|
+
oauth2_scopes: [],
|
6414
|
+
operation_id: 'hris_upload_employee_document',
|
6415
|
+
security_source: @sdk_configuration.security_source
|
6416
|
+
)
|
6417
|
+
|
6418
|
+
error = T.let(nil, T.nilable(StandardError))
|
6419
|
+
r = T.let(nil, T.nilable(Faraday::Response))
|
6420
|
+
|
6421
|
+
begin
|
6422
|
+
r = connection.post(url) do |req|
|
6423
|
+
req.body = body
|
6424
|
+
req.headers.merge!(headers)
|
6425
|
+
req.options.timeout = timeout unless timeout.nil?
|
6426
|
+
Utils.configure_request_security(req, security)
|
6427
|
+
|
6428
|
+
@sdk_configuration.hooks.before_request(
|
6429
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
6430
|
+
hook_ctx: hook_ctx
|
6431
|
+
),
|
6432
|
+
request: req
|
6433
|
+
)
|
6434
|
+
end
|
6435
|
+
rescue StandardError => e
|
6436
|
+
error = e
|
6437
|
+
ensure
|
6438
|
+
if r.nil? || Utils.error_status?(r.status)
|
6439
|
+
r = @sdk_configuration.hooks.after_error(
|
6440
|
+
error: error,
|
6441
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
6442
|
+
hook_ctx: hook_ctx
|
6443
|
+
),
|
6444
|
+
response: r
|
6445
|
+
)
|
3513
6446
|
else
|
3514
|
-
|
6447
|
+
r = @sdk_configuration.hooks.after_success(
|
6448
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
6449
|
+
hook_ctx: hook_ctx
|
6450
|
+
),
|
6451
|
+
response: r
|
6452
|
+
)
|
6453
|
+
end
|
6454
|
+
|
6455
|
+
if r.nil?
|
6456
|
+
raise error if !error.nil?
|
6457
|
+
raise 'no response'
|
3515
6458
|
end
|
3516
6459
|
end
|
3517
6460
|
|