stackone_client 0.5.5 → 0.5.7
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/hris.rb +275 -0
- data/lib/stack_one/lms.rb +2 -1
- data/lib/stack_one/models/operations/hris_create_employee_skill_request.rb +30 -0
- data/lib/stack_one/models/operations/hris_create_employee_skill_response.rb +36 -0
- data/lib/stack_one/models/operations/hris_get_employee_time_off_balance_request.rb +42 -0
- data/lib/stack_one/models/operations/hris_get_employee_time_off_balance_response.rb +36 -0
- data/lib/stack_one/models/operations/hris_get_time_off_policy_request.rb +36 -0
- data/lib/stack_one/models/operations/hris_get_time_off_policy_response.rb +36 -0
- data/lib/stack_one/models/operations/hris_invite_employee_request.rb +30 -0
- data/lib/stack_one/models/operations/hris_invite_employee_response.rb +36 -0
- data/lib/stack_one/models/operations/hris_list_employee_time_off_balances_queryparam_filter.rb +27 -0
- data/lib/stack_one/models/operations/hris_list_employee_time_off_balances_request.rb +58 -0
- data/lib/stack_one/models/operations/hris_list_employee_time_off_balances_response.rb +36 -0
- data/lib/stack_one/models/operations/hris_list_time_off_policies_queryparam_filter.rb +24 -0
- data/lib/stack_one/models/operations/hris_list_time_off_policies_request.rb +52 -0
- data/lib/stack_one/models/operations/hris_list_time_off_policies_response.rb +36 -0
- data/lib/stack_one/models/operations/lms_list_assignments_queryparam_filter.rb +2 -5
- data/lib/stack_one/models/operations/lms_list_completions_queryparam_filter.rb +2 -5
- data/lib/stack_one/models/operations/lms_list_user_assignments_queryparam_filter.rb +2 -5
- data/lib/stack_one/models/operations/lms_list_user_completions_queryparam_filter.rb +2 -5
- data/lib/stack_one/models/operations.rb +14 -4
- data/lib/stack_one/models/shared/additionaldata.rb +1 -1
- data/lib/stack_one/models/shared/application.rb +2 -0
- data/lib/stack_one/models/shared/atsupdateapplicationrequestdto.rb +2 -10
- data/lib/stack_one/models/shared/balance_unit.rb +27 -0
- data/lib/stack_one/models/shared/createcontentapimodel.rb +5 -2
- data/lib/stack_one/models/shared/createskillsapimodel.rb +5 -5
- data/lib/stack_one/models/shared/createskillsapimodel_hierarchy.rb +2 -2
- data/lib/stack_one/models/shared/createskillsapimodel_language.rb +2 -2
- data/lib/stack_one/models/shared/createskillsapimodel_schemas_proficiency_value.rb +21 -0
- data/lib/stack_one/models/shared/createskillsapimodel_schemas_value.rb +411 -4
- data/lib/stack_one/models/shared/createskillsapimodel_value.rb +3 -5
- data/lib/stack_one/models/shared/employee.rb +7 -2
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto.rb +7 -2
- data/lib/stack_one/models/shared/hrisinviteemployeerequestdto.rb +24 -0
- data/lib/stack_one/models/shared/hrisskillscreaterequestdto.rb +27 -0
- data/lib/stack_one/models/shared/hrisupdateemployeerequestdto.rb +7 -2
- data/lib/stack_one/models/shared/inviteemployeeresult.rb +33 -0
- data/lib/stack_one/models/shared/linkedaccount.rb +5 -2
- data/lib/stack_one/models/shared/lmsupsertcontentrequestdto.rb +5 -2
- data/lib/stack_one/models/shared/policy.rb +42 -0
- data/lib/stack_one/models/shared/{competency.rb → proficiency.rb} +4 -4
- data/lib/stack_one/models/shared/skills.rb +5 -5
- data/lib/stack_one/models/shared/skills_hierarchy.rb +2 -2
- data/lib/stack_one/models/shared/skills_language.rb +2 -2
- data/lib/stack_one/models/shared/skills_proficiency.rb +27 -0
- data/lib/stack_one/models/shared/skills_schemas_proficiency_value.rb +21 -0
- data/lib/stack_one/models/shared/skills_schemas_value.rb +411 -4
- data/lib/stack_one/models/shared/skills_value.rb +3 -5
- data/lib/stack_one/models/shared/timeoffbalanceresult.rb +27 -0
- data/lib/stack_one/models/shared/timeoffbalances.rb +54 -0
- data/lib/stack_one/models/shared/timeoffbalances_schemas_value.rb +26 -0
- data/lib/stack_one/models/shared/timeoffbalances_type.rb +27 -0
- data/lib/stack_one/models/shared/timeoffbalances_value.rb +22 -0
- data/lib/stack_one/models/shared/timeoffbalancespaginated.rb +30 -0
- data/lib/stack_one/models/shared/timeoffpolicies.rb +42 -0
- data/lib/stack_one/models/shared/{skills_competency.rb → timeoffpolicies_type.rb} +4 -4
- data/lib/stack_one/models/shared/timeoffpolicies_value.rb +26 -0
- data/lib/stack_one/models/shared/timeoffpoliciespaginated.rb +30 -0
- data/lib/stack_one/models/shared/timeoffpolicyresult.rb +27 -0
- data/lib/stack_one/models/shared/updateemployeeapimodel.rb +7 -2
- data/lib/stack_one/models/shared.rb +22 -6
- data/lib/stack_one/sdkconfiguration.rb +3 -3
- metadata +36 -10
- data/lib/stack_one/models/operations/learning_object_type.rb +0 -19
- data/lib/stack_one/models/operations/lms_list_user_assignments_queryparam_learning_object_type.rb +0 -19
- data/lib/stack_one/models/operations/lms_list_user_completions_queryparam_learning_object_type.rb +0 -19
- data/lib/stack_one/models/operations/queryparam_learning_object_type.rb +0 -19
- data/lib/stack_one/models/shared/createskillsapimodel_schemas_language_value.rb +0 -426
- data/lib/stack_one/models/shared/skills_schemas_language_value.rb +0 -426
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf0a15e948ef302b69d41eab30854136de6f022ab1b5ba909df9ef0bee1f9599
|
4
|
+
data.tar.gz: 73e535d9dd86635a73742ce592c0b97c2ea4b687d212d7e69044d61b08585449
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c29af82476c1d062f6e0a54b733ca62b96f0f59dec3ff83cab137a32b54cbadb411eb1eeb142df6e89aaf850984715fad2d8ef25adc86aa19043243ae01abdd9
|
7
|
+
data.tar.gz: 2a500553c7a9348f6623f4613c238afc9ef04b15da0110e1d9866aefcbb20f99a43c8112a18bd037bf72c99bcd8eb0a33feab8e771a99f495248ff4389387915
|
data/lib/stack_one/hris.rb
CHANGED
@@ -181,6 +181,62 @@ module StackOne
|
|
181
181
|
end
|
182
182
|
|
183
183
|
|
184
|
+
sig { params(hris_skills_create_request_dto: ::StackOne::Shared::HrisSkillsCreateRequestDto, id: ::String, x_account_id: ::String).returns(::StackOne::Operations::HrisCreateEmployeeSkillResponse) }
|
185
|
+
def create_employee_skill(hris_skills_create_request_dto, id, x_account_id)
|
186
|
+
# create_employee_skill - Create Employee Skill
|
187
|
+
request = ::StackOne::Operations::HrisCreateEmployeeSkillRequest.new(
|
188
|
+
|
189
|
+
hris_skills_create_request_dto: hris_skills_create_request_dto,
|
190
|
+
id: id,
|
191
|
+
x_account_id: x_account_id
|
192
|
+
)
|
193
|
+
url, params = @sdk_configuration.get_server_details
|
194
|
+
base_url = Utils.template_url(url, params)
|
195
|
+
url = Utils.generate_url(
|
196
|
+
::StackOne::Operations::HrisCreateEmployeeSkillRequest,
|
197
|
+
base_url,
|
198
|
+
'/unified/hris/employees/{id}/skills',
|
199
|
+
request
|
200
|
+
)
|
201
|
+
headers = Utils.get_headers(request)
|
202
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :hris_skills_create_request_dto, :json)
|
203
|
+
headers['content-type'] = req_content_type
|
204
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
205
|
+
headers['Accept'] = 'application/json'
|
206
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
207
|
+
|
208
|
+
r = @sdk_configuration.client.post(url) do |req|
|
209
|
+
req.headers = headers
|
210
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
211
|
+
if form
|
212
|
+
req.body = Utils.encode_form(form)
|
213
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
214
|
+
req.body = URI.encode_www_form(data)
|
215
|
+
else
|
216
|
+
req.body = data
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
221
|
+
|
222
|
+
res = ::StackOne::Operations::HrisCreateEmployeeSkillResponse.new(
|
223
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
224
|
+
)
|
225
|
+
if r.status == 201
|
226
|
+
if Utils.match_content_type(content_type, 'application/json')
|
227
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::CreateResult)
|
228
|
+
res.create_result = out
|
229
|
+
end
|
230
|
+
elsif r.status == 408
|
231
|
+
res.headers = r.headers
|
232
|
+
elsif [400, 403, 412, 429].include?(r.status)
|
233
|
+
elsif [500, 501].include?(r.status)
|
234
|
+
end
|
235
|
+
|
236
|
+
res
|
237
|
+
end
|
238
|
+
|
239
|
+
|
184
240
|
sig { params(hris_create_time_off_request_dto: ::StackOne::Shared::HrisCreateTimeOffRequestDto, id: ::String, x_account_id: ::String).returns(::StackOne::Operations::HrisCreateEmployeeTimeOffRequestResponse) }
|
185
241
|
def create_employee_time_off_request(hris_create_time_off_request_dto, id, x_account_id)
|
186
242
|
# create_employee_time_off_request - Create Employee Time Off Request
|
@@ -767,6 +823,48 @@ module StackOne
|
|
767
823
|
end
|
768
824
|
|
769
825
|
|
826
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeeTimeOffBalanceRequest)).returns(::StackOne::Operations::HrisGetEmployeeTimeOffBalanceResponse) }
|
827
|
+
def get_employee_time_off_balance(request)
|
828
|
+
# get_employee_time_off_balance - Get Employee Time Off Balance
|
829
|
+
url, params = @sdk_configuration.get_server_details
|
830
|
+
base_url = Utils.template_url(url, params)
|
831
|
+
url = Utils.generate_url(
|
832
|
+
::StackOne::Operations::HrisGetEmployeeTimeOffBalanceRequest,
|
833
|
+
base_url,
|
834
|
+
'/unified/hris/employees/{id}/time_off_balances/{subResourceId}',
|
835
|
+
request
|
836
|
+
)
|
837
|
+
headers = Utils.get_headers(request)
|
838
|
+
query_params = Utils.get_query_params(::StackOne::Operations::HrisGetEmployeeTimeOffBalanceRequest, request)
|
839
|
+
headers['Accept'] = 'application/json'
|
840
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
841
|
+
|
842
|
+
r = @sdk_configuration.client.get(url) do |req|
|
843
|
+
req.headers = headers
|
844
|
+
req.params = query_params
|
845
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
846
|
+
end
|
847
|
+
|
848
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
849
|
+
|
850
|
+
res = ::StackOne::Operations::HrisGetEmployeeTimeOffBalanceResponse.new(
|
851
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
852
|
+
)
|
853
|
+
if r.status == 200
|
854
|
+
if Utils.match_content_type(content_type, 'application/json')
|
855
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::TimeOffBalanceResult)
|
856
|
+
res.time_off_balance_result = out
|
857
|
+
end
|
858
|
+
elsif r.status == 408
|
859
|
+
res.headers = r.headers
|
860
|
+
elsif [400, 403, 412, 429].include?(r.status)
|
861
|
+
elsif [500, 501].include?(r.status)
|
862
|
+
end
|
863
|
+
|
864
|
+
res
|
865
|
+
end
|
866
|
+
|
867
|
+
|
770
868
|
sig { params(request: T.nilable(::StackOne::Operations::HrisGetEmployeesTimeOffRequestRequest)).returns(::StackOne::Operations::HrisGetEmployeesTimeOffRequestResponse) }
|
771
869
|
def get_employees_time_off_request(request)
|
772
870
|
# get_employees_time_off_request - Get Employees Time Off Request
|
@@ -1103,6 +1201,48 @@ module StackOne
|
|
1103
1201
|
end
|
1104
1202
|
|
1105
1203
|
|
1204
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetTimeOffPolicyRequest)).returns(::StackOne::Operations::HrisGetTimeOffPolicyResponse) }
|
1205
|
+
def get_time_off_policy(request)
|
1206
|
+
# get_time_off_policy - Get Time Off Policy
|
1207
|
+
url, params = @sdk_configuration.get_server_details
|
1208
|
+
base_url = Utils.template_url(url, params)
|
1209
|
+
url = Utils.generate_url(
|
1210
|
+
::StackOne::Operations::HrisGetTimeOffPolicyRequest,
|
1211
|
+
base_url,
|
1212
|
+
'/unified/hris/time_off_policies/{id}',
|
1213
|
+
request
|
1214
|
+
)
|
1215
|
+
headers = Utils.get_headers(request)
|
1216
|
+
query_params = Utils.get_query_params(::StackOne::Operations::HrisGetTimeOffPolicyRequest, request)
|
1217
|
+
headers['Accept'] = 'application/json'
|
1218
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
1219
|
+
|
1220
|
+
r = @sdk_configuration.client.get(url) do |req|
|
1221
|
+
req.headers = headers
|
1222
|
+
req.params = query_params
|
1223
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
1224
|
+
end
|
1225
|
+
|
1226
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
1227
|
+
|
1228
|
+
res = ::StackOne::Operations::HrisGetTimeOffPolicyResponse.new(
|
1229
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
1230
|
+
)
|
1231
|
+
if r.status == 200
|
1232
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1233
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::TimeOffPolicyResult)
|
1234
|
+
res.time_off_policy_result = out
|
1235
|
+
end
|
1236
|
+
elsif r.status == 408
|
1237
|
+
res.headers = r.headers
|
1238
|
+
elsif [400, 403, 412, 429].include?(r.status)
|
1239
|
+
elsif [500, 501].include?(r.status)
|
1240
|
+
end
|
1241
|
+
|
1242
|
+
res
|
1243
|
+
end
|
1244
|
+
|
1245
|
+
|
1106
1246
|
sig { params(request: T.nilable(::StackOne::Operations::HrisGetTimeOffRequestRequest)).returns(::StackOne::Operations::HrisGetTimeOffRequestResponse) }
|
1107
1247
|
def get_time_off_request(request)
|
1108
1248
|
# get_time_off_request - Get time off request
|
@@ -1187,6 +1327,62 @@ module StackOne
|
|
1187
1327
|
end
|
1188
1328
|
|
1189
1329
|
|
1330
|
+
sig { params(hris_invite_employee_request_dto: ::StackOne::Shared::HrisInviteEmployeeRequestDto, id: ::String, x_account_id: ::String).returns(::StackOne::Operations::HrisInviteEmployeeResponse) }
|
1331
|
+
def invite_employee(hris_invite_employee_request_dto, id, x_account_id)
|
1332
|
+
# invite_employee - Invite Employee
|
1333
|
+
request = ::StackOne::Operations::HrisInviteEmployeeRequest.new(
|
1334
|
+
|
1335
|
+
hris_invite_employee_request_dto: hris_invite_employee_request_dto,
|
1336
|
+
id: id,
|
1337
|
+
x_account_id: x_account_id
|
1338
|
+
)
|
1339
|
+
url, params = @sdk_configuration.get_server_details
|
1340
|
+
base_url = Utils.template_url(url, params)
|
1341
|
+
url = Utils.generate_url(
|
1342
|
+
::StackOne::Operations::HrisInviteEmployeeRequest,
|
1343
|
+
base_url,
|
1344
|
+
'/unified/hris/employees/{id}/invite',
|
1345
|
+
request
|
1346
|
+
)
|
1347
|
+
headers = Utils.get_headers(request)
|
1348
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :hris_invite_employee_request_dto, :json)
|
1349
|
+
headers['content-type'] = req_content_type
|
1350
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
1351
|
+
headers['Accept'] = 'application/json'
|
1352
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
1353
|
+
|
1354
|
+
r = @sdk_configuration.client.post(url) do |req|
|
1355
|
+
req.headers = headers
|
1356
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
1357
|
+
if form
|
1358
|
+
req.body = Utils.encode_form(form)
|
1359
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
1360
|
+
req.body = URI.encode_www_form(data)
|
1361
|
+
else
|
1362
|
+
req.body = data
|
1363
|
+
end
|
1364
|
+
end
|
1365
|
+
|
1366
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
1367
|
+
|
1368
|
+
res = ::StackOne::Operations::HrisInviteEmployeeResponse.new(
|
1369
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
1370
|
+
)
|
1371
|
+
if r.status == 200
|
1372
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1373
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::InviteEmployeeResult)
|
1374
|
+
res.invite_employee_result = out
|
1375
|
+
end
|
1376
|
+
elsif r.status == 408
|
1377
|
+
res.headers = r.headers
|
1378
|
+
elsif [400, 403, 412, 429].include?(r.status)
|
1379
|
+
elsif [500, 501].include?(r.status)
|
1380
|
+
end
|
1381
|
+
|
1382
|
+
res
|
1383
|
+
end
|
1384
|
+
|
1385
|
+
|
1190
1386
|
sig { params(request: T.nilable(::StackOne::Operations::HrisListBenefitsRequest)).returns(::StackOne::Operations::HrisListBenefitsResponse) }
|
1191
1387
|
def list_benefits(request)
|
1192
1388
|
# list_benefits - List benefits
|
@@ -1493,6 +1689,48 @@ module StackOne
|
|
1493
1689
|
end
|
1494
1690
|
|
1495
1691
|
|
1692
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeTimeOffBalancesRequest)).returns(::StackOne::Operations::HrisListEmployeeTimeOffBalancesResponse) }
|
1693
|
+
def list_employee_time_off_balances(request)
|
1694
|
+
# list_employee_time_off_balances - List Employee Time Off Balances
|
1695
|
+
url, params = @sdk_configuration.get_server_details
|
1696
|
+
base_url = Utils.template_url(url, params)
|
1697
|
+
url = Utils.generate_url(
|
1698
|
+
::StackOne::Operations::HrisListEmployeeTimeOffBalancesRequest,
|
1699
|
+
base_url,
|
1700
|
+
'/unified/hris/employees/{id}/time_off_balances',
|
1701
|
+
request
|
1702
|
+
)
|
1703
|
+
headers = Utils.get_headers(request)
|
1704
|
+
query_params = Utils.get_query_params(::StackOne::Operations::HrisListEmployeeTimeOffBalancesRequest, request)
|
1705
|
+
headers['Accept'] = 'application/json'
|
1706
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
1707
|
+
|
1708
|
+
r = @sdk_configuration.client.get(url) do |req|
|
1709
|
+
req.headers = headers
|
1710
|
+
req.params = query_params
|
1711
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
1712
|
+
end
|
1713
|
+
|
1714
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
1715
|
+
|
1716
|
+
res = ::StackOne::Operations::HrisListEmployeeTimeOffBalancesResponse.new(
|
1717
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
1718
|
+
)
|
1719
|
+
if r.status == 200
|
1720
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1721
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::TimeOffBalancesPaginated)
|
1722
|
+
res.time_off_balances_paginated = out
|
1723
|
+
end
|
1724
|
+
elsif r.status == 408
|
1725
|
+
res.headers = r.headers
|
1726
|
+
elsif [400, 403, 412, 429].include?(r.status)
|
1727
|
+
elsif [500, 501].include?(r.status)
|
1728
|
+
end
|
1729
|
+
|
1730
|
+
res
|
1731
|
+
end
|
1732
|
+
|
1733
|
+
|
1496
1734
|
sig { params(request: T.nilable(::StackOne::Operations::HrisListEmployeeTimeOffRequestsRequest)).returns(::StackOne::Operations::HrisListEmployeeTimeOffRequestsResponse) }
|
1497
1735
|
def list_employee_time_off_requests(request)
|
1498
1736
|
# list_employee_time_off_requests - List Employee Time Off Requests
|
@@ -1836,6 +2074,43 @@ module StackOne
|
|
1836
2074
|
end
|
1837
2075
|
|
1838
2076
|
|
2077
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListTimeOffPoliciesRequest)).returns(::StackOne::Operations::HrisListTimeOffPoliciesResponse) }
|
2078
|
+
def list_time_off_policies(request)
|
2079
|
+
# list_time_off_policies - List Time Off Policies
|
2080
|
+
url, params = @sdk_configuration.get_server_details
|
2081
|
+
base_url = Utils.template_url(url, params)
|
2082
|
+
url = "#{base_url}/unified/hris/time_off_policies"
|
2083
|
+
headers = Utils.get_headers(request)
|
2084
|
+
query_params = Utils.get_query_params(::StackOne::Operations::HrisListTimeOffPoliciesRequest, request)
|
2085
|
+
headers['Accept'] = 'application/json'
|
2086
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
2087
|
+
|
2088
|
+
r = @sdk_configuration.client.get(url) do |req|
|
2089
|
+
req.headers = headers
|
2090
|
+
req.params = query_params
|
2091
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
2092
|
+
end
|
2093
|
+
|
2094
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
2095
|
+
|
2096
|
+
res = ::StackOne::Operations::HrisListTimeOffPoliciesResponse.new(
|
2097
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
2098
|
+
)
|
2099
|
+
if r.status == 200
|
2100
|
+
if Utils.match_content_type(content_type, 'application/json')
|
2101
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::TimeOffPoliciesPaginated)
|
2102
|
+
res.time_off_policies_paginated = out
|
2103
|
+
end
|
2104
|
+
elsif r.status == 408
|
2105
|
+
res.headers = r.headers
|
2106
|
+
elsif [400, 403, 412, 429].include?(r.status)
|
2107
|
+
elsif [500, 501].include?(r.status)
|
2108
|
+
end
|
2109
|
+
|
2110
|
+
res
|
2111
|
+
end
|
2112
|
+
|
2113
|
+
|
1839
2114
|
sig { params(request: T.nilable(::StackOne::Operations::HrisListTimeOffRequestsRequest)).returns(::StackOne::Operations::HrisListTimeOffRequestsResponse) }
|
1840
2115
|
def list_time_off_requests(request)
|
1841
2116
|
# list_time_off_requests - List time off requests
|
data/lib/stack_one/lms.rb
CHANGED
@@ -312,11 +312,12 @@ module StackOne
|
|
312
312
|
res = ::StackOne::Operations::LmsDeleteUserCompletionResponse.new(
|
313
313
|
status_code: r.status, content_type: content_type, raw_response: r
|
314
314
|
)
|
315
|
-
if r.status ==
|
315
|
+
if r.status == 200
|
316
316
|
if Utils.match_content_type(content_type, 'application/json')
|
317
317
|
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::DeleteResult)
|
318
318
|
res.delete_result = out
|
319
319
|
end
|
320
|
+
elsif r.status == 204
|
320
321
|
elsif r.status == 408
|
321
322
|
res.headers = r.headers
|
322
323
|
elsif [400, 403, 412, 429].include?(r.status)
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class HrisCreateEmployeeSkillRequest < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :hris_skills_create_request_dto, ::StackOne::Shared::HrisSkillsCreateRequestDto, { 'request': { 'media_type': 'application/json' } }
|
16
|
+
|
17
|
+
field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
|
18
|
+
# The account identifier
|
19
|
+
field :x_account_id, ::String, { 'header': { 'field_name': 'x-account-id', 'style': 'simple', 'explode': false } }
|
20
|
+
|
21
|
+
|
22
|
+
sig { params(hris_skills_create_request_dto: ::StackOne::Shared::HrisSkillsCreateRequestDto, id: ::String, x_account_id: ::String).void }
|
23
|
+
def initialize(hris_skills_create_request_dto: nil, id: nil, x_account_id: nil)
|
24
|
+
@hris_skills_create_request_dto = hris_skills_create_request_dto
|
25
|
+
@id = id
|
26
|
+
@x_account_id = x_account_id
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class HrisCreateEmployeeSkillResponse < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# HTTP response content type for this operation
|
15
|
+
field :content_type, ::String
|
16
|
+
|
17
|
+
field :headers, T::Hash[Symbol, T::Array[::String]]
|
18
|
+
# Raw HTTP response; suitable for custom response parsing
|
19
|
+
field :raw_response, ::Faraday::Response
|
20
|
+
# HTTP response status code for this operation
|
21
|
+
field :status_code, ::Integer
|
22
|
+
# The skill was created successfully.
|
23
|
+
field :create_result, T.nilable(::StackOne::Shared::CreateResult)
|
24
|
+
|
25
|
+
|
26
|
+
sig { params(content_type: ::String, headers: T::Hash[Symbol, T::Array[::String]], raw_response: ::Faraday::Response, status_code: ::Integer, create_result: T.nilable(::StackOne::Shared::CreateResult)).void }
|
27
|
+
def initialize(content_type: nil, headers: nil, raw_response: nil, status_code: nil, create_result: nil)
|
28
|
+
@content_type = content_type
|
29
|
+
@headers = headers
|
30
|
+
@raw_response = raw_response
|
31
|
+
@status_code = status_code
|
32
|
+
@create_result = create_result
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class HrisGetEmployeeTimeOffBalanceRequest < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
|
16
|
+
|
17
|
+
field :sub_resource_id, ::String, { 'path_param': { 'field_name': 'subResourceId', 'style': 'simple', 'explode': false } }
|
18
|
+
# The account identifier
|
19
|
+
field :x_account_id, ::String, { 'header': { 'field_name': 'x-account-id', 'style': 'simple', 'explode': false } }
|
20
|
+
# The comma separated list of fields that will be expanded in the response
|
21
|
+
field :expand, T.nilable(::String), { 'query_param': { 'field_name': 'expand', 'style': 'form', 'explode': true } }
|
22
|
+
# The comma separated list of fields that will be returned in the response (if empty, all fields are returned)
|
23
|
+
field :fields_, T.nilable(::String), { 'query_param': { 'field_name': 'fields', 'style': 'form', 'explode': true } }
|
24
|
+
# Query parameters that can be used to pass through parameters to the underlying provider request by surrounding them with 'proxy' key
|
25
|
+
field :proxy, T.nilable(T::Hash[Symbol, ::Object]), { 'query_param': { 'field_name': 'proxy', 'style': 'deepObject', 'explode': true } }
|
26
|
+
# Indicates that the raw request result is returned
|
27
|
+
field :raw, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'raw', 'style': 'form', 'explode': true } }
|
28
|
+
|
29
|
+
|
30
|
+
sig { params(id: ::String, sub_resource_id: ::String, x_account_id: ::String, expand: T.nilable(::String), fields_: T.nilable(::String), proxy: T.nilable(T::Hash[Symbol, ::Object]), raw: T.nilable(T::Boolean)).void }
|
31
|
+
def initialize(id: nil, sub_resource_id: nil, x_account_id: nil, expand: nil, fields_: nil, proxy: nil, raw: nil)
|
32
|
+
@id = id
|
33
|
+
@sub_resource_id = sub_resource_id
|
34
|
+
@x_account_id = x_account_id
|
35
|
+
@expand = expand
|
36
|
+
@fields_ = fields_
|
37
|
+
@proxy = proxy
|
38
|
+
@raw = raw
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class HrisGetEmployeeTimeOffBalanceResponse < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# HTTP response content type for this operation
|
15
|
+
field :content_type, ::String
|
16
|
+
|
17
|
+
field :headers, T::Hash[Symbol, T::Array[::String]]
|
18
|
+
# Raw HTTP response; suitable for custom response parsing
|
19
|
+
field :raw_response, ::Faraday::Response
|
20
|
+
# HTTP response status code for this operation
|
21
|
+
field :status_code, ::Integer
|
22
|
+
# The time off balance of the employee with the given identifier was retrieved.
|
23
|
+
field :time_off_balance_result, T.nilable(::StackOne::Shared::TimeOffBalanceResult)
|
24
|
+
|
25
|
+
|
26
|
+
sig { params(content_type: ::String, headers: T::Hash[Symbol, T::Array[::String]], raw_response: ::Faraday::Response, status_code: ::Integer, time_off_balance_result: T.nilable(::StackOne::Shared::TimeOffBalanceResult)).void }
|
27
|
+
def initialize(content_type: nil, headers: nil, raw_response: nil, status_code: nil, time_off_balance_result: nil)
|
28
|
+
@content_type = content_type
|
29
|
+
@headers = headers
|
30
|
+
@raw_response = raw_response
|
31
|
+
@status_code = status_code
|
32
|
+
@time_off_balance_result = time_off_balance_result
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class HrisGetTimeOffPolicyRequest < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
|
16
|
+
# The account identifier
|
17
|
+
field :x_account_id, ::String, { 'header': { 'field_name': 'x-account-id', 'style': 'simple', 'explode': false } }
|
18
|
+
# The comma separated list of fields that will be returned in the response (if empty, all fields are returned)
|
19
|
+
field :fields_, T.nilable(::String), { 'query_param': { 'field_name': 'fields', 'style': 'form', 'explode': true } }
|
20
|
+
# Query parameters that can be used to pass through parameters to the underlying provider request by surrounding them with 'proxy' key
|
21
|
+
field :proxy, T.nilable(T::Hash[Symbol, ::Object]), { 'query_param': { 'field_name': 'proxy', 'style': 'deepObject', 'explode': true } }
|
22
|
+
# Indicates that the raw request result is returned
|
23
|
+
field :raw, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'raw', 'style': 'form', 'explode': true } }
|
24
|
+
|
25
|
+
|
26
|
+
sig { params(id: ::String, x_account_id: ::String, fields_: T.nilable(::String), proxy: T.nilable(T::Hash[Symbol, ::Object]), raw: T.nilable(T::Boolean)).void }
|
27
|
+
def initialize(id: nil, x_account_id: nil, fields_: nil, proxy: nil, raw: nil)
|
28
|
+
@id = id
|
29
|
+
@x_account_id = x_account_id
|
30
|
+
@fields_ = fields_
|
31
|
+
@proxy = proxy
|
32
|
+
@raw = raw
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class HrisGetTimeOffPolicyResponse < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# HTTP response content type for this operation
|
15
|
+
field :content_type, ::String
|
16
|
+
|
17
|
+
field :headers, T::Hash[Symbol, T::Array[::String]]
|
18
|
+
# Raw HTTP response; suitable for custom response parsing
|
19
|
+
field :raw_response, ::Faraday::Response
|
20
|
+
# HTTP response status code for this operation
|
21
|
+
field :status_code, ::Integer
|
22
|
+
# The time off policy with the given identifier was retrieved.
|
23
|
+
field :time_off_policy_result, T.nilable(::StackOne::Shared::TimeOffPolicyResult)
|
24
|
+
|
25
|
+
|
26
|
+
sig { params(content_type: ::String, headers: T::Hash[Symbol, T::Array[::String]], raw_response: ::Faraday::Response, status_code: ::Integer, time_off_policy_result: T.nilable(::StackOne::Shared::TimeOffPolicyResult)).void }
|
27
|
+
def initialize(content_type: nil, headers: nil, raw_response: nil, status_code: nil, time_off_policy_result: nil)
|
28
|
+
@content_type = content_type
|
29
|
+
@headers = headers
|
30
|
+
@raw_response = raw_response
|
31
|
+
@status_code = status_code
|
32
|
+
@time_off_policy_result = time_off_policy_result
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class HrisInviteEmployeeRequest < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :hris_invite_employee_request_dto, ::StackOne::Shared::HrisInviteEmployeeRequestDto, { 'request': { 'media_type': 'application/json' } }
|
16
|
+
|
17
|
+
field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
|
18
|
+
# The account identifier
|
19
|
+
field :x_account_id, ::String, { 'header': { 'field_name': 'x-account-id', 'style': 'simple', 'explode': false } }
|
20
|
+
|
21
|
+
|
22
|
+
sig { params(hris_invite_employee_request_dto: ::StackOne::Shared::HrisInviteEmployeeRequestDto, id: ::String, x_account_id: ::String).void }
|
23
|
+
def initialize(hris_invite_employee_request_dto: nil, id: nil, x_account_id: nil)
|
24
|
+
@hris_invite_employee_request_dto = hris_invite_employee_request_dto
|
25
|
+
@id = id
|
26
|
+
@x_account_id = x_account_id
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class HrisInviteEmployeeResponse < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# HTTP response content type for this operation
|
15
|
+
field :content_type, ::String
|
16
|
+
|
17
|
+
field :headers, T::Hash[Symbol, T::Array[::String]]
|
18
|
+
# Raw HTTP response; suitable for custom response parsing
|
19
|
+
field :raw_response, ::Faraday::Response
|
20
|
+
# HTTP response status code for this operation
|
21
|
+
field :status_code, ::Integer
|
22
|
+
# Record invited successfully
|
23
|
+
field :invite_employee_result, T.nilable(::StackOne::Shared::InviteEmployeeResult)
|
24
|
+
|
25
|
+
|
26
|
+
sig { params(content_type: ::String, headers: T::Hash[Symbol, T::Array[::String]], raw_response: ::Faraday::Response, status_code: ::Integer, invite_employee_result: T.nilable(::StackOne::Shared::InviteEmployeeResult)).void }
|
27
|
+
def initialize(content_type: nil, headers: nil, raw_response: nil, status_code: nil, invite_employee_result: nil)
|
28
|
+
@content_type = content_type
|
29
|
+
@headers = headers
|
30
|
+
@raw_response = raw_response
|
31
|
+
@status_code = status_code
|
32
|
+
@invite_employee_result = invite_employee_result
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/lib/stack_one/models/operations/hris_list_employee_time_off_balances_queryparam_filter.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
# HRIS Time Off Balance filters
|
11
|
+
class HrisListEmployeeTimeOffBalancesQueryParamFilter < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# List of policy ids to filter time off balances by.
|
15
|
+
field :policy_ids, T.nilable(T::Array[::String]), { 'query_param': { 'field_name': 'policy_ids' } }
|
16
|
+
# Use a string with a date to only select results updated after that given date
|
17
|
+
field :updated_after, T.nilable(::String), { 'query_param': { 'field_name': 'updated_after' } }
|
18
|
+
|
19
|
+
|
20
|
+
sig { params(policy_ids: T.nilable(T::Array[::String]), updated_after: T.nilable(::String)).void }
|
21
|
+
def initialize(policy_ids: nil, updated_after: nil)
|
22
|
+
@policy_ids = policy_ids
|
23
|
+
@updated_after = updated_after
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|