stackone_client 0.23.0 → 0.27.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 +1 -1
- data/lib/stack_one/ats.rb +276 -0
- data/lib/stack_one/connect_sessions.rb +1 -1
- data/lib/stack_one/connectors.rb +1 -1
- data/lib/stack_one/hris.rb +2616 -428
- data/lib/stack_one/lms.rb +291 -1441
- data/lib/stack_one/models/operations/ats_list_application_changes_queryparam_filter.rb +37 -0
- data/lib/stack_one/models/operations/ats_list_application_changes_request.rb +61 -0
- data/lib/stack_one/models/operations/ats_list_application_changes_response.rb +49 -0
- data/lib/stack_one/models/operations/change_type.rb +22 -0
- data/lib/stack_one/models/operations/hris_get_company_group_request.rb +49 -0
- data/lib/stack_one/models/operations/{lms_create_collection_response.rb → hris_get_company_group_response.rb} +7 -7
- data/lib/stack_one/models/operations/hris_get_division_group_request.rb +49 -0
- data/lib/stack_one/models/operations/hris_get_division_group_response.rb +49 -0
- data/lib/stack_one/models/operations/hris_get_position_request.rb +49 -0
- data/lib/stack_one/models/operations/{lms_batch_upsert_course_response.rb → hris_get_position_response.rb} +7 -7
- data/lib/stack_one/models/operations/hris_get_task_request.rb +53 -0
- data/lib/stack_one/models/operations/{lms_upsert_course_response.rb → hris_get_task_response.rb} +7 -7
- data/lib/stack_one/models/operations/hris_list_companies_groups_queryparam_filter.rb +33 -0
- data/lib/stack_one/models/operations/hris_list_companies_groups_request.rb +69 -0
- data/lib/stack_one/models/operations/hris_list_companies_groups_response.rb +49 -0
- data/lib/stack_one/models/operations/hris_list_division_groups_queryparam_filter.rb +33 -0
- data/lib/stack_one/models/operations/hris_list_division_groups_request.rb +69 -0
- data/lib/stack_one/models/operations/hris_list_division_groups_response.rb +49 -0
- data/lib/stack_one/models/operations/hris_list_positions_queryparam_filter.rb +33 -0
- data/lib/stack_one/models/operations/hris_list_positions_request.rb +73 -0
- data/lib/stack_one/models/operations/hris_list_positions_response.rb +49 -0
- data/lib/stack_one/models/operations/hris_list_tasks_queryparam_filter.rb +33 -0
- data/lib/stack_one/models/operations/hris_list_tasks_request.rb +73 -0
- data/lib/stack_one/models/operations/{lms_update_collection_response.rb → hris_list_tasks_response.rb} +7 -7
- data/lib/stack_one/models/operations/lms_list_assignments_queryparam_filter.rb +2 -2
- data/lib/stack_one/models/operations/lms_list_assignments_queryparam_status.rb +21 -0
- data/lib/stack_one/models/operations/queryparam_status.rb +5 -4
- data/lib/stack_one/models/operations.rb +25 -8
- data/lib/stack_one/models/shared/active.rb +1 -1
- data/lib/stack_one/models/shared/actor.rb +37 -0
- data/lib/stack_one/models/shared/applicationchanges.rb +57 -0
- data/lib/stack_one/models/shared/{customfielddefinition_schemas_4.rb → applicationchanges_4.rb} +1 -1
- data/lib/stack_one/models/shared/applicationchanges_source_value.rb +28 -0
- data/lib/stack_one/models/shared/applicationchanges_value.rb +22 -0
- data/lib/stack_one/models/shared/applicationchangesdatamodel.rb +41 -0
- data/lib/stack_one/models/shared/applicationchangesdatamodel_4.rb +28 -0
- data/lib/stack_one/models/shared/applicationchangesdatamodel_application_status.rb +37 -0
- data/lib/stack_one/models/shared/applicationchangesdatamodel_source_value.rb +28 -0
- data/lib/stack_one/models/shared/applicationchangesdatamodel_value.rb +38 -0
- data/lib/stack_one/models/shared/applicationchangespaginated.rb +41 -0
- data/lib/stack_one/models/shared/categories.rb +1 -0
- data/lib/stack_one/models/shared/category.rb +2 -2
- data/lib/stack_one/models/shared/category_2.rb +20 -0
- data/lib/stack_one/models/shared/change_type.rb +37 -0
- data/lib/stack_one/models/shared/connectorsmeta_category.rb +1 -0
- data/lib/stack_one/models/shared/connectsessioncreate_categories.rb +1 -0
- data/lib/stack_one/models/shared/connectsessiontokenauthlink_categories.rb +1 -0
- data/lib/stack_one/models/shared/course.rb +2 -2
- data/lib/stack_one/models/shared/course_2.rb +20 -0
- data/lib/stack_one/models/shared/course_active.rb +28 -0
- data/lib/stack_one/models/shared/customfielddefinition.rb +2 -2
- data/lib/stack_one/models/shared/customfielddefinition_type.rb +2 -2
- data/lib/stack_one/models/shared/customfieldoption.rb +37 -0
- data/lib/stack_one/models/shared/hriscreatetimeoffrequestdto.rb +6 -2
- data/lib/stack_one/models/shared/hrisdivision.rb +73 -0
- data/lib/stack_one/models/shared/hrisdivision_4.rb +28 -0
- data/lib/stack_one/models/shared/hrisdivision_source_value.rb +28 -0
- data/lib/stack_one/models/shared/hrisdivision_type.rb +37 -0
- data/lib/stack_one/models/shared/hrisdivision_value.rb +26 -0
- data/lib/stack_one/models/shared/hrisdivisionspaginated.rb +45 -0
- data/lib/stack_one/models/shared/hrisdivisionsresult.rb +37 -0
- data/lib/stack_one/models/shared/linkedaccountmeta_category.rb +1 -0
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto.rb +2 -2
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_2.rb +20 -0
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_active.rb +28 -0
- data/lib/stack_one/models/shared/lmsupsertcontentrequestdto.rb +2 -2
- data/lib/stack_one/models/shared/lmsupsertcontentrequestdto_2.rb +20 -0
- data/lib/stack_one/models/shared/lmsupsertcontentrequestdto_active.rb +28 -0
- data/lib/stack_one/models/shared/lmsuser.rb +2 -2
- data/lib/stack_one/models/shared/lmsuser_2.rb +20 -0
- data/lib/stack_one/models/shared/lmsuser_active.rb +28 -0
- data/lib/stack_one/models/shared/position.rb +69 -0
- data/lib/stack_one/models/shared/{options.rb → position_4.rb} +1 -1
- data/lib/stack_one/models/shared/position_source_value.rb +28 -0
- data/lib/stack_one/models/shared/position_status.rb +37 -0
- data/lib/stack_one/models/shared/position_value.rb +22 -0
- data/lib/stack_one/models/shared/positionresult.rb +37 -0
- data/lib/stack_one/models/shared/positionspaginated.rb +45 -0
- data/lib/stack_one/models/shared/reference_active.rb +28 -0
- data/lib/stack_one/models/shared/skills.rb +2 -2
- data/lib/stack_one/models/shared/skills_2.rb +20 -0
- data/lib/stack_one/models/shared/skills_active.rb +28 -0
- data/lib/stack_one/models/shared/timeoff.rb +6 -2
- data/lib/stack_one/models/shared.rb +39 -6
- data/lib/stack_one/proxy.rb +1 -1
- data/lib/stack_one/request_logs.rb +1 -1
- data/lib/stack_one/sdkconfiguration.rb +2 -2
- metadata +66 -16
- data/lib/stack_one/models/operations/lms_batch_upsert_course_request.rb +0 -37
- data/lib/stack_one/models/operations/lms_create_collection_request.rb +0 -37
- data/lib/stack_one/models/operations/lms_update_collection_request.rb +0 -41
- data/lib/stack_one/models/operations/lms_upsert_course_request.rb +0 -37
- data/lib/stack_one/models/shared/createcontentapimodel.rb +0 -53
- data/lib/stack_one/models/shared/lmsbatchupsertcourserequestdto.rb +0 -33
- data/lib/stack_one/models/shared/lmscreatecollectionrequestdto.rb +0 -69
- data/lib/stack_one/models/shared/lmsupsertcourserequestdto.rb +0 -81
data/lib/stack_one/hris.rb
CHANGED
@@ -2887,19 +2887,19 @@ module StackOne
|
|
2887
2887
|
end
|
2888
2888
|
|
2889
2889
|
|
2890
|
-
sig { params(request: T.nilable(Models::Operations::
|
2891
|
-
def
|
2892
|
-
#
|
2890
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetCompanyGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetCompanyGroupResponse) }
|
2891
|
+
def get_company_group(request, retries = nil, timeout_ms = nil)
|
2892
|
+
# get_company_group - Get Company Group
|
2893
2893
|
url, params = @sdk_configuration.get_server_details
|
2894
2894
|
base_url = Utils.template_url(url, params)
|
2895
2895
|
url = Utils.generate_url(
|
2896
|
-
Models::Operations::
|
2896
|
+
Models::Operations::HrisGetCompanyGroupRequest,
|
2897
2897
|
base_url,
|
2898
|
-
'/unified/hris/groups/
|
2898
|
+
'/unified/hris/groups/companies/{id}',
|
2899
2899
|
request
|
2900
2900
|
)
|
2901
2901
|
headers = Utils.get_headers(request)
|
2902
|
-
query_params = Utils.get_query_params(Models::Operations::
|
2902
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetCompanyGroupRequest, request)
|
2903
2903
|
headers['Accept'] = 'application/json'
|
2904
2904
|
headers['user-agent'] = @sdk_configuration.user_agent
|
2905
2905
|
retries ||= @sdk_configuration.retry_config
|
@@ -2927,7 +2927,7 @@ module StackOne
|
|
2927
2927
|
hook_ctx = SDKHooks::HookContext.new(
|
2928
2928
|
base_url: base_url,
|
2929
2929
|
oauth2_scopes: [],
|
2930
|
-
operation_id: '
|
2930
|
+
operation_id: 'hris_get_company_group',
|
2931
2931
|
security_source: @sdk_configuration.security_source
|
2932
2932
|
)
|
2933
2933
|
|
@@ -2984,12 +2984,12 @@ module StackOne
|
|
2984
2984
|
),
|
2985
2985
|
response: http_response
|
2986
2986
|
)
|
2987
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
2988
|
-
response = Models::Operations::
|
2987
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CompanyResult)
|
2988
|
+
response = Models::Operations::HrisGetCompanyGroupResponse.new(
|
2989
2989
|
status_code: http_response.status,
|
2990
2990
|
content_type: content_type,
|
2991
2991
|
raw_response: http_response,
|
2992
|
-
|
2992
|
+
company_result: obj
|
2993
2993
|
)
|
2994
2994
|
|
2995
2995
|
return response
|
@@ -3163,19 +3163,19 @@ module StackOne
|
|
3163
3163
|
end
|
3164
3164
|
|
3165
3165
|
|
3166
|
-
sig { params(request: T.nilable(Models::Operations::
|
3167
|
-
def
|
3168
|
-
#
|
3166
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetCostCenterGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetCostCenterGroupResponse) }
|
3167
|
+
def get_cost_center_group(request, retries = nil, timeout_ms = nil)
|
3168
|
+
# get_cost_center_group - Get Cost Center Group
|
3169
3169
|
url, params = @sdk_configuration.get_server_details
|
3170
3170
|
base_url = Utils.template_url(url, params)
|
3171
3171
|
url = Utils.generate_url(
|
3172
|
-
Models::Operations::
|
3172
|
+
Models::Operations::HrisGetCostCenterGroupRequest,
|
3173
3173
|
base_url,
|
3174
|
-
'/unified/hris/groups/
|
3174
|
+
'/unified/hris/groups/cost_centers/{id}',
|
3175
3175
|
request
|
3176
3176
|
)
|
3177
3177
|
headers = Utils.get_headers(request)
|
3178
|
-
query_params = Utils.get_query_params(Models::Operations::
|
3178
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetCostCenterGroupRequest, request)
|
3179
3179
|
headers['Accept'] = 'application/json'
|
3180
3180
|
headers['user-agent'] = @sdk_configuration.user_agent
|
3181
3181
|
retries ||= @sdk_configuration.retry_config
|
@@ -3203,7 +3203,7 @@ module StackOne
|
|
3203
3203
|
hook_ctx = SDKHooks::HookContext.new(
|
3204
3204
|
base_url: base_url,
|
3205
3205
|
oauth2_scopes: [],
|
3206
|
-
operation_id: '
|
3206
|
+
operation_id: 'hris_get_cost_center_group',
|
3207
3207
|
security_source: @sdk_configuration.security_source
|
3208
3208
|
)
|
3209
3209
|
|
@@ -3260,12 +3260,12 @@ module StackOne
|
|
3260
3260
|
),
|
3261
3261
|
response: http_response
|
3262
3262
|
)
|
3263
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
3264
|
-
response = Models::Operations::
|
3263
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISCostCenterResult)
|
3264
|
+
response = Models::Operations::HrisGetCostCenterGroupResponse.new(
|
3265
3265
|
status_code: http_response.status,
|
3266
3266
|
content_type: content_type,
|
3267
3267
|
raw_response: http_response,
|
3268
|
-
|
3268
|
+
hris_cost_center_result: obj
|
3269
3269
|
)
|
3270
3270
|
|
3271
3271
|
return response
|
@@ -3439,19 +3439,19 @@ module StackOne
|
|
3439
3439
|
end
|
3440
3440
|
|
3441
3441
|
|
3442
|
-
sig { params(request: T.nilable(Models::Operations::
|
3443
|
-
def
|
3444
|
-
#
|
3442
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetDepartmentGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetDepartmentGroupResponse) }
|
3443
|
+
def get_department_group(request, retries = nil, timeout_ms = nil)
|
3444
|
+
# get_department_group - Get Department Group
|
3445
3445
|
url, params = @sdk_configuration.get_server_details
|
3446
3446
|
base_url = Utils.template_url(url, params)
|
3447
3447
|
url = Utils.generate_url(
|
3448
|
-
Models::Operations::
|
3448
|
+
Models::Operations::HrisGetDepartmentGroupRequest,
|
3449
3449
|
base_url,
|
3450
|
-
'/unified/hris/
|
3450
|
+
'/unified/hris/groups/departments/{id}',
|
3451
3451
|
request
|
3452
3452
|
)
|
3453
3453
|
headers = Utils.get_headers(request)
|
3454
|
-
query_params = Utils.get_query_params(Models::Operations::
|
3454
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetDepartmentGroupRequest, request)
|
3455
3455
|
headers['Accept'] = 'application/json'
|
3456
3456
|
headers['user-agent'] = @sdk_configuration.user_agent
|
3457
3457
|
retries ||= @sdk_configuration.retry_config
|
@@ -3479,7 +3479,7 @@ module StackOne
|
|
3479
3479
|
hook_ctx = SDKHooks::HookContext.new(
|
3480
3480
|
base_url: base_url,
|
3481
3481
|
oauth2_scopes: [],
|
3482
|
-
operation_id: '
|
3482
|
+
operation_id: 'hris_get_department_group',
|
3483
3483
|
security_source: @sdk_configuration.security_source
|
3484
3484
|
)
|
3485
3485
|
|
@@ -3536,12 +3536,12 @@ module StackOne
|
|
3536
3536
|
),
|
3537
3537
|
response: http_response
|
3538
3538
|
)
|
3539
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
3540
|
-
response = Models::Operations::
|
3539
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISDepartmentsResult)
|
3540
|
+
response = Models::Operations::HrisGetDepartmentGroupResponse.new(
|
3541
3541
|
status_code: http_response.status,
|
3542
3542
|
content_type: content_type,
|
3543
3543
|
raw_response: http_response,
|
3544
|
-
|
3544
|
+
hris_departments_result: obj
|
3545
3545
|
)
|
3546
3546
|
|
3547
3547
|
return response
|
@@ -3715,19 +3715,19 @@ module StackOne
|
|
3715
3715
|
end
|
3716
3716
|
|
3717
3717
|
|
3718
|
-
sig { params(request: T.nilable(Models::Operations::
|
3719
|
-
def
|
3720
|
-
#
|
3718
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetDivisionGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetDivisionGroupResponse) }
|
3719
|
+
def get_division_group(request, retries = nil, timeout_ms = nil)
|
3720
|
+
# get_division_group - Get Division Group
|
3721
3721
|
url, params = @sdk_configuration.get_server_details
|
3722
3722
|
base_url = Utils.template_url(url, params)
|
3723
3723
|
url = Utils.generate_url(
|
3724
|
-
Models::Operations::
|
3724
|
+
Models::Operations::HrisGetDivisionGroupRequest,
|
3725
3725
|
base_url,
|
3726
|
-
'/unified/hris/
|
3726
|
+
'/unified/hris/groups/divisions/{id}',
|
3727
3727
|
request
|
3728
3728
|
)
|
3729
3729
|
headers = Utils.get_headers(request)
|
3730
|
-
query_params = Utils.get_query_params(Models::Operations::
|
3730
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetDivisionGroupRequest, request)
|
3731
3731
|
headers['Accept'] = 'application/json'
|
3732
3732
|
headers['user-agent'] = @sdk_configuration.user_agent
|
3733
3733
|
retries ||= @sdk_configuration.retry_config
|
@@ -3755,7 +3755,7 @@ module StackOne
|
|
3755
3755
|
hook_ctx = SDKHooks::HookContext.new(
|
3756
3756
|
base_url: base_url,
|
3757
3757
|
oauth2_scopes: [],
|
3758
|
-
operation_id: '
|
3758
|
+
operation_id: 'hris_get_division_group',
|
3759
3759
|
security_source: @sdk_configuration.security_source
|
3760
3760
|
)
|
3761
3761
|
|
@@ -3812,12 +3812,12 @@ module StackOne
|
|
3812
3812
|
),
|
3813
3813
|
response: http_response
|
3814
3814
|
)
|
3815
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
3816
|
-
response = Models::Operations::
|
3815
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISDivisionsResult)
|
3816
|
+
response = Models::Operations::HrisGetDivisionGroupResponse.new(
|
3817
3817
|
status_code: http_response.status,
|
3818
3818
|
content_type: content_type,
|
3819
3819
|
raw_response: http_response,
|
3820
|
-
|
3820
|
+
hris_divisions_result: obj
|
3821
3821
|
)
|
3822
3822
|
|
3823
3823
|
return response
|
@@ -3991,19 +3991,19 @@ module StackOne
|
|
3991
3991
|
end
|
3992
3992
|
|
3993
3993
|
|
3994
|
-
sig { params(request: T.nilable(Models::Operations::
|
3995
|
-
def
|
3996
|
-
#
|
3994
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetEmployeeRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeResponse) }
|
3995
|
+
def get_employee(request, retries = nil, timeout_ms = nil)
|
3996
|
+
# get_employee - Get Employee
|
3997
3997
|
url, params = @sdk_configuration.get_server_details
|
3998
3998
|
base_url = Utils.template_url(url, params)
|
3999
3999
|
url = Utils.generate_url(
|
4000
|
-
Models::Operations::
|
4000
|
+
Models::Operations::HrisGetEmployeeRequest,
|
4001
4001
|
base_url,
|
4002
|
-
'/unified/hris/employees/{id}
|
4002
|
+
'/unified/hris/employees/{id}',
|
4003
4003
|
request
|
4004
4004
|
)
|
4005
4005
|
headers = Utils.get_headers(request)
|
4006
|
-
query_params = Utils.get_query_params(Models::Operations::
|
4006
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetEmployeeRequest, request)
|
4007
4007
|
headers['Accept'] = 'application/json'
|
4008
4008
|
headers['user-agent'] = @sdk_configuration.user_agent
|
4009
4009
|
retries ||= @sdk_configuration.retry_config
|
@@ -4031,7 +4031,7 @@ module StackOne
|
|
4031
4031
|
hook_ctx = SDKHooks::HookContext.new(
|
4032
4032
|
base_url: base_url,
|
4033
4033
|
oauth2_scopes: [],
|
4034
|
-
operation_id: '
|
4034
|
+
operation_id: 'hris_get_employee',
|
4035
4035
|
security_source: @sdk_configuration.security_source
|
4036
4036
|
)
|
4037
4037
|
|
@@ -4088,12 +4088,12 @@ module StackOne
|
|
4088
4088
|
),
|
4089
4089
|
response: http_response
|
4090
4090
|
)
|
4091
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
4092
|
-
response = Models::Operations::
|
4091
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EmployeeResult)
|
4092
|
+
response = Models::Operations::HrisGetEmployeeResponse.new(
|
4093
4093
|
status_code: http_response.status,
|
4094
4094
|
content_type: content_type,
|
4095
4095
|
raw_response: http_response,
|
4096
|
-
|
4096
|
+
employee_result: obj
|
4097
4097
|
)
|
4098
4098
|
|
4099
4099
|
return response
|
@@ -4267,19 +4267,19 @@ module StackOne
|
|
4267
4267
|
end
|
4268
4268
|
|
4269
4269
|
|
4270
|
-
sig { params(request: T.nilable(Models::Operations::
|
4271
|
-
def
|
4272
|
-
#
|
4270
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetEmployeeCustomFieldDefinitionRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeCustomFieldDefinitionResponse) }
|
4271
|
+
def get_employee_custom_field_definition(request, retries = nil, timeout_ms = nil)
|
4272
|
+
# get_employee_custom_field_definition - Get employee Custom Field Definition
|
4273
4273
|
url, params = @sdk_configuration.get_server_details
|
4274
4274
|
base_url = Utils.template_url(url, params)
|
4275
4275
|
url = Utils.generate_url(
|
4276
|
-
Models::Operations::
|
4276
|
+
Models::Operations::HrisGetEmployeeCustomFieldDefinitionRequest,
|
4277
4277
|
base_url,
|
4278
|
-
'/unified/hris/
|
4278
|
+
'/unified/hris/custom_field_definitions/employees/{id}',
|
4279
4279
|
request
|
4280
4280
|
)
|
4281
4281
|
headers = Utils.get_headers(request)
|
4282
|
-
query_params = Utils.get_query_params(Models::Operations::
|
4282
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetEmployeeCustomFieldDefinitionRequest, request)
|
4283
4283
|
headers['Accept'] = 'application/json'
|
4284
4284
|
headers['user-agent'] = @sdk_configuration.user_agent
|
4285
4285
|
retries ||= @sdk_configuration.retry_config
|
@@ -4307,7 +4307,7 @@ module StackOne
|
|
4307
4307
|
hook_ctx = SDKHooks::HookContext.new(
|
4308
4308
|
base_url: base_url,
|
4309
4309
|
oauth2_scopes: [],
|
4310
|
-
operation_id: '
|
4310
|
+
operation_id: 'hris_get_employee_custom_field_definition',
|
4311
4311
|
security_source: @sdk_configuration.security_source
|
4312
4312
|
)
|
4313
4313
|
|
@@ -4364,12 +4364,12 @@ module StackOne
|
|
4364
4364
|
),
|
4365
4365
|
response: http_response
|
4366
4366
|
)
|
4367
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
4368
|
-
response = Models::Operations::
|
4367
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomFieldDefinitionResultApiModel)
|
4368
|
+
response = Models::Operations::HrisGetEmployeeCustomFieldDefinitionResponse.new(
|
4369
4369
|
status_code: http_response.status,
|
4370
4370
|
content_type: content_type,
|
4371
4371
|
raw_response: http_response,
|
4372
|
-
|
4372
|
+
custom_field_definition_result_api_model: obj
|
4373
4373
|
)
|
4374
4374
|
|
4375
4375
|
return response
|
@@ -4543,19 +4543,19 @@ module StackOne
|
|
4543
4543
|
end
|
4544
4544
|
|
4545
4545
|
|
4546
|
-
sig { params(request: T.nilable(Models::Operations::
|
4547
|
-
def
|
4548
|
-
#
|
4546
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetEmployeeDocumentRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeDocumentResponse) }
|
4547
|
+
def get_employee_document(request, retries = nil, timeout_ms = nil)
|
4548
|
+
# get_employee_document - Get Employee Document
|
4549
4549
|
url, params = @sdk_configuration.get_server_details
|
4550
4550
|
base_url = Utils.template_url(url, params)
|
4551
4551
|
url = Utils.generate_url(
|
4552
|
-
Models::Operations::
|
4552
|
+
Models::Operations::HrisGetEmployeeDocumentRequest,
|
4553
4553
|
base_url,
|
4554
|
-
'/unified/hris/employees/{id}/
|
4554
|
+
'/unified/hris/employees/{id}/documents/{subResourceId}',
|
4555
4555
|
request
|
4556
4556
|
)
|
4557
4557
|
headers = Utils.get_headers(request)
|
4558
|
-
query_params = Utils.get_query_params(Models::Operations::
|
4558
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetEmployeeDocumentRequest, request)
|
4559
4559
|
headers['Accept'] = 'application/json'
|
4560
4560
|
headers['user-agent'] = @sdk_configuration.user_agent
|
4561
4561
|
retries ||= @sdk_configuration.retry_config
|
@@ -4583,7 +4583,7 @@ module StackOne
|
|
4583
4583
|
hook_ctx = SDKHooks::HookContext.new(
|
4584
4584
|
base_url: base_url,
|
4585
4585
|
oauth2_scopes: [],
|
4586
|
-
operation_id: '
|
4586
|
+
operation_id: 'hris_get_employee_document',
|
4587
4587
|
security_source: @sdk_configuration.security_source
|
4588
4588
|
)
|
4589
4589
|
|
@@ -4640,12 +4640,12 @@ module StackOne
|
|
4640
4640
|
),
|
4641
4641
|
response: http_response
|
4642
4642
|
)
|
4643
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
4644
|
-
response = Models::Operations::
|
4643
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HrisDocumentResult)
|
4644
|
+
response = Models::Operations::HrisGetEmployeeDocumentResponse.new(
|
4645
4645
|
status_code: http_response.status,
|
4646
4646
|
content_type: content_type,
|
4647
4647
|
raw_response: http_response,
|
4648
|
-
|
4648
|
+
hris_document_result: obj
|
4649
4649
|
)
|
4650
4650
|
|
4651
4651
|
return response
|
@@ -4819,19 +4819,19 @@ module StackOne
|
|
4819
4819
|
end
|
4820
4820
|
|
4821
4821
|
|
4822
|
-
sig { params(request: T.nilable(Models::Operations::
|
4823
|
-
def
|
4824
|
-
#
|
4822
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetEmployeeDocumentCategoryRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeDocumentCategoryResponse) }
|
4823
|
+
def get_employee_document_category(request, retries = nil, timeout_ms = nil)
|
4824
|
+
# get_employee_document_category - Get Employee Document Category
|
4825
4825
|
url, params = @sdk_configuration.get_server_details
|
4826
4826
|
base_url = Utils.template_url(url, params)
|
4827
4827
|
url = Utils.generate_url(
|
4828
|
-
Models::Operations::
|
4828
|
+
Models::Operations::HrisGetEmployeeDocumentCategoryRequest,
|
4829
4829
|
base_url,
|
4830
|
-
'/unified/hris/
|
4830
|
+
'/unified/hris/documents/employee_categories/{id}',
|
4831
4831
|
request
|
4832
4832
|
)
|
4833
4833
|
headers = Utils.get_headers(request)
|
4834
|
-
query_params = Utils.get_query_params(Models::Operations::
|
4834
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetEmployeeDocumentCategoryRequest, request)
|
4835
4835
|
headers['Accept'] = 'application/json'
|
4836
4836
|
headers['user-agent'] = @sdk_configuration.user_agent
|
4837
4837
|
retries ||= @sdk_configuration.retry_config
|
@@ -4859,7 +4859,7 @@ module StackOne
|
|
4859
4859
|
hook_ctx = SDKHooks::HookContext.new(
|
4860
4860
|
base_url: base_url,
|
4861
4861
|
oauth2_scopes: [],
|
4862
|
-
operation_id: '
|
4862
|
+
operation_id: 'hris_get_employee_document_category',
|
4863
4863
|
security_source: @sdk_configuration.security_source
|
4864
4864
|
)
|
4865
4865
|
|
@@ -4916,12 +4916,12 @@ module StackOne
|
|
4916
4916
|
),
|
4917
4917
|
response: http_response
|
4918
4918
|
)
|
4919
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
4920
|
-
response = Models::Operations::
|
4919
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ReferenceResult)
|
4920
|
+
response = Models::Operations::HrisGetEmployeeDocumentCategoryResponse.new(
|
4921
4921
|
status_code: http_response.status,
|
4922
4922
|
content_type: content_type,
|
4923
4923
|
raw_response: http_response,
|
4924
|
-
|
4924
|
+
reference_result: obj
|
4925
4925
|
)
|
4926
4926
|
|
4927
4927
|
return response
|
@@ -5095,19 +5095,19 @@ module StackOne
|
|
5095
5095
|
end
|
5096
5096
|
|
5097
5097
|
|
5098
|
-
sig { params(request: T.nilable(Models::Operations::
|
5099
|
-
def
|
5100
|
-
#
|
5098
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetEmployeeEmploymentRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeEmploymentResponse) }
|
5099
|
+
def get_employee_employment(request, retries = nil, timeout_ms = nil)
|
5100
|
+
# get_employee_employment - Get Employee Employment
|
5101
5101
|
url, params = @sdk_configuration.get_server_details
|
5102
5102
|
base_url = Utils.template_url(url, params)
|
5103
5103
|
url = Utils.generate_url(
|
5104
|
-
Models::Operations::
|
5104
|
+
Models::Operations::HrisGetEmployeeEmploymentRequest,
|
5105
5105
|
base_url,
|
5106
|
-
'/unified/hris/employees/{id}/
|
5106
|
+
'/unified/hris/employees/{id}/employments/{subResourceId}',
|
5107
5107
|
request
|
5108
5108
|
)
|
5109
5109
|
headers = Utils.get_headers(request)
|
5110
|
-
query_params = Utils.get_query_params(Models::Operations::
|
5110
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetEmployeeEmploymentRequest, request)
|
5111
5111
|
headers['Accept'] = 'application/json'
|
5112
5112
|
headers['user-agent'] = @sdk_configuration.user_agent
|
5113
5113
|
retries ||= @sdk_configuration.retry_config
|
@@ -5135,7 +5135,7 @@ module StackOne
|
|
5135
5135
|
hook_ctx = SDKHooks::HookContext.new(
|
5136
5136
|
base_url: base_url,
|
5137
5137
|
oauth2_scopes: [],
|
5138
|
-
operation_id: '
|
5138
|
+
operation_id: 'hris_get_employee_employment',
|
5139
5139
|
security_source: @sdk_configuration.security_source
|
5140
5140
|
)
|
5141
5141
|
|
@@ -5192,12 +5192,12 @@ module StackOne
|
|
5192
5192
|
),
|
5193
5193
|
response: http_response
|
5194
5194
|
)
|
5195
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
5196
|
-
response = Models::Operations::
|
5195
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EmploymentResult)
|
5196
|
+
response = Models::Operations::HrisGetEmployeeEmploymentResponse.new(
|
5197
5197
|
status_code: http_response.status,
|
5198
5198
|
content_type: content_type,
|
5199
5199
|
raw_response: http_response,
|
5200
|
-
|
5200
|
+
employment_result: obj
|
5201
5201
|
)
|
5202
5202
|
|
5203
5203
|
return response
|
@@ -5371,19 +5371,19 @@ module StackOne
|
|
5371
5371
|
end
|
5372
5372
|
|
5373
5373
|
|
5374
|
-
sig { params(request: T.nilable(Models::Operations::
|
5375
|
-
def
|
5376
|
-
#
|
5374
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetEmployeeSkillRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeSkillResponse) }
|
5375
|
+
def get_employee_skill(request, retries = nil, timeout_ms = nil)
|
5376
|
+
# get_employee_skill - Get Employee Skill
|
5377
5377
|
url, params = @sdk_configuration.get_server_details
|
5378
5378
|
base_url = Utils.template_url(url, params)
|
5379
5379
|
url = Utils.generate_url(
|
5380
|
-
Models::Operations::
|
5380
|
+
Models::Operations::HrisGetEmployeeSkillRequest,
|
5381
5381
|
base_url,
|
5382
|
-
'/unified/hris/employees/{id}/
|
5382
|
+
'/unified/hris/employees/{id}/skills/{subResourceId}',
|
5383
5383
|
request
|
5384
5384
|
)
|
5385
5385
|
headers = Utils.get_headers(request)
|
5386
|
-
query_params = Utils.get_query_params(Models::Operations::
|
5386
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetEmployeeSkillRequest, request)
|
5387
5387
|
headers['Accept'] = 'application/json'
|
5388
5388
|
headers['user-agent'] = @sdk_configuration.user_agent
|
5389
5389
|
retries ||= @sdk_configuration.retry_config
|
@@ -5411,7 +5411,7 @@ module StackOne
|
|
5411
5411
|
hook_ctx = SDKHooks::HookContext.new(
|
5412
5412
|
base_url: base_url,
|
5413
5413
|
oauth2_scopes: [],
|
5414
|
-
operation_id: '
|
5414
|
+
operation_id: 'hris_get_employee_skill',
|
5415
5415
|
security_source: @sdk_configuration.security_source
|
5416
5416
|
)
|
5417
5417
|
|
@@ -5468,12 +5468,12 @@ module StackOne
|
|
5468
5468
|
),
|
5469
5469
|
response: http_response
|
5470
5470
|
)
|
5471
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
5472
|
-
response = Models::Operations::
|
5471
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EntitySkillResult)
|
5472
|
+
response = Models::Operations::HrisGetEmployeeSkillResponse.new(
|
5473
5473
|
status_code: http_response.status,
|
5474
5474
|
content_type: content_type,
|
5475
5475
|
raw_response: http_response,
|
5476
|
-
|
5476
|
+
entity_skill_result: obj
|
5477
5477
|
)
|
5478
5478
|
|
5479
5479
|
return response
|
@@ -5647,19 +5647,19 @@ module StackOne
|
|
5647
5647
|
end
|
5648
5648
|
|
5649
5649
|
|
5650
|
-
sig { params(request: T.nilable(Models::Operations::
|
5651
|
-
def
|
5652
|
-
#
|
5650
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetEmployeeTaskRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeTaskResponse) }
|
5651
|
+
def get_employee_task(request, retries = nil, timeout_ms = nil)
|
5652
|
+
# get_employee_task - Get Employee Task
|
5653
5653
|
url, params = @sdk_configuration.get_server_details
|
5654
5654
|
base_url = Utils.template_url(url, params)
|
5655
5655
|
url = Utils.generate_url(
|
5656
|
-
Models::Operations::
|
5656
|
+
Models::Operations::HrisGetEmployeeTaskRequest,
|
5657
5657
|
base_url,
|
5658
|
-
'/unified/hris/employees/{id}/
|
5658
|
+
'/unified/hris/employees/{id}/tasks/{subResourceId}',
|
5659
5659
|
request
|
5660
5660
|
)
|
5661
5661
|
headers = Utils.get_headers(request)
|
5662
|
-
query_params = Utils.get_query_params(Models::Operations::
|
5662
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetEmployeeTaskRequest, request)
|
5663
5663
|
headers['Accept'] = 'application/json'
|
5664
5664
|
headers['user-agent'] = @sdk_configuration.user_agent
|
5665
5665
|
retries ||= @sdk_configuration.retry_config
|
@@ -5687,7 +5687,7 @@ module StackOne
|
|
5687
5687
|
hook_ctx = SDKHooks::HookContext.new(
|
5688
5688
|
base_url: base_url,
|
5689
5689
|
oauth2_scopes: [],
|
5690
|
-
operation_id: '
|
5690
|
+
operation_id: 'hris_get_employee_task',
|
5691
5691
|
security_source: @sdk_configuration.security_source
|
5692
5692
|
)
|
5693
5693
|
|
@@ -5744,12 +5744,12 @@ module StackOne
|
|
5744
5744
|
),
|
5745
5745
|
response: http_response
|
5746
5746
|
)
|
5747
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
5748
|
-
response = Models::Operations::
|
5747
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TaskResult)
|
5748
|
+
response = Models::Operations::HrisGetEmployeeTaskResponse.new(
|
5749
5749
|
status_code: http_response.status,
|
5750
5750
|
content_type: content_type,
|
5751
5751
|
raw_response: http_response,
|
5752
|
-
|
5752
|
+
task_result: obj
|
5753
5753
|
)
|
5754
5754
|
|
5755
5755
|
return response
|
@@ -5923,19 +5923,19 @@ module StackOne
|
|
5923
5923
|
end
|
5924
5924
|
|
5925
5925
|
|
5926
|
-
sig { params(request: T.nilable(Models::Operations::
|
5927
|
-
def
|
5928
|
-
#
|
5926
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetEmployeeTimeOffBalanceRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeTimeOffBalanceResponse) }
|
5927
|
+
def get_employee_time_off_balance(request, retries = nil, timeout_ms = nil)
|
5928
|
+
# get_employee_time_off_balance - Get Employee Time Off Balance
|
5929
5929
|
url, params = @sdk_configuration.get_server_details
|
5930
5930
|
base_url = Utils.template_url(url, params)
|
5931
5931
|
url = Utils.generate_url(
|
5932
|
-
Models::Operations::
|
5932
|
+
Models::Operations::HrisGetEmployeeTimeOffBalanceRequest,
|
5933
5933
|
base_url,
|
5934
|
-
'/unified/hris/employees/{id}/
|
5934
|
+
'/unified/hris/employees/{id}/time_off_balances/{subResourceId}',
|
5935
5935
|
request
|
5936
5936
|
)
|
5937
5937
|
headers = Utils.get_headers(request)
|
5938
|
-
query_params = Utils.get_query_params(Models::Operations::
|
5938
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetEmployeeTimeOffBalanceRequest, request)
|
5939
5939
|
headers['Accept'] = 'application/json'
|
5940
5940
|
headers['user-agent'] = @sdk_configuration.user_agent
|
5941
5941
|
retries ||= @sdk_configuration.retry_config
|
@@ -5963,7 +5963,7 @@ module StackOne
|
|
5963
5963
|
hook_ctx = SDKHooks::HookContext.new(
|
5964
5964
|
base_url: base_url,
|
5965
5965
|
oauth2_scopes: [],
|
5966
|
-
operation_id: '
|
5966
|
+
operation_id: 'hris_get_employee_time_off_balance',
|
5967
5967
|
security_source: @sdk_configuration.security_source
|
5968
5968
|
)
|
5969
5969
|
|
@@ -6020,12 +6020,12 @@ module StackOne
|
|
6020
6020
|
),
|
6021
6021
|
response: http_response
|
6022
6022
|
)
|
6023
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
6024
|
-
response = Models::Operations::
|
6023
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffBalanceResult)
|
6024
|
+
response = Models::Operations::HrisGetEmployeeTimeOffBalanceResponse.new(
|
6025
6025
|
status_code: http_response.status,
|
6026
6026
|
content_type: content_type,
|
6027
6027
|
raw_response: http_response,
|
6028
|
-
|
6028
|
+
time_off_balance_result: obj
|
6029
6029
|
)
|
6030
6030
|
|
6031
6031
|
return response
|
@@ -6199,19 +6199,19 @@ module StackOne
|
|
6199
6199
|
end
|
6200
6200
|
|
6201
6201
|
|
6202
|
-
sig { params(request: T.nilable(Models::Operations::
|
6203
|
-
def
|
6204
|
-
#
|
6202
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetEmployeesTimeOffRequestRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeesTimeOffRequestResponse) }
|
6203
|
+
def get_employees_time_off_request(request, retries = nil, timeout_ms = nil)
|
6204
|
+
# get_employees_time_off_request - Get Employees Time Off Request
|
6205
6205
|
url, params = @sdk_configuration.get_server_details
|
6206
6206
|
base_url = Utils.template_url(url, params)
|
6207
6207
|
url = Utils.generate_url(
|
6208
|
-
Models::Operations::
|
6208
|
+
Models::Operations::HrisGetEmployeesTimeOffRequestRequest,
|
6209
6209
|
base_url,
|
6210
|
-
'/unified/hris/
|
6210
|
+
'/unified/hris/employees/{id}/time_off/{subResourceId}',
|
6211
6211
|
request
|
6212
6212
|
)
|
6213
6213
|
headers = Utils.get_headers(request)
|
6214
|
-
query_params = Utils.get_query_params(Models::Operations::
|
6214
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetEmployeesTimeOffRequestRequest, request)
|
6215
6215
|
headers['Accept'] = 'application/json'
|
6216
6216
|
headers['user-agent'] = @sdk_configuration.user_agent
|
6217
6217
|
retries ||= @sdk_configuration.retry_config
|
@@ -6239,7 +6239,7 @@ module StackOne
|
|
6239
6239
|
hook_ctx = SDKHooks::HookContext.new(
|
6240
6240
|
base_url: base_url,
|
6241
6241
|
oauth2_scopes: [],
|
6242
|
-
operation_id: '
|
6242
|
+
operation_id: 'hris_get_employees_time_off_request',
|
6243
6243
|
security_source: @sdk_configuration.security_source
|
6244
6244
|
)
|
6245
6245
|
|
@@ -6296,12 +6296,12 @@ module StackOne
|
|
6296
6296
|
),
|
6297
6297
|
response: http_response
|
6298
6298
|
)
|
6299
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
6300
|
-
response = Models::Operations::
|
6299
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffResult)
|
6300
|
+
response = Models::Operations::HrisGetEmployeesTimeOffRequestResponse.new(
|
6301
6301
|
status_code: http_response.status,
|
6302
6302
|
content_type: content_type,
|
6303
6303
|
raw_response: http_response,
|
6304
|
-
|
6304
|
+
time_off_result: obj
|
6305
6305
|
)
|
6306
6306
|
|
6307
6307
|
return response
|
@@ -6475,19 +6475,19 @@ module StackOne
|
|
6475
6475
|
end
|
6476
6476
|
|
6477
6477
|
|
6478
|
-
sig { params(request: T.nilable(Models::Operations::
|
6479
|
-
def
|
6480
|
-
#
|
6478
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetEmployeesWorkEligibilityRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeesWorkEligibilityResponse) }
|
6479
|
+
def get_employees_work_eligibility(request, retries = nil, timeout_ms = nil)
|
6480
|
+
# get_employees_work_eligibility - Get Employees Work Eligibility
|
6481
6481
|
url, params = @sdk_configuration.get_server_details
|
6482
6482
|
base_url = Utils.template_url(url, params)
|
6483
6483
|
url = Utils.generate_url(
|
6484
|
-
Models::Operations::
|
6484
|
+
Models::Operations::HrisGetEmployeesWorkEligibilityRequest,
|
6485
6485
|
base_url,
|
6486
|
-
'/unified/hris/
|
6486
|
+
'/unified/hris/employees/{id}/work_eligibility/{subResourceId}',
|
6487
6487
|
request
|
6488
6488
|
)
|
6489
6489
|
headers = Utils.get_headers(request)
|
6490
|
-
query_params = Utils.get_query_params(Models::Operations::
|
6490
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetEmployeesWorkEligibilityRequest, request)
|
6491
6491
|
headers['Accept'] = 'application/json'
|
6492
6492
|
headers['user-agent'] = @sdk_configuration.user_agent
|
6493
6493
|
retries ||= @sdk_configuration.retry_config
|
@@ -6515,7 +6515,7 @@ module StackOne
|
|
6515
6515
|
hook_ctx = SDKHooks::HookContext.new(
|
6516
6516
|
base_url: base_url,
|
6517
6517
|
oauth2_scopes: [],
|
6518
|
-
operation_id: '
|
6518
|
+
operation_id: 'hris_get_employees_work_eligibility',
|
6519
6519
|
security_source: @sdk_configuration.security_source
|
6520
6520
|
)
|
6521
6521
|
|
@@ -6572,12 +6572,12 @@ module StackOne
|
|
6572
6572
|
),
|
6573
6573
|
response: http_response
|
6574
6574
|
)
|
6575
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
6576
|
-
response = Models::Operations::
|
6575
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::WorkEligibilityResult)
|
6576
|
+
response = Models::Operations::HrisGetEmployeesWorkEligibilityResponse.new(
|
6577
6577
|
status_code: http_response.status,
|
6578
6578
|
content_type: content_type,
|
6579
6579
|
raw_response: http_response,
|
6580
|
-
|
6580
|
+
work_eligibility_result: obj
|
6581
6581
|
)
|
6582
6582
|
|
6583
6583
|
return response
|
@@ -6751,19 +6751,19 @@ module StackOne
|
|
6751
6751
|
end
|
6752
6752
|
|
6753
6753
|
|
6754
|
-
sig { params(request: T.nilable(Models::Operations::
|
6755
|
-
def
|
6756
|
-
#
|
6754
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetEmploymentRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmploymentResponse) }
|
6755
|
+
def get_employment(request, retries = nil, timeout_ms = nil)
|
6756
|
+
# get_employment - Get Employment
|
6757
6757
|
url, params = @sdk_configuration.get_server_details
|
6758
6758
|
base_url = Utils.template_url(url, params)
|
6759
6759
|
url = Utils.generate_url(
|
6760
|
-
Models::Operations::
|
6760
|
+
Models::Operations::HrisGetEmploymentRequest,
|
6761
6761
|
base_url,
|
6762
|
-
'/unified/hris/
|
6762
|
+
'/unified/hris/employments/{id}',
|
6763
6763
|
request
|
6764
6764
|
)
|
6765
6765
|
headers = Utils.get_headers(request)
|
6766
|
-
query_params = Utils.get_query_params(Models::Operations::
|
6766
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetEmploymentRequest, request)
|
6767
6767
|
headers['Accept'] = 'application/json'
|
6768
6768
|
headers['user-agent'] = @sdk_configuration.user_agent
|
6769
6769
|
retries ||= @sdk_configuration.retry_config
|
@@ -6791,7 +6791,7 @@ module StackOne
|
|
6791
6791
|
hook_ctx = SDKHooks::HookContext.new(
|
6792
6792
|
base_url: base_url,
|
6793
6793
|
oauth2_scopes: [],
|
6794
|
-
operation_id: '
|
6794
|
+
operation_id: 'hris_get_employment',
|
6795
6795
|
security_source: @sdk_configuration.security_source
|
6796
6796
|
)
|
6797
6797
|
|
@@ -6848,12 +6848,12 @@ module StackOne
|
|
6848
6848
|
),
|
6849
6849
|
response: http_response
|
6850
6850
|
)
|
6851
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
6852
|
-
response = Models::Operations::
|
6851
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EmploymentResult)
|
6852
|
+
response = Models::Operations::HrisGetEmploymentResponse.new(
|
6853
6853
|
status_code: http_response.status,
|
6854
6854
|
content_type: content_type,
|
6855
6855
|
raw_response: http_response,
|
6856
|
-
|
6856
|
+
employment_result: obj
|
6857
6857
|
)
|
6858
6858
|
|
6859
6859
|
return response
|
@@ -7027,19 +7027,19 @@ module StackOne
|
|
7027
7027
|
end
|
7028
7028
|
|
7029
7029
|
|
7030
|
-
sig { params(request: T.nilable(Models::Operations::
|
7031
|
-
def
|
7032
|
-
#
|
7030
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetGroupResponse) }
|
7031
|
+
def get_group(request, retries = nil, timeout_ms = nil)
|
7032
|
+
# get_group - Get Group
|
7033
7033
|
url, params = @sdk_configuration.get_server_details
|
7034
7034
|
base_url = Utils.template_url(url, params)
|
7035
7035
|
url = Utils.generate_url(
|
7036
|
-
Models::Operations::
|
7036
|
+
Models::Operations::HrisGetGroupRequest,
|
7037
7037
|
base_url,
|
7038
|
-
'/unified/hris/
|
7038
|
+
'/unified/hris/groups/{id}',
|
7039
7039
|
request
|
7040
7040
|
)
|
7041
7041
|
headers = Utils.get_headers(request)
|
7042
|
-
query_params = Utils.get_query_params(Models::Operations::
|
7042
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetGroupRequest, request)
|
7043
7043
|
headers['Accept'] = 'application/json'
|
7044
7044
|
headers['user-agent'] = @sdk_configuration.user_agent
|
7045
7045
|
retries ||= @sdk_configuration.retry_config
|
@@ -7067,7 +7067,7 @@ module StackOne
|
|
7067
7067
|
hook_ctx = SDKHooks::HookContext.new(
|
7068
7068
|
base_url: base_url,
|
7069
7069
|
oauth2_scopes: [],
|
7070
|
-
operation_id: '
|
7070
|
+
operation_id: 'hris_get_group',
|
7071
7071
|
security_source: @sdk_configuration.security_source
|
7072
7072
|
)
|
7073
7073
|
|
@@ -7124,12 +7124,12 @@ module StackOne
|
|
7124
7124
|
),
|
7125
7125
|
response: http_response
|
7126
7126
|
)
|
7127
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
7128
|
-
response = Models::Operations::
|
7127
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISGroupsResult)
|
7128
|
+
response = Models::Operations::HrisGetGroupResponse.new(
|
7129
7129
|
status_code: http_response.status,
|
7130
7130
|
content_type: content_type,
|
7131
7131
|
raw_response: http_response,
|
7132
|
-
|
7132
|
+
hris_groups_result: obj
|
7133
7133
|
)
|
7134
7134
|
|
7135
7135
|
return response
|
@@ -7303,19 +7303,19 @@ module StackOne
|
|
7303
7303
|
end
|
7304
7304
|
|
7305
7305
|
|
7306
|
-
sig { params(request: T.nilable(Models::Operations::
|
7307
|
-
def
|
7308
|
-
#
|
7306
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetJobRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetJobResponse) }
|
7307
|
+
def get_job(request, retries = nil, timeout_ms = nil)
|
7308
|
+
# get_job - Get Job
|
7309
7309
|
url, params = @sdk_configuration.get_server_details
|
7310
7310
|
base_url = Utils.template_url(url, params)
|
7311
7311
|
url = Utils.generate_url(
|
7312
|
-
Models::Operations::
|
7312
|
+
Models::Operations::HrisGetJobRequest,
|
7313
7313
|
base_url,
|
7314
|
-
'/unified/hris/
|
7314
|
+
'/unified/hris/jobs/{id}',
|
7315
7315
|
request
|
7316
7316
|
)
|
7317
7317
|
headers = Utils.get_headers(request)
|
7318
|
-
query_params = Utils.get_query_params(Models::Operations::
|
7318
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetJobRequest, request)
|
7319
7319
|
headers['Accept'] = 'application/json'
|
7320
7320
|
headers['user-agent'] = @sdk_configuration.user_agent
|
7321
7321
|
retries ||= @sdk_configuration.retry_config
|
@@ -7343,7 +7343,7 @@ module StackOne
|
|
7343
7343
|
hook_ctx = SDKHooks::HookContext.new(
|
7344
7344
|
base_url: base_url,
|
7345
7345
|
oauth2_scopes: [],
|
7346
|
-
operation_id: '
|
7346
|
+
operation_id: 'hris_get_job',
|
7347
7347
|
security_source: @sdk_configuration.security_source
|
7348
7348
|
)
|
7349
7349
|
|
@@ -7400,12 +7400,12 @@ module StackOne
|
|
7400
7400
|
),
|
7401
7401
|
response: http_response
|
7402
7402
|
)
|
7403
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
7404
|
-
response = Models::Operations::
|
7403
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::JobResult)
|
7404
|
+
response = Models::Operations::HrisGetJobResponse.new(
|
7405
7405
|
status_code: http_response.status,
|
7406
7406
|
content_type: content_type,
|
7407
7407
|
raw_response: http_response,
|
7408
|
-
|
7408
|
+
job_result: obj
|
7409
7409
|
)
|
7410
7410
|
|
7411
7411
|
return response
|
@@ -7579,19 +7579,19 @@ module StackOne
|
|
7579
7579
|
end
|
7580
7580
|
|
7581
7581
|
|
7582
|
-
sig { params(request: T.nilable(Models::Operations::
|
7583
|
-
def
|
7584
|
-
#
|
7582
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetLocationRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetLocationResponse) }
|
7583
|
+
def get_location(request, retries = nil, timeout_ms = nil)
|
7584
|
+
# get_location - Get Work Location
|
7585
7585
|
url, params = @sdk_configuration.get_server_details
|
7586
7586
|
base_url = Utils.template_url(url, params)
|
7587
7587
|
url = Utils.generate_url(
|
7588
|
-
Models::Operations::
|
7588
|
+
Models::Operations::HrisGetLocationRequest,
|
7589
7589
|
base_url,
|
7590
|
-
'/unified/hris/
|
7590
|
+
'/unified/hris/locations/{id}',
|
7591
7591
|
request
|
7592
7592
|
)
|
7593
7593
|
headers = Utils.get_headers(request)
|
7594
|
-
query_params = Utils.get_query_params(Models::Operations::
|
7594
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetLocationRequest, request)
|
7595
7595
|
headers['Accept'] = 'application/json'
|
7596
7596
|
headers['user-agent'] = @sdk_configuration.user_agent
|
7597
7597
|
retries ||= @sdk_configuration.retry_config
|
@@ -7619,7 +7619,7 @@ module StackOne
|
|
7619
7619
|
hook_ctx = SDKHooks::HookContext.new(
|
7620
7620
|
base_url: base_url,
|
7621
7621
|
oauth2_scopes: [],
|
7622
|
-
operation_id: '
|
7622
|
+
operation_id: 'hris_get_location',
|
7623
7623
|
security_source: @sdk_configuration.security_source
|
7624
7624
|
)
|
7625
7625
|
|
@@ -7676,12 +7676,12 @@ module StackOne
|
|
7676
7676
|
),
|
7677
7677
|
response: http_response
|
7678
7678
|
)
|
7679
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
7680
|
-
response = Models::Operations::
|
7679
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISLocationResult)
|
7680
|
+
response = Models::Operations::HrisGetLocationResponse.new(
|
7681
7681
|
status_code: http_response.status,
|
7682
7682
|
content_type: content_type,
|
7683
7683
|
raw_response: http_response,
|
7684
|
-
|
7684
|
+
hris_location_result: obj
|
7685
7685
|
)
|
7686
7686
|
|
7687
7687
|
return response
|
@@ -7855,19 +7855,19 @@ module StackOne
|
|
7855
7855
|
end
|
7856
7856
|
|
7857
7857
|
|
7858
|
-
sig { params(request: T.nilable(Models::Operations::
|
7859
|
-
def
|
7860
|
-
#
|
7858
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetPositionRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetPositionResponse) }
|
7859
|
+
def get_position(request, retries = nil, timeout_ms = nil)
|
7860
|
+
# get_position - Get Position
|
7861
7861
|
url, params = @sdk_configuration.get_server_details
|
7862
7862
|
base_url = Utils.template_url(url, params)
|
7863
7863
|
url = Utils.generate_url(
|
7864
|
-
Models::Operations::
|
7864
|
+
Models::Operations::HrisGetPositionRequest,
|
7865
7865
|
base_url,
|
7866
|
-
'/unified/hris/
|
7866
|
+
'/unified/hris/positions/{id}',
|
7867
7867
|
request
|
7868
7868
|
)
|
7869
7869
|
headers = Utils.get_headers(request)
|
7870
|
-
query_params = Utils.get_query_params(Models::Operations::
|
7870
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetPositionRequest, request)
|
7871
7871
|
headers['Accept'] = 'application/json'
|
7872
7872
|
headers['user-agent'] = @sdk_configuration.user_agent
|
7873
7873
|
retries ||= @sdk_configuration.retry_config
|
@@ -7895,7 +7895,7 @@ module StackOne
|
|
7895
7895
|
hook_ctx = SDKHooks::HookContext.new(
|
7896
7896
|
base_url: base_url,
|
7897
7897
|
oauth2_scopes: [],
|
7898
|
-
operation_id: '
|
7898
|
+
operation_id: 'hris_get_position',
|
7899
7899
|
security_source: @sdk_configuration.security_source
|
7900
7900
|
)
|
7901
7901
|
|
@@ -7952,12 +7952,12 @@ module StackOne
|
|
7952
7952
|
),
|
7953
7953
|
response: http_response
|
7954
7954
|
)
|
7955
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
7956
|
-
response = Models::Operations::
|
7955
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::PositionResult)
|
7956
|
+
response = Models::Operations::HrisGetPositionResponse.new(
|
7957
7957
|
status_code: http_response.status,
|
7958
7958
|
content_type: content_type,
|
7959
7959
|
raw_response: http_response,
|
7960
|
-
|
7960
|
+
position_result: obj
|
7961
7961
|
)
|
7962
7962
|
|
7963
7963
|
return response
|
@@ -8131,19 +8131,19 @@ module StackOne
|
|
8131
8131
|
end
|
8132
8132
|
|
8133
8133
|
|
8134
|
-
sig { params(request: T.nilable(Models::Operations::
|
8135
|
-
def
|
8136
|
-
#
|
8134
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetTaskRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTaskResponse) }
|
8135
|
+
def get_task(request, retries = nil, timeout_ms = nil)
|
8136
|
+
# get_task - Get Task
|
8137
8137
|
url, params = @sdk_configuration.get_server_details
|
8138
8138
|
base_url = Utils.template_url(url, params)
|
8139
8139
|
url = Utils.generate_url(
|
8140
|
-
Models::Operations::
|
8140
|
+
Models::Operations::HrisGetTaskRequest,
|
8141
8141
|
base_url,
|
8142
|
-
'/unified/hris/
|
8142
|
+
'/unified/hris/tasks/{id}',
|
8143
8143
|
request
|
8144
8144
|
)
|
8145
8145
|
headers = Utils.get_headers(request)
|
8146
|
-
query_params = Utils.get_query_params(Models::Operations::
|
8146
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetTaskRequest, request)
|
8147
8147
|
headers['Accept'] = 'application/json'
|
8148
8148
|
headers['user-agent'] = @sdk_configuration.user_agent
|
8149
8149
|
retries ||= @sdk_configuration.retry_config
|
@@ -8171,7 +8171,7 @@ module StackOne
|
|
8171
8171
|
hook_ctx = SDKHooks::HookContext.new(
|
8172
8172
|
base_url: base_url,
|
8173
8173
|
oauth2_scopes: [],
|
8174
|
-
operation_id: '
|
8174
|
+
operation_id: 'hris_get_task',
|
8175
8175
|
security_source: @sdk_configuration.security_source
|
8176
8176
|
)
|
8177
8177
|
|
@@ -8228,12 +8228,12 @@ module StackOne
|
|
8228
8228
|
),
|
8229
8229
|
response: http_response
|
8230
8230
|
)
|
8231
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
8232
|
-
response = Models::Operations::
|
8231
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TaskResult)
|
8232
|
+
response = Models::Operations::HrisGetTaskResponse.new(
|
8233
8233
|
status_code: http_response.status,
|
8234
8234
|
content_type: content_type,
|
8235
8235
|
raw_response: http_response,
|
8236
|
-
|
8236
|
+
task_result: obj
|
8237
8237
|
)
|
8238
8238
|
|
8239
8239
|
return response
|
@@ -8407,21 +8407,19 @@ module StackOne
|
|
8407
8407
|
end
|
8408
8408
|
|
8409
8409
|
|
8410
|
-
sig { params(request: T.nilable(Models::Operations::
|
8411
|
-
def
|
8412
|
-
#
|
8413
|
-
#
|
8414
|
-
# @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
8410
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetTeamGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTeamGroupResponse) }
|
8411
|
+
def get_team_group(request, retries = nil, timeout_ms = nil)
|
8412
|
+
# get_team_group - Get Team Group
|
8415
8413
|
url, params = @sdk_configuration.get_server_details
|
8416
8414
|
base_url = Utils.template_url(url, params)
|
8417
8415
|
url = Utils.generate_url(
|
8418
|
-
Models::Operations::
|
8416
|
+
Models::Operations::HrisGetTeamGroupRequest,
|
8419
8417
|
base_url,
|
8420
|
-
'/unified/hris/
|
8418
|
+
'/unified/hris/groups/teams/{id}',
|
8421
8419
|
request
|
8422
8420
|
)
|
8423
8421
|
headers = Utils.get_headers(request)
|
8424
|
-
query_params = Utils.get_query_params(Models::Operations::
|
8422
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetTeamGroupRequest, request)
|
8425
8423
|
headers['Accept'] = 'application/json'
|
8426
8424
|
headers['user-agent'] = @sdk_configuration.user_agent
|
8427
8425
|
retries ||= @sdk_configuration.retry_config
|
@@ -8449,7 +8447,7 @@ module StackOne
|
|
8449
8447
|
hook_ctx = SDKHooks::HookContext.new(
|
8450
8448
|
base_url: base_url,
|
8451
8449
|
oauth2_scopes: [],
|
8452
|
-
operation_id: '
|
8450
|
+
operation_id: 'hris_get_team_group',
|
8453
8451
|
security_source: @sdk_configuration.security_source
|
8454
8452
|
)
|
8455
8453
|
|
@@ -8506,12 +8504,12 @@ module StackOne
|
|
8506
8504
|
),
|
8507
8505
|
response: http_response
|
8508
8506
|
)
|
8509
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
8510
|
-
response = Models::Operations::
|
8507
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISTeamsResult)
|
8508
|
+
response = Models::Operations::HrisGetTeamGroupResponse.new(
|
8511
8509
|
status_code: http_response.status,
|
8512
8510
|
content_type: content_type,
|
8513
8511
|
raw_response: http_response,
|
8514
|
-
|
8512
|
+
hris_teams_result: obj
|
8515
8513
|
)
|
8516
8514
|
|
8517
8515
|
return response
|
@@ -8685,35 +8683,19 @@ module StackOne
|
|
8685
8683
|
end
|
8686
8684
|
|
8687
8685
|
|
8688
|
-
sig { params(
|
8689
|
-
def
|
8690
|
-
#
|
8691
|
-
request = Models::Operations::HrisInviteEmployeeRequest.new(
|
8692
|
-
|
8693
|
-
hris_invite_employee_request_dto: hris_invite_employee_request_dto,
|
8694
|
-
id: id,
|
8695
|
-
x_account_id: x_account_id
|
8696
|
-
)
|
8686
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetTimeEntriesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTimeEntriesResponse) }
|
8687
|
+
def get_time_entries(request, retries = nil, timeout_ms = nil)
|
8688
|
+
# get_time_entries - Get Time Entry
|
8697
8689
|
url, params = @sdk_configuration.get_server_details
|
8698
8690
|
base_url = Utils.template_url(url, params)
|
8699
8691
|
url = Utils.generate_url(
|
8700
|
-
Models::Operations::
|
8692
|
+
Models::Operations::HrisGetTimeEntriesRequest,
|
8701
8693
|
base_url,
|
8702
|
-
'/unified/hris/
|
8694
|
+
'/unified/hris/time_entries/{id}',
|
8703
8695
|
request
|
8704
8696
|
)
|
8705
8697
|
headers = Utils.get_headers(request)
|
8706
|
-
|
8707
|
-
headers['content-type'] = req_content_type
|
8708
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
8709
|
-
|
8710
|
-
if form
|
8711
|
-
body = Utils.encode_form(form)
|
8712
|
-
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
8713
|
-
body = URI.encode_www_form(data)
|
8714
|
-
else
|
8715
|
-
body = data
|
8716
|
-
end
|
8698
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetTimeEntriesRequest, request)
|
8717
8699
|
headers['Accept'] = 'application/json'
|
8718
8700
|
headers['user-agent'] = @sdk_configuration.user_agent
|
8719
8701
|
retries ||= @sdk_configuration.retry_config
|
@@ -8741,7 +8723,7 @@ module StackOne
|
|
8741
8723
|
hook_ctx = SDKHooks::HookContext.new(
|
8742
8724
|
base_url: base_url,
|
8743
8725
|
oauth2_scopes: [],
|
8744
|
-
operation_id: '
|
8726
|
+
operation_id: 'hris_get_time_entries',
|
8745
8727
|
security_source: @sdk_configuration.security_source
|
8746
8728
|
)
|
8747
8729
|
|
@@ -8750,10 +8732,10 @@ module StackOne
|
|
8750
8732
|
|
8751
8733
|
|
8752
8734
|
begin
|
8753
|
-
http_response = connection.
|
8754
|
-
req.body = body
|
8735
|
+
http_response = connection.get(url) do |req|
|
8755
8736
|
req.headers.merge!(headers)
|
8756
8737
|
req.options.timeout = timeout unless timeout.nil?
|
8738
|
+
req.params = query_params
|
8757
8739
|
Utils.configure_request_security(req, security)
|
8758
8740
|
|
8759
8741
|
@sdk_configuration.hooks.before_request(
|
@@ -8798,12 +8780,12 @@ module StackOne
|
|
8798
8780
|
),
|
8799
8781
|
response: http_response
|
8800
8782
|
)
|
8801
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
8802
|
-
response = Models::Operations::
|
8783
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeEntriesResult)
|
8784
|
+
response = Models::Operations::HrisGetTimeEntriesResponse.new(
|
8803
8785
|
status_code: http_response.status,
|
8804
8786
|
content_type: content_type,
|
8805
8787
|
raw_response: http_response,
|
8806
|
-
|
8788
|
+
time_entries_result: obj
|
8807
8789
|
)
|
8808
8790
|
|
8809
8791
|
return response
|
@@ -8977,14 +8959,19 @@ module StackOne
|
|
8977
8959
|
end
|
8978
8960
|
|
8979
8961
|
|
8980
|
-
sig { params(request: T.nilable(Models::Operations::
|
8981
|
-
def
|
8982
|
-
#
|
8962
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetTimeOffPolicyRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTimeOffPolicyResponse) }
|
8963
|
+
def get_time_off_policy(request, retries = nil, timeout_ms = nil)
|
8964
|
+
# get_time_off_policy - Get Time Off Policy
|
8983
8965
|
url, params = @sdk_configuration.get_server_details
|
8984
8966
|
base_url = Utils.template_url(url, params)
|
8985
|
-
url =
|
8967
|
+
url = Utils.generate_url(
|
8968
|
+
Models::Operations::HrisGetTimeOffPolicyRequest,
|
8969
|
+
base_url,
|
8970
|
+
'/unified/hris/time_off_policies/{id}',
|
8971
|
+
request
|
8972
|
+
)
|
8986
8973
|
headers = Utils.get_headers(request)
|
8987
|
-
query_params = Utils.get_query_params(Models::Operations::
|
8974
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetTimeOffPolicyRequest, request)
|
8988
8975
|
headers['Accept'] = 'application/json'
|
8989
8976
|
headers['user-agent'] = @sdk_configuration.user_agent
|
8990
8977
|
retries ||= @sdk_configuration.retry_config
|
@@ -9012,7 +8999,7 @@ module StackOne
|
|
9012
8999
|
hook_ctx = SDKHooks::HookContext.new(
|
9013
9000
|
base_url: base_url,
|
9014
9001
|
oauth2_scopes: [],
|
9015
|
-
operation_id: '
|
9002
|
+
operation_id: 'hris_get_time_off_policy',
|
9016
9003
|
security_source: @sdk_configuration.security_source
|
9017
9004
|
)
|
9018
9005
|
|
@@ -9069,12 +9056,12 @@ module StackOne
|
|
9069
9056
|
),
|
9070
9057
|
response: http_response
|
9071
9058
|
)
|
9072
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
9073
|
-
response = Models::Operations::
|
9059
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffPolicyResult)
|
9060
|
+
response = Models::Operations::HrisGetTimeOffPolicyResponse.new(
|
9074
9061
|
status_code: http_response.status,
|
9075
9062
|
content_type: content_type,
|
9076
9063
|
raw_response: http_response,
|
9077
|
-
|
9064
|
+
time_off_policy_result: obj
|
9078
9065
|
)
|
9079
9066
|
|
9080
9067
|
return response
|
@@ -9248,14 +9235,19 @@ module StackOne
|
|
9248
9235
|
end
|
9249
9236
|
|
9250
9237
|
|
9251
|
-
sig { params(request: T.nilable(Models::Operations::
|
9252
|
-
def
|
9253
|
-
#
|
9238
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetTimeOffRequestRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTimeOffRequestResponse) }
|
9239
|
+
def get_time_off_request(request, retries = nil, timeout_ms = nil)
|
9240
|
+
# get_time_off_request - Get time off request
|
9254
9241
|
url, params = @sdk_configuration.get_server_details
|
9255
9242
|
base_url = Utils.template_url(url, params)
|
9256
|
-
url =
|
9243
|
+
url = Utils.generate_url(
|
9244
|
+
Models::Operations::HrisGetTimeOffRequestRequest,
|
9245
|
+
base_url,
|
9246
|
+
'/unified/hris/time_off/{id}',
|
9247
|
+
request
|
9248
|
+
)
|
9257
9249
|
headers = Utils.get_headers(request)
|
9258
|
-
query_params = Utils.get_query_params(Models::Operations::
|
9250
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetTimeOffRequestRequest, request)
|
9259
9251
|
headers['Accept'] = 'application/json'
|
9260
9252
|
headers['user-agent'] = @sdk_configuration.user_agent
|
9261
9253
|
retries ||= @sdk_configuration.retry_config
|
@@ -9283,7 +9275,7 @@ module StackOne
|
|
9283
9275
|
hook_ctx = SDKHooks::HookContext.new(
|
9284
9276
|
base_url: base_url,
|
9285
9277
|
oauth2_scopes: [],
|
9286
|
-
operation_id: '
|
9278
|
+
operation_id: 'hris_get_time_off_request',
|
9287
9279
|
security_source: @sdk_configuration.security_source
|
9288
9280
|
)
|
9289
9281
|
|
@@ -9340,12 +9332,12 @@ module StackOne
|
|
9340
9332
|
),
|
9341
9333
|
response: http_response
|
9342
9334
|
)
|
9343
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
9344
|
-
response = Models::Operations::
|
9335
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffResult)
|
9336
|
+
response = Models::Operations::HrisGetTimeOffRequestResponse.new(
|
9345
9337
|
status_code: http_response.status,
|
9346
9338
|
content_type: content_type,
|
9347
9339
|
raw_response: http_response,
|
9348
|
-
|
9340
|
+
time_off_result: obj
|
9349
9341
|
)
|
9350
9342
|
|
9351
9343
|
return response
|
@@ -9519,14 +9511,21 @@ module StackOne
|
|
9519
9511
|
end
|
9520
9512
|
|
9521
9513
|
|
9522
|
-
sig { params(request: T.nilable(Models::Operations::
|
9523
|
-
def
|
9524
|
-
#
|
9514
|
+
sig { params(request: T.nilable(Models::Operations::HrisGetTimeOffTypeRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTimeOffTypeResponse) }
|
9515
|
+
def get_time_off_type(request, retries = nil, timeout_ms = nil)
|
9516
|
+
# get_time_off_type - Get time off type
|
9517
|
+
#
|
9518
|
+
# @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
9525
9519
|
url, params = @sdk_configuration.get_server_details
|
9526
9520
|
base_url = Utils.template_url(url, params)
|
9527
|
-
url =
|
9521
|
+
url = Utils.generate_url(
|
9522
|
+
Models::Operations::HrisGetTimeOffTypeRequest,
|
9523
|
+
base_url,
|
9524
|
+
'/unified/hris/time_off_types/{id}',
|
9525
|
+
request
|
9526
|
+
)
|
9528
9527
|
headers = Utils.get_headers(request)
|
9529
|
-
query_params = Utils.get_query_params(Models::Operations::
|
9528
|
+
query_params = Utils.get_query_params(Models::Operations::HrisGetTimeOffTypeRequest, request)
|
9530
9529
|
headers['Accept'] = 'application/json'
|
9531
9530
|
headers['user-agent'] = @sdk_configuration.user_agent
|
9532
9531
|
retries ||= @sdk_configuration.retry_config
|
@@ -9554,7 +9553,7 @@ module StackOne
|
|
9554
9553
|
hook_ctx = SDKHooks::HookContext.new(
|
9555
9554
|
base_url: base_url,
|
9556
9555
|
oauth2_scopes: [],
|
9557
|
-
operation_id: '
|
9556
|
+
operation_id: 'hris_get_time_off_type',
|
9558
9557
|
security_source: @sdk_configuration.security_source
|
9559
9558
|
)
|
9560
9559
|
|
@@ -9611,12 +9610,12 @@ module StackOne
|
|
9611
9610
|
),
|
9612
9611
|
response: http_response
|
9613
9612
|
)
|
9614
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
9615
|
-
response = Models::Operations::
|
9613
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ReferenceResult)
|
9614
|
+
response = Models::Operations::HrisGetTimeOffTypeResponse.new(
|
9616
9615
|
status_code: http_response.status,
|
9617
9616
|
content_type: content_type,
|
9618
9617
|
raw_response: http_response,
|
9619
|
-
|
9618
|
+
reference_result: obj
|
9620
9619
|
)
|
9621
9620
|
|
9622
9621
|
return response
|
@@ -9790,14 +9789,2203 @@ module StackOne
|
|
9790
9789
|
end
|
9791
9790
|
|
9792
9791
|
|
9793
|
-
sig { params(
|
9794
|
-
def
|
9795
|
-
#
|
9792
|
+
sig { params(hris_invite_employee_request_dto: Models::Shared::HrisInviteEmployeeRequestDto, id: ::String, x_account_id: ::String, retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisInviteEmployeeResponse) }
|
9793
|
+
def invite_employee(hris_invite_employee_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
|
9794
|
+
# invite_employee - Invite Employee
|
9795
|
+
request = Models::Operations::HrisInviteEmployeeRequest.new(
|
9796
|
+
|
9797
|
+
hris_invite_employee_request_dto: hris_invite_employee_request_dto,
|
9798
|
+
id: id,
|
9799
|
+
x_account_id: x_account_id
|
9800
|
+
)
|
9796
9801
|
url, params = @sdk_configuration.get_server_details
|
9797
9802
|
base_url = Utils.template_url(url, params)
|
9798
|
-
url =
|
9799
|
-
|
9800
|
-
|
9803
|
+
url = Utils.generate_url(
|
9804
|
+
Models::Operations::HrisInviteEmployeeRequest,
|
9805
|
+
base_url,
|
9806
|
+
'/unified/hris/employees/{id}/invite',
|
9807
|
+
request
|
9808
|
+
)
|
9809
|
+
headers = Utils.get_headers(request)
|
9810
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :hris_invite_employee_request_dto, :json)
|
9811
|
+
headers['content-type'] = req_content_type
|
9812
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
9813
|
+
|
9814
|
+
if form
|
9815
|
+
body = Utils.encode_form(form)
|
9816
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
9817
|
+
body = URI.encode_www_form(data)
|
9818
|
+
else
|
9819
|
+
body = data
|
9820
|
+
end
|
9821
|
+
headers['Accept'] = 'application/json'
|
9822
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
9823
|
+
retries ||= @sdk_configuration.retry_config
|
9824
|
+
retries ||= Utils::RetryConfig.new(
|
9825
|
+
backoff: Utils::BackoffStrategy.new(
|
9826
|
+
exponent: 1.5,
|
9827
|
+
initial_interval: 500,
|
9828
|
+
max_elapsed_time: 3_600_000,
|
9829
|
+
max_interval: 60_000
|
9830
|
+
),
|
9831
|
+
retry_connection_errors: true,
|
9832
|
+
strategy: 'backoff'
|
9833
|
+
)
|
9834
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
9835
|
+
retry_options[:retry_statuses] = [429, 408]
|
9836
|
+
|
9837
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
9838
|
+
|
9839
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
9840
|
+
timeout ||= @sdk_configuration.timeout
|
9841
|
+
|
9842
|
+
connection = @sdk_configuration.client.dup
|
9843
|
+
connection.request :retry, retry_options
|
9844
|
+
|
9845
|
+
hook_ctx = SDKHooks::HookContext.new(
|
9846
|
+
base_url: base_url,
|
9847
|
+
oauth2_scopes: [],
|
9848
|
+
operation_id: 'hris_invite_employee',
|
9849
|
+
security_source: @sdk_configuration.security_source
|
9850
|
+
)
|
9851
|
+
|
9852
|
+
error = T.let(nil, T.nilable(StandardError))
|
9853
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
9854
|
+
|
9855
|
+
|
9856
|
+
begin
|
9857
|
+
http_response = connection.post(url) do |req|
|
9858
|
+
req.body = body
|
9859
|
+
req.headers.merge!(headers)
|
9860
|
+
req.options.timeout = timeout unless timeout.nil?
|
9861
|
+
Utils.configure_request_security(req, security)
|
9862
|
+
|
9863
|
+
@sdk_configuration.hooks.before_request(
|
9864
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
9865
|
+
hook_ctx: hook_ctx
|
9866
|
+
),
|
9867
|
+
request: req
|
9868
|
+
)
|
9869
|
+
end
|
9870
|
+
rescue StandardError => e
|
9871
|
+
error = e
|
9872
|
+
ensure
|
9873
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
9874
|
+
http_response = @sdk_configuration.hooks.after_error(
|
9875
|
+
error: error,
|
9876
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
9877
|
+
hook_ctx: hook_ctx
|
9878
|
+
),
|
9879
|
+
response: http_response
|
9880
|
+
)
|
9881
|
+
else
|
9882
|
+
http_response = @sdk_configuration.hooks.after_success(
|
9883
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
9884
|
+
hook_ctx: hook_ctx
|
9885
|
+
),
|
9886
|
+
response: http_response
|
9887
|
+
)
|
9888
|
+
end
|
9889
|
+
|
9890
|
+
if http_response.nil?
|
9891
|
+
raise error if !error.nil?
|
9892
|
+
raise 'no response'
|
9893
|
+
end
|
9894
|
+
end
|
9895
|
+
|
9896
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
9897
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
9898
|
+
if Utils.match_content_type(content_type, 'application/json')
|
9899
|
+
http_response = @sdk_configuration.hooks.after_success(
|
9900
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
9901
|
+
hook_ctx: hook_ctx
|
9902
|
+
),
|
9903
|
+
response: http_response
|
9904
|
+
)
|
9905
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::InviteEmployeeResult)
|
9906
|
+
response = Models::Operations::HrisInviteEmployeeResponse.new(
|
9907
|
+
status_code: http_response.status,
|
9908
|
+
content_type: content_type,
|
9909
|
+
raw_response: http_response,
|
9910
|
+
invite_employee_result: obj
|
9911
|
+
)
|
9912
|
+
|
9913
|
+
return response
|
9914
|
+
else
|
9915
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
9916
|
+
end
|
9917
|
+
elsif Utils.match_status_code(http_response.status, ['400'])
|
9918
|
+
if Utils.match_content_type(content_type, 'application/json')
|
9919
|
+
http_response = @sdk_configuration.hooks.after_success(
|
9920
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
9921
|
+
hook_ctx: hook_ctx
|
9922
|
+
),
|
9923
|
+
response: http_response
|
9924
|
+
)
|
9925
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
|
9926
|
+
throw obj
|
9927
|
+
else
|
9928
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
9929
|
+
end
|
9930
|
+
elsif Utils.match_status_code(http_response.status, ['401'])
|
9931
|
+
if Utils.match_content_type(content_type, 'application/json')
|
9932
|
+
http_response = @sdk_configuration.hooks.after_success(
|
9933
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
9934
|
+
hook_ctx: hook_ctx
|
9935
|
+
),
|
9936
|
+
response: http_response
|
9937
|
+
)
|
9938
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
|
9939
|
+
throw obj
|
9940
|
+
else
|
9941
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
9942
|
+
end
|
9943
|
+
elsif Utils.match_status_code(http_response.status, ['403'])
|
9944
|
+
if Utils.match_content_type(content_type, 'application/json')
|
9945
|
+
http_response = @sdk_configuration.hooks.after_success(
|
9946
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
9947
|
+
hook_ctx: hook_ctx
|
9948
|
+
),
|
9949
|
+
response: http_response
|
9950
|
+
)
|
9951
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
|
9952
|
+
throw obj
|
9953
|
+
else
|
9954
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
9955
|
+
end
|
9956
|
+
elsif Utils.match_status_code(http_response.status, ['404'])
|
9957
|
+
if Utils.match_content_type(content_type, 'application/json')
|
9958
|
+
http_response = @sdk_configuration.hooks.after_success(
|
9959
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
9960
|
+
hook_ctx: hook_ctx
|
9961
|
+
),
|
9962
|
+
response: http_response
|
9963
|
+
)
|
9964
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
|
9965
|
+
throw obj
|
9966
|
+
else
|
9967
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
9968
|
+
end
|
9969
|
+
elsif Utils.match_status_code(http_response.status, ['408'])
|
9970
|
+
if Utils.match_content_type(content_type, 'application/json')
|
9971
|
+
http_response = @sdk_configuration.hooks.after_success(
|
9972
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
9973
|
+
hook_ctx: hook_ctx
|
9974
|
+
),
|
9975
|
+
response: http_response
|
9976
|
+
)
|
9977
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
|
9978
|
+
throw obj
|
9979
|
+
else
|
9980
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
9981
|
+
end
|
9982
|
+
elsif Utils.match_status_code(http_response.status, ['409'])
|
9983
|
+
if Utils.match_content_type(content_type, 'application/json')
|
9984
|
+
http_response = @sdk_configuration.hooks.after_success(
|
9985
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
9986
|
+
hook_ctx: hook_ctx
|
9987
|
+
),
|
9988
|
+
response: http_response
|
9989
|
+
)
|
9990
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
|
9991
|
+
throw obj
|
9992
|
+
else
|
9993
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
9994
|
+
end
|
9995
|
+
elsif Utils.match_status_code(http_response.status, ['412'])
|
9996
|
+
if Utils.match_content_type(content_type, 'application/json')
|
9997
|
+
http_response = @sdk_configuration.hooks.after_success(
|
9998
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
9999
|
+
hook_ctx: hook_ctx
|
10000
|
+
),
|
10001
|
+
response: http_response
|
10002
|
+
)
|
10003
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
|
10004
|
+
throw obj
|
10005
|
+
else
|
10006
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10007
|
+
end
|
10008
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
10009
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10010
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10011
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10012
|
+
hook_ctx: hook_ctx
|
10013
|
+
),
|
10014
|
+
response: http_response
|
10015
|
+
)
|
10016
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
|
10017
|
+
throw obj
|
10018
|
+
else
|
10019
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10020
|
+
end
|
10021
|
+
elsif Utils.match_status_code(http_response.status, ['429'])
|
10022
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10023
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10024
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10025
|
+
hook_ctx: hook_ctx
|
10026
|
+
),
|
10027
|
+
response: http_response
|
10028
|
+
)
|
10029
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
|
10030
|
+
throw obj
|
10031
|
+
else
|
10032
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10033
|
+
end
|
10034
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
10035
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10036
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10037
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10038
|
+
hook_ctx: hook_ctx
|
10039
|
+
),
|
10040
|
+
response: http_response
|
10041
|
+
)
|
10042
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
|
10043
|
+
throw obj
|
10044
|
+
else
|
10045
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10046
|
+
end
|
10047
|
+
elsif Utils.match_status_code(http_response.status, ['501'])
|
10048
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10049
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10050
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10051
|
+
hook_ctx: hook_ctx
|
10052
|
+
),
|
10053
|
+
response: http_response
|
10054
|
+
)
|
10055
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
|
10056
|
+
throw obj
|
10057
|
+
else
|
10058
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10059
|
+
end
|
10060
|
+
elsif Utils.match_status_code(http_response.status, ['502'])
|
10061
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10062
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10063
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10064
|
+
hook_ctx: hook_ctx
|
10065
|
+
),
|
10066
|
+
response: http_response
|
10067
|
+
)
|
10068
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
|
10069
|
+
throw obj
|
10070
|
+
else
|
10071
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10072
|
+
end
|
10073
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
10074
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
10075
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
10076
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
10077
|
+
else
|
10078
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
10079
|
+
|
10080
|
+
end
|
10081
|
+
end
|
10082
|
+
|
10083
|
+
|
10084
|
+
sig { params(request: T.nilable(Models::Operations::HrisListBenefitsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListBenefitsResponse) }
|
10085
|
+
def list_benefits(request, retries = nil, timeout_ms = nil)
|
10086
|
+
# list_benefits - List benefits
|
10087
|
+
url, params = @sdk_configuration.get_server_details
|
10088
|
+
base_url = Utils.template_url(url, params)
|
10089
|
+
url = "#{base_url}/unified/hris/benefits"
|
10090
|
+
headers = Utils.get_headers(request)
|
10091
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListBenefitsRequest, request)
|
10092
|
+
headers['Accept'] = 'application/json'
|
10093
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
10094
|
+
retries ||= @sdk_configuration.retry_config
|
10095
|
+
retries ||= Utils::RetryConfig.new(
|
10096
|
+
backoff: Utils::BackoffStrategy.new(
|
10097
|
+
exponent: 1.5,
|
10098
|
+
initial_interval: 500,
|
10099
|
+
max_elapsed_time: 3_600_000,
|
10100
|
+
max_interval: 60_000
|
10101
|
+
),
|
10102
|
+
retry_connection_errors: true,
|
10103
|
+
strategy: 'backoff'
|
10104
|
+
)
|
10105
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
10106
|
+
retry_options[:retry_statuses] = [429, 408]
|
10107
|
+
|
10108
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
10109
|
+
|
10110
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
10111
|
+
timeout ||= @sdk_configuration.timeout
|
10112
|
+
|
10113
|
+
connection = @sdk_configuration.client.dup
|
10114
|
+
connection.request :retry, retry_options
|
10115
|
+
|
10116
|
+
hook_ctx = SDKHooks::HookContext.new(
|
10117
|
+
base_url: base_url,
|
10118
|
+
oauth2_scopes: [],
|
10119
|
+
operation_id: 'hris_list_benefits',
|
10120
|
+
security_source: @sdk_configuration.security_source
|
10121
|
+
)
|
10122
|
+
|
10123
|
+
error = T.let(nil, T.nilable(StandardError))
|
10124
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
10125
|
+
|
10126
|
+
|
10127
|
+
begin
|
10128
|
+
http_response = connection.get(url) do |req|
|
10129
|
+
req.headers.merge!(headers)
|
10130
|
+
req.options.timeout = timeout unless timeout.nil?
|
10131
|
+
req.params = query_params
|
10132
|
+
Utils.configure_request_security(req, security)
|
10133
|
+
|
10134
|
+
@sdk_configuration.hooks.before_request(
|
10135
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
10136
|
+
hook_ctx: hook_ctx
|
10137
|
+
),
|
10138
|
+
request: req
|
10139
|
+
)
|
10140
|
+
end
|
10141
|
+
rescue StandardError => e
|
10142
|
+
error = e
|
10143
|
+
ensure
|
10144
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
10145
|
+
http_response = @sdk_configuration.hooks.after_error(
|
10146
|
+
error: error,
|
10147
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
10148
|
+
hook_ctx: hook_ctx
|
10149
|
+
),
|
10150
|
+
response: http_response
|
10151
|
+
)
|
10152
|
+
else
|
10153
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10154
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10155
|
+
hook_ctx: hook_ctx
|
10156
|
+
),
|
10157
|
+
response: http_response
|
10158
|
+
)
|
10159
|
+
end
|
10160
|
+
|
10161
|
+
if http_response.nil?
|
10162
|
+
raise error if !error.nil?
|
10163
|
+
raise 'no response'
|
10164
|
+
end
|
10165
|
+
end
|
10166
|
+
|
10167
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
10168
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
10169
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10170
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10171
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10172
|
+
hook_ctx: hook_ctx
|
10173
|
+
),
|
10174
|
+
response: http_response
|
10175
|
+
)
|
10176
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISBenefitsPaginated)
|
10177
|
+
response = Models::Operations::HrisListBenefitsResponse.new(
|
10178
|
+
status_code: http_response.status,
|
10179
|
+
content_type: content_type,
|
10180
|
+
raw_response: http_response,
|
10181
|
+
hris_benefits_paginated: obj
|
10182
|
+
)
|
10183
|
+
|
10184
|
+
return response
|
10185
|
+
else
|
10186
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10187
|
+
end
|
10188
|
+
elsif Utils.match_status_code(http_response.status, ['400'])
|
10189
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10190
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10191
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10192
|
+
hook_ctx: hook_ctx
|
10193
|
+
),
|
10194
|
+
response: http_response
|
10195
|
+
)
|
10196
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
|
10197
|
+
throw obj
|
10198
|
+
else
|
10199
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10200
|
+
end
|
10201
|
+
elsif Utils.match_status_code(http_response.status, ['401'])
|
10202
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10203
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10204
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10205
|
+
hook_ctx: hook_ctx
|
10206
|
+
),
|
10207
|
+
response: http_response
|
10208
|
+
)
|
10209
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
|
10210
|
+
throw obj
|
10211
|
+
else
|
10212
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10213
|
+
end
|
10214
|
+
elsif Utils.match_status_code(http_response.status, ['403'])
|
10215
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10216
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10217
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10218
|
+
hook_ctx: hook_ctx
|
10219
|
+
),
|
10220
|
+
response: http_response
|
10221
|
+
)
|
10222
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
|
10223
|
+
throw obj
|
10224
|
+
else
|
10225
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10226
|
+
end
|
10227
|
+
elsif Utils.match_status_code(http_response.status, ['404'])
|
10228
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10229
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10230
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10231
|
+
hook_ctx: hook_ctx
|
10232
|
+
),
|
10233
|
+
response: http_response
|
10234
|
+
)
|
10235
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
|
10236
|
+
throw obj
|
10237
|
+
else
|
10238
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10239
|
+
end
|
10240
|
+
elsif Utils.match_status_code(http_response.status, ['408'])
|
10241
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10242
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10243
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10244
|
+
hook_ctx: hook_ctx
|
10245
|
+
),
|
10246
|
+
response: http_response
|
10247
|
+
)
|
10248
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
|
10249
|
+
throw obj
|
10250
|
+
else
|
10251
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10252
|
+
end
|
10253
|
+
elsif Utils.match_status_code(http_response.status, ['409'])
|
10254
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10255
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10256
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10257
|
+
hook_ctx: hook_ctx
|
10258
|
+
),
|
10259
|
+
response: http_response
|
10260
|
+
)
|
10261
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
|
10262
|
+
throw obj
|
10263
|
+
else
|
10264
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10265
|
+
end
|
10266
|
+
elsif Utils.match_status_code(http_response.status, ['412'])
|
10267
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10268
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10269
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10270
|
+
hook_ctx: hook_ctx
|
10271
|
+
),
|
10272
|
+
response: http_response
|
10273
|
+
)
|
10274
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
|
10275
|
+
throw obj
|
10276
|
+
else
|
10277
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10278
|
+
end
|
10279
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
10280
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10281
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10282
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10283
|
+
hook_ctx: hook_ctx
|
10284
|
+
),
|
10285
|
+
response: http_response
|
10286
|
+
)
|
10287
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
|
10288
|
+
throw obj
|
10289
|
+
else
|
10290
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10291
|
+
end
|
10292
|
+
elsif Utils.match_status_code(http_response.status, ['429'])
|
10293
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10294
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10295
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10296
|
+
hook_ctx: hook_ctx
|
10297
|
+
),
|
10298
|
+
response: http_response
|
10299
|
+
)
|
10300
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
|
10301
|
+
throw obj
|
10302
|
+
else
|
10303
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10304
|
+
end
|
10305
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
10306
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10307
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10308
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10309
|
+
hook_ctx: hook_ctx
|
10310
|
+
),
|
10311
|
+
response: http_response
|
10312
|
+
)
|
10313
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
|
10314
|
+
throw obj
|
10315
|
+
else
|
10316
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10317
|
+
end
|
10318
|
+
elsif Utils.match_status_code(http_response.status, ['501'])
|
10319
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10320
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10321
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10322
|
+
hook_ctx: hook_ctx
|
10323
|
+
),
|
10324
|
+
response: http_response
|
10325
|
+
)
|
10326
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
|
10327
|
+
throw obj
|
10328
|
+
else
|
10329
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10330
|
+
end
|
10331
|
+
elsif Utils.match_status_code(http_response.status, ['502'])
|
10332
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10333
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10334
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10335
|
+
hook_ctx: hook_ctx
|
10336
|
+
),
|
10337
|
+
response: http_response
|
10338
|
+
)
|
10339
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
|
10340
|
+
throw obj
|
10341
|
+
else
|
10342
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10343
|
+
end
|
10344
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
10345
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
10346
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
10347
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
10348
|
+
else
|
10349
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
10350
|
+
|
10351
|
+
end
|
10352
|
+
end
|
10353
|
+
|
10354
|
+
|
10355
|
+
sig { params(request: T.nilable(Models::Operations::HrisListCompaniesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListCompaniesResponse) }
|
10356
|
+
def list_companies(request, retries = nil, timeout_ms = nil)
|
10357
|
+
# list_companies - List Companies
|
10358
|
+
url, params = @sdk_configuration.get_server_details
|
10359
|
+
base_url = Utils.template_url(url, params)
|
10360
|
+
url = "#{base_url}/unified/hris/companies"
|
10361
|
+
headers = Utils.get_headers(request)
|
10362
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListCompaniesRequest, request)
|
10363
|
+
headers['Accept'] = 'application/json'
|
10364
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
10365
|
+
retries ||= @sdk_configuration.retry_config
|
10366
|
+
retries ||= Utils::RetryConfig.new(
|
10367
|
+
backoff: Utils::BackoffStrategy.new(
|
10368
|
+
exponent: 1.5,
|
10369
|
+
initial_interval: 500,
|
10370
|
+
max_elapsed_time: 3_600_000,
|
10371
|
+
max_interval: 60_000
|
10372
|
+
),
|
10373
|
+
retry_connection_errors: true,
|
10374
|
+
strategy: 'backoff'
|
10375
|
+
)
|
10376
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
10377
|
+
retry_options[:retry_statuses] = [429, 408]
|
10378
|
+
|
10379
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
10380
|
+
|
10381
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
10382
|
+
timeout ||= @sdk_configuration.timeout
|
10383
|
+
|
10384
|
+
connection = @sdk_configuration.client.dup
|
10385
|
+
connection.request :retry, retry_options
|
10386
|
+
|
10387
|
+
hook_ctx = SDKHooks::HookContext.new(
|
10388
|
+
base_url: base_url,
|
10389
|
+
oauth2_scopes: [],
|
10390
|
+
operation_id: 'hris_list_companies',
|
10391
|
+
security_source: @sdk_configuration.security_source
|
10392
|
+
)
|
10393
|
+
|
10394
|
+
error = T.let(nil, T.nilable(StandardError))
|
10395
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
10396
|
+
|
10397
|
+
|
10398
|
+
begin
|
10399
|
+
http_response = connection.get(url) do |req|
|
10400
|
+
req.headers.merge!(headers)
|
10401
|
+
req.options.timeout = timeout unless timeout.nil?
|
10402
|
+
req.params = query_params
|
10403
|
+
Utils.configure_request_security(req, security)
|
10404
|
+
|
10405
|
+
@sdk_configuration.hooks.before_request(
|
10406
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
10407
|
+
hook_ctx: hook_ctx
|
10408
|
+
),
|
10409
|
+
request: req
|
10410
|
+
)
|
10411
|
+
end
|
10412
|
+
rescue StandardError => e
|
10413
|
+
error = e
|
10414
|
+
ensure
|
10415
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
10416
|
+
http_response = @sdk_configuration.hooks.after_error(
|
10417
|
+
error: error,
|
10418
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
10419
|
+
hook_ctx: hook_ctx
|
10420
|
+
),
|
10421
|
+
response: http_response
|
10422
|
+
)
|
10423
|
+
else
|
10424
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10425
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10426
|
+
hook_ctx: hook_ctx
|
10427
|
+
),
|
10428
|
+
response: http_response
|
10429
|
+
)
|
10430
|
+
end
|
10431
|
+
|
10432
|
+
if http_response.nil?
|
10433
|
+
raise error if !error.nil?
|
10434
|
+
raise 'no response'
|
10435
|
+
end
|
10436
|
+
end
|
10437
|
+
|
10438
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
10439
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
10440
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10441
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10442
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10443
|
+
hook_ctx: hook_ctx
|
10444
|
+
),
|
10445
|
+
response: http_response
|
10446
|
+
)
|
10447
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CompaniesPaginated)
|
10448
|
+
response = Models::Operations::HrisListCompaniesResponse.new(
|
10449
|
+
status_code: http_response.status,
|
10450
|
+
content_type: content_type,
|
10451
|
+
raw_response: http_response,
|
10452
|
+
companies_paginated: obj
|
10453
|
+
)
|
10454
|
+
|
10455
|
+
return response
|
10456
|
+
else
|
10457
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10458
|
+
end
|
10459
|
+
elsif Utils.match_status_code(http_response.status, ['400'])
|
10460
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10461
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10462
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10463
|
+
hook_ctx: hook_ctx
|
10464
|
+
),
|
10465
|
+
response: http_response
|
10466
|
+
)
|
10467
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
|
10468
|
+
throw obj
|
10469
|
+
else
|
10470
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10471
|
+
end
|
10472
|
+
elsif Utils.match_status_code(http_response.status, ['401'])
|
10473
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10474
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10475
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10476
|
+
hook_ctx: hook_ctx
|
10477
|
+
),
|
10478
|
+
response: http_response
|
10479
|
+
)
|
10480
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
|
10481
|
+
throw obj
|
10482
|
+
else
|
10483
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10484
|
+
end
|
10485
|
+
elsif Utils.match_status_code(http_response.status, ['403'])
|
10486
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10487
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10488
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10489
|
+
hook_ctx: hook_ctx
|
10490
|
+
),
|
10491
|
+
response: http_response
|
10492
|
+
)
|
10493
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
|
10494
|
+
throw obj
|
10495
|
+
else
|
10496
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10497
|
+
end
|
10498
|
+
elsif Utils.match_status_code(http_response.status, ['404'])
|
10499
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10500
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10501
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10502
|
+
hook_ctx: hook_ctx
|
10503
|
+
),
|
10504
|
+
response: http_response
|
10505
|
+
)
|
10506
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
|
10507
|
+
throw obj
|
10508
|
+
else
|
10509
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10510
|
+
end
|
10511
|
+
elsif Utils.match_status_code(http_response.status, ['408'])
|
10512
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10513
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10514
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10515
|
+
hook_ctx: hook_ctx
|
10516
|
+
),
|
10517
|
+
response: http_response
|
10518
|
+
)
|
10519
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
|
10520
|
+
throw obj
|
10521
|
+
else
|
10522
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10523
|
+
end
|
10524
|
+
elsif Utils.match_status_code(http_response.status, ['409'])
|
10525
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10526
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10527
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10528
|
+
hook_ctx: hook_ctx
|
10529
|
+
),
|
10530
|
+
response: http_response
|
10531
|
+
)
|
10532
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
|
10533
|
+
throw obj
|
10534
|
+
else
|
10535
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10536
|
+
end
|
10537
|
+
elsif Utils.match_status_code(http_response.status, ['412'])
|
10538
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10539
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10540
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10541
|
+
hook_ctx: hook_ctx
|
10542
|
+
),
|
10543
|
+
response: http_response
|
10544
|
+
)
|
10545
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
|
10546
|
+
throw obj
|
10547
|
+
else
|
10548
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10549
|
+
end
|
10550
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
10551
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10552
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10553
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10554
|
+
hook_ctx: hook_ctx
|
10555
|
+
),
|
10556
|
+
response: http_response
|
10557
|
+
)
|
10558
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
|
10559
|
+
throw obj
|
10560
|
+
else
|
10561
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10562
|
+
end
|
10563
|
+
elsif Utils.match_status_code(http_response.status, ['429'])
|
10564
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10565
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10566
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10567
|
+
hook_ctx: hook_ctx
|
10568
|
+
),
|
10569
|
+
response: http_response
|
10570
|
+
)
|
10571
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
|
10572
|
+
throw obj
|
10573
|
+
else
|
10574
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10575
|
+
end
|
10576
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
10577
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10578
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10579
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10580
|
+
hook_ctx: hook_ctx
|
10581
|
+
),
|
10582
|
+
response: http_response
|
10583
|
+
)
|
10584
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
|
10585
|
+
throw obj
|
10586
|
+
else
|
10587
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10588
|
+
end
|
10589
|
+
elsif Utils.match_status_code(http_response.status, ['501'])
|
10590
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10591
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10592
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10593
|
+
hook_ctx: hook_ctx
|
10594
|
+
),
|
10595
|
+
response: http_response
|
10596
|
+
)
|
10597
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
|
10598
|
+
throw obj
|
10599
|
+
else
|
10600
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10601
|
+
end
|
10602
|
+
elsif Utils.match_status_code(http_response.status, ['502'])
|
10603
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10604
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10605
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10606
|
+
hook_ctx: hook_ctx
|
10607
|
+
),
|
10608
|
+
response: http_response
|
10609
|
+
)
|
10610
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
|
10611
|
+
throw obj
|
10612
|
+
else
|
10613
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10614
|
+
end
|
10615
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
10616
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
10617
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
10618
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
10619
|
+
else
|
10620
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
10621
|
+
|
10622
|
+
end
|
10623
|
+
end
|
10624
|
+
|
10625
|
+
|
10626
|
+
sig { params(request: T.nilable(Models::Operations::HrisListCompaniesGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListCompaniesGroupsResponse) }
|
10627
|
+
def list_companies_groups(request, retries = nil, timeout_ms = nil)
|
10628
|
+
# list_companies_groups - List Companies Groups
|
10629
|
+
url, params = @sdk_configuration.get_server_details
|
10630
|
+
base_url = Utils.template_url(url, params)
|
10631
|
+
url = "#{base_url}/unified/hris/groups/companies"
|
10632
|
+
headers = Utils.get_headers(request)
|
10633
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListCompaniesGroupsRequest, request)
|
10634
|
+
headers['Accept'] = 'application/json'
|
10635
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
10636
|
+
retries ||= @sdk_configuration.retry_config
|
10637
|
+
retries ||= Utils::RetryConfig.new(
|
10638
|
+
backoff: Utils::BackoffStrategy.new(
|
10639
|
+
exponent: 1.5,
|
10640
|
+
initial_interval: 500,
|
10641
|
+
max_elapsed_time: 3_600_000,
|
10642
|
+
max_interval: 60_000
|
10643
|
+
),
|
10644
|
+
retry_connection_errors: true,
|
10645
|
+
strategy: 'backoff'
|
10646
|
+
)
|
10647
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
10648
|
+
retry_options[:retry_statuses] = [429, 408]
|
10649
|
+
|
10650
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
10651
|
+
|
10652
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
10653
|
+
timeout ||= @sdk_configuration.timeout
|
10654
|
+
|
10655
|
+
connection = @sdk_configuration.client.dup
|
10656
|
+
connection.request :retry, retry_options
|
10657
|
+
|
10658
|
+
hook_ctx = SDKHooks::HookContext.new(
|
10659
|
+
base_url: base_url,
|
10660
|
+
oauth2_scopes: [],
|
10661
|
+
operation_id: 'hris_list_companies_groups',
|
10662
|
+
security_source: @sdk_configuration.security_source
|
10663
|
+
)
|
10664
|
+
|
10665
|
+
error = T.let(nil, T.nilable(StandardError))
|
10666
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
10667
|
+
|
10668
|
+
|
10669
|
+
begin
|
10670
|
+
http_response = connection.get(url) do |req|
|
10671
|
+
req.headers.merge!(headers)
|
10672
|
+
req.options.timeout = timeout unless timeout.nil?
|
10673
|
+
req.params = query_params
|
10674
|
+
Utils.configure_request_security(req, security)
|
10675
|
+
|
10676
|
+
@sdk_configuration.hooks.before_request(
|
10677
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
10678
|
+
hook_ctx: hook_ctx
|
10679
|
+
),
|
10680
|
+
request: req
|
10681
|
+
)
|
10682
|
+
end
|
10683
|
+
rescue StandardError => e
|
10684
|
+
error = e
|
10685
|
+
ensure
|
10686
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
10687
|
+
http_response = @sdk_configuration.hooks.after_error(
|
10688
|
+
error: error,
|
10689
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
10690
|
+
hook_ctx: hook_ctx
|
10691
|
+
),
|
10692
|
+
response: http_response
|
10693
|
+
)
|
10694
|
+
else
|
10695
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10696
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10697
|
+
hook_ctx: hook_ctx
|
10698
|
+
),
|
10699
|
+
response: http_response
|
10700
|
+
)
|
10701
|
+
end
|
10702
|
+
|
10703
|
+
if http_response.nil?
|
10704
|
+
raise error if !error.nil?
|
10705
|
+
raise 'no response'
|
10706
|
+
end
|
10707
|
+
end
|
10708
|
+
|
10709
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
10710
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
10711
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10712
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10713
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10714
|
+
hook_ctx: hook_ctx
|
10715
|
+
),
|
10716
|
+
response: http_response
|
10717
|
+
)
|
10718
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CompaniesPaginated)
|
10719
|
+
response = Models::Operations::HrisListCompaniesGroupsResponse.new(
|
10720
|
+
status_code: http_response.status,
|
10721
|
+
content_type: content_type,
|
10722
|
+
raw_response: http_response,
|
10723
|
+
companies_paginated: obj
|
10724
|
+
)
|
10725
|
+
|
10726
|
+
return response
|
10727
|
+
else
|
10728
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10729
|
+
end
|
10730
|
+
elsif Utils.match_status_code(http_response.status, ['400'])
|
10731
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10732
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10733
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10734
|
+
hook_ctx: hook_ctx
|
10735
|
+
),
|
10736
|
+
response: http_response
|
10737
|
+
)
|
10738
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
|
10739
|
+
throw obj
|
10740
|
+
else
|
10741
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10742
|
+
end
|
10743
|
+
elsif Utils.match_status_code(http_response.status, ['401'])
|
10744
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10745
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10746
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10747
|
+
hook_ctx: hook_ctx
|
10748
|
+
),
|
10749
|
+
response: http_response
|
10750
|
+
)
|
10751
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
|
10752
|
+
throw obj
|
10753
|
+
else
|
10754
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10755
|
+
end
|
10756
|
+
elsif Utils.match_status_code(http_response.status, ['403'])
|
10757
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10758
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10759
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10760
|
+
hook_ctx: hook_ctx
|
10761
|
+
),
|
10762
|
+
response: http_response
|
10763
|
+
)
|
10764
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
|
10765
|
+
throw obj
|
10766
|
+
else
|
10767
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10768
|
+
end
|
10769
|
+
elsif Utils.match_status_code(http_response.status, ['404'])
|
10770
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10771
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10772
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10773
|
+
hook_ctx: hook_ctx
|
10774
|
+
),
|
10775
|
+
response: http_response
|
10776
|
+
)
|
10777
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
|
10778
|
+
throw obj
|
10779
|
+
else
|
10780
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10781
|
+
end
|
10782
|
+
elsif Utils.match_status_code(http_response.status, ['408'])
|
10783
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10784
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10785
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10786
|
+
hook_ctx: hook_ctx
|
10787
|
+
),
|
10788
|
+
response: http_response
|
10789
|
+
)
|
10790
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
|
10791
|
+
throw obj
|
10792
|
+
else
|
10793
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10794
|
+
end
|
10795
|
+
elsif Utils.match_status_code(http_response.status, ['409'])
|
10796
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10797
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10798
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10799
|
+
hook_ctx: hook_ctx
|
10800
|
+
),
|
10801
|
+
response: http_response
|
10802
|
+
)
|
10803
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
|
10804
|
+
throw obj
|
10805
|
+
else
|
10806
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10807
|
+
end
|
10808
|
+
elsif Utils.match_status_code(http_response.status, ['412'])
|
10809
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10810
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10811
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10812
|
+
hook_ctx: hook_ctx
|
10813
|
+
),
|
10814
|
+
response: http_response
|
10815
|
+
)
|
10816
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
|
10817
|
+
throw obj
|
10818
|
+
else
|
10819
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10820
|
+
end
|
10821
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
10822
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10823
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10824
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10825
|
+
hook_ctx: hook_ctx
|
10826
|
+
),
|
10827
|
+
response: http_response
|
10828
|
+
)
|
10829
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
|
10830
|
+
throw obj
|
10831
|
+
else
|
10832
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10833
|
+
end
|
10834
|
+
elsif Utils.match_status_code(http_response.status, ['429'])
|
10835
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10836
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10837
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10838
|
+
hook_ctx: hook_ctx
|
10839
|
+
),
|
10840
|
+
response: http_response
|
10841
|
+
)
|
10842
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
|
10843
|
+
throw obj
|
10844
|
+
else
|
10845
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10846
|
+
end
|
10847
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
10848
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10849
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10850
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10851
|
+
hook_ctx: hook_ctx
|
10852
|
+
),
|
10853
|
+
response: http_response
|
10854
|
+
)
|
10855
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
|
10856
|
+
throw obj
|
10857
|
+
else
|
10858
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10859
|
+
end
|
10860
|
+
elsif Utils.match_status_code(http_response.status, ['501'])
|
10861
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10862
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10863
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10864
|
+
hook_ctx: hook_ctx
|
10865
|
+
),
|
10866
|
+
response: http_response
|
10867
|
+
)
|
10868
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
|
10869
|
+
throw obj
|
10870
|
+
else
|
10871
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10872
|
+
end
|
10873
|
+
elsif Utils.match_status_code(http_response.status, ['502'])
|
10874
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10875
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10876
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10877
|
+
hook_ctx: hook_ctx
|
10878
|
+
),
|
10879
|
+
response: http_response
|
10880
|
+
)
|
10881
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
|
10882
|
+
throw obj
|
10883
|
+
else
|
10884
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
10885
|
+
end
|
10886
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
10887
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
10888
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
10889
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
10890
|
+
else
|
10891
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
10892
|
+
|
10893
|
+
end
|
10894
|
+
end
|
10895
|
+
|
10896
|
+
|
10897
|
+
sig { params(request: T.nilable(Models::Operations::HrisListCostCenterGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListCostCenterGroupsResponse) }
|
10898
|
+
def list_cost_center_groups(request, retries = nil, timeout_ms = nil)
|
10899
|
+
# list_cost_center_groups - List Cost Center Groups
|
10900
|
+
url, params = @sdk_configuration.get_server_details
|
10901
|
+
base_url = Utils.template_url(url, params)
|
10902
|
+
url = "#{base_url}/unified/hris/groups/cost_centers"
|
10903
|
+
headers = Utils.get_headers(request)
|
10904
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListCostCenterGroupsRequest, request)
|
10905
|
+
headers['Accept'] = 'application/json'
|
10906
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
10907
|
+
retries ||= @sdk_configuration.retry_config
|
10908
|
+
retries ||= Utils::RetryConfig.new(
|
10909
|
+
backoff: Utils::BackoffStrategy.new(
|
10910
|
+
exponent: 1.5,
|
10911
|
+
initial_interval: 500,
|
10912
|
+
max_elapsed_time: 3_600_000,
|
10913
|
+
max_interval: 60_000
|
10914
|
+
),
|
10915
|
+
retry_connection_errors: true,
|
10916
|
+
strategy: 'backoff'
|
10917
|
+
)
|
10918
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
10919
|
+
retry_options[:retry_statuses] = [429, 408]
|
10920
|
+
|
10921
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
10922
|
+
|
10923
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
10924
|
+
timeout ||= @sdk_configuration.timeout
|
10925
|
+
|
10926
|
+
connection = @sdk_configuration.client.dup
|
10927
|
+
connection.request :retry, retry_options
|
10928
|
+
|
10929
|
+
hook_ctx = SDKHooks::HookContext.new(
|
10930
|
+
base_url: base_url,
|
10931
|
+
oauth2_scopes: [],
|
10932
|
+
operation_id: 'hris_list_cost_center_groups',
|
10933
|
+
security_source: @sdk_configuration.security_source
|
10934
|
+
)
|
10935
|
+
|
10936
|
+
error = T.let(nil, T.nilable(StandardError))
|
10937
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
10938
|
+
|
10939
|
+
|
10940
|
+
begin
|
10941
|
+
http_response = connection.get(url) do |req|
|
10942
|
+
req.headers.merge!(headers)
|
10943
|
+
req.options.timeout = timeout unless timeout.nil?
|
10944
|
+
req.params = query_params
|
10945
|
+
Utils.configure_request_security(req, security)
|
10946
|
+
|
10947
|
+
@sdk_configuration.hooks.before_request(
|
10948
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
10949
|
+
hook_ctx: hook_ctx
|
10950
|
+
),
|
10951
|
+
request: req
|
10952
|
+
)
|
10953
|
+
end
|
10954
|
+
rescue StandardError => e
|
10955
|
+
error = e
|
10956
|
+
ensure
|
10957
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
10958
|
+
http_response = @sdk_configuration.hooks.after_error(
|
10959
|
+
error: error,
|
10960
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
10961
|
+
hook_ctx: hook_ctx
|
10962
|
+
),
|
10963
|
+
response: http_response
|
10964
|
+
)
|
10965
|
+
else
|
10966
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10967
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10968
|
+
hook_ctx: hook_ctx
|
10969
|
+
),
|
10970
|
+
response: http_response
|
10971
|
+
)
|
10972
|
+
end
|
10973
|
+
|
10974
|
+
if http_response.nil?
|
10975
|
+
raise error if !error.nil?
|
10976
|
+
raise 'no response'
|
10977
|
+
end
|
10978
|
+
end
|
10979
|
+
|
10980
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
10981
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
10982
|
+
if Utils.match_content_type(content_type, 'application/json')
|
10983
|
+
http_response = @sdk_configuration.hooks.after_success(
|
10984
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
10985
|
+
hook_ctx: hook_ctx
|
10986
|
+
),
|
10987
|
+
response: http_response
|
10988
|
+
)
|
10989
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISCostCenterPaginated)
|
10990
|
+
response = Models::Operations::HrisListCostCenterGroupsResponse.new(
|
10991
|
+
status_code: http_response.status,
|
10992
|
+
content_type: content_type,
|
10993
|
+
raw_response: http_response,
|
10994
|
+
hris_cost_center_paginated: obj
|
10995
|
+
)
|
10996
|
+
|
10997
|
+
return response
|
10998
|
+
else
|
10999
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11000
|
+
end
|
11001
|
+
elsif Utils.match_status_code(http_response.status, ['400'])
|
11002
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11003
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11004
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11005
|
+
hook_ctx: hook_ctx
|
11006
|
+
),
|
11007
|
+
response: http_response
|
11008
|
+
)
|
11009
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
|
11010
|
+
throw obj
|
11011
|
+
else
|
11012
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11013
|
+
end
|
11014
|
+
elsif Utils.match_status_code(http_response.status, ['401'])
|
11015
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11016
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11017
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11018
|
+
hook_ctx: hook_ctx
|
11019
|
+
),
|
11020
|
+
response: http_response
|
11021
|
+
)
|
11022
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
|
11023
|
+
throw obj
|
11024
|
+
else
|
11025
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11026
|
+
end
|
11027
|
+
elsif Utils.match_status_code(http_response.status, ['403'])
|
11028
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11029
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11030
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11031
|
+
hook_ctx: hook_ctx
|
11032
|
+
),
|
11033
|
+
response: http_response
|
11034
|
+
)
|
11035
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
|
11036
|
+
throw obj
|
11037
|
+
else
|
11038
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11039
|
+
end
|
11040
|
+
elsif Utils.match_status_code(http_response.status, ['404'])
|
11041
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11042
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11043
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11044
|
+
hook_ctx: hook_ctx
|
11045
|
+
),
|
11046
|
+
response: http_response
|
11047
|
+
)
|
11048
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
|
11049
|
+
throw obj
|
11050
|
+
else
|
11051
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11052
|
+
end
|
11053
|
+
elsif Utils.match_status_code(http_response.status, ['408'])
|
11054
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11055
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11056
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11057
|
+
hook_ctx: hook_ctx
|
11058
|
+
),
|
11059
|
+
response: http_response
|
11060
|
+
)
|
11061
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
|
11062
|
+
throw obj
|
11063
|
+
else
|
11064
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11065
|
+
end
|
11066
|
+
elsif Utils.match_status_code(http_response.status, ['409'])
|
11067
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11068
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11069
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11070
|
+
hook_ctx: hook_ctx
|
11071
|
+
),
|
11072
|
+
response: http_response
|
11073
|
+
)
|
11074
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
|
11075
|
+
throw obj
|
11076
|
+
else
|
11077
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11078
|
+
end
|
11079
|
+
elsif Utils.match_status_code(http_response.status, ['412'])
|
11080
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11081
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11082
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11083
|
+
hook_ctx: hook_ctx
|
11084
|
+
),
|
11085
|
+
response: http_response
|
11086
|
+
)
|
11087
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
|
11088
|
+
throw obj
|
11089
|
+
else
|
11090
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11091
|
+
end
|
11092
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
11093
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11094
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11095
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11096
|
+
hook_ctx: hook_ctx
|
11097
|
+
),
|
11098
|
+
response: http_response
|
11099
|
+
)
|
11100
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
|
11101
|
+
throw obj
|
11102
|
+
else
|
11103
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11104
|
+
end
|
11105
|
+
elsif Utils.match_status_code(http_response.status, ['429'])
|
11106
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11107
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11108
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11109
|
+
hook_ctx: hook_ctx
|
11110
|
+
),
|
11111
|
+
response: http_response
|
11112
|
+
)
|
11113
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
|
11114
|
+
throw obj
|
11115
|
+
else
|
11116
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11117
|
+
end
|
11118
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
11119
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11120
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11121
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11122
|
+
hook_ctx: hook_ctx
|
11123
|
+
),
|
11124
|
+
response: http_response
|
11125
|
+
)
|
11126
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
|
11127
|
+
throw obj
|
11128
|
+
else
|
11129
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11130
|
+
end
|
11131
|
+
elsif Utils.match_status_code(http_response.status, ['501'])
|
11132
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11133
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11134
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11135
|
+
hook_ctx: hook_ctx
|
11136
|
+
),
|
11137
|
+
response: http_response
|
11138
|
+
)
|
11139
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
|
11140
|
+
throw obj
|
11141
|
+
else
|
11142
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11143
|
+
end
|
11144
|
+
elsif Utils.match_status_code(http_response.status, ['502'])
|
11145
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11146
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11147
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11148
|
+
hook_ctx: hook_ctx
|
11149
|
+
),
|
11150
|
+
response: http_response
|
11151
|
+
)
|
11152
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
|
11153
|
+
throw obj
|
11154
|
+
else
|
11155
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11156
|
+
end
|
11157
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
11158
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
11159
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
11160
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
11161
|
+
else
|
11162
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
11163
|
+
|
11164
|
+
end
|
11165
|
+
end
|
11166
|
+
|
11167
|
+
|
11168
|
+
sig { params(request: T.nilable(Models::Operations::HrisListDepartmentGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListDepartmentGroupsResponse) }
|
11169
|
+
def list_department_groups(request, retries = nil, timeout_ms = nil)
|
11170
|
+
# list_department_groups - List Department Groups
|
11171
|
+
url, params = @sdk_configuration.get_server_details
|
11172
|
+
base_url = Utils.template_url(url, params)
|
11173
|
+
url = "#{base_url}/unified/hris/groups/departments"
|
11174
|
+
headers = Utils.get_headers(request)
|
11175
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListDepartmentGroupsRequest, request)
|
11176
|
+
headers['Accept'] = 'application/json'
|
11177
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
11178
|
+
retries ||= @sdk_configuration.retry_config
|
11179
|
+
retries ||= Utils::RetryConfig.new(
|
11180
|
+
backoff: Utils::BackoffStrategy.new(
|
11181
|
+
exponent: 1.5,
|
11182
|
+
initial_interval: 500,
|
11183
|
+
max_elapsed_time: 3_600_000,
|
11184
|
+
max_interval: 60_000
|
11185
|
+
),
|
11186
|
+
retry_connection_errors: true,
|
11187
|
+
strategy: 'backoff'
|
11188
|
+
)
|
11189
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
11190
|
+
retry_options[:retry_statuses] = [429, 408]
|
11191
|
+
|
11192
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
11193
|
+
|
11194
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
11195
|
+
timeout ||= @sdk_configuration.timeout
|
11196
|
+
|
11197
|
+
connection = @sdk_configuration.client.dup
|
11198
|
+
connection.request :retry, retry_options
|
11199
|
+
|
11200
|
+
hook_ctx = SDKHooks::HookContext.new(
|
11201
|
+
base_url: base_url,
|
11202
|
+
oauth2_scopes: [],
|
11203
|
+
operation_id: 'hris_list_department_groups',
|
11204
|
+
security_source: @sdk_configuration.security_source
|
11205
|
+
)
|
11206
|
+
|
11207
|
+
error = T.let(nil, T.nilable(StandardError))
|
11208
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
11209
|
+
|
11210
|
+
|
11211
|
+
begin
|
11212
|
+
http_response = connection.get(url) do |req|
|
11213
|
+
req.headers.merge!(headers)
|
11214
|
+
req.options.timeout = timeout unless timeout.nil?
|
11215
|
+
req.params = query_params
|
11216
|
+
Utils.configure_request_security(req, security)
|
11217
|
+
|
11218
|
+
@sdk_configuration.hooks.before_request(
|
11219
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
11220
|
+
hook_ctx: hook_ctx
|
11221
|
+
),
|
11222
|
+
request: req
|
11223
|
+
)
|
11224
|
+
end
|
11225
|
+
rescue StandardError => e
|
11226
|
+
error = e
|
11227
|
+
ensure
|
11228
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
11229
|
+
http_response = @sdk_configuration.hooks.after_error(
|
11230
|
+
error: error,
|
11231
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
11232
|
+
hook_ctx: hook_ctx
|
11233
|
+
),
|
11234
|
+
response: http_response
|
11235
|
+
)
|
11236
|
+
else
|
11237
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11238
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11239
|
+
hook_ctx: hook_ctx
|
11240
|
+
),
|
11241
|
+
response: http_response
|
11242
|
+
)
|
11243
|
+
end
|
11244
|
+
|
11245
|
+
if http_response.nil?
|
11246
|
+
raise error if !error.nil?
|
11247
|
+
raise 'no response'
|
11248
|
+
end
|
11249
|
+
end
|
11250
|
+
|
11251
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
11252
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
11253
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11254
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11255
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11256
|
+
hook_ctx: hook_ctx
|
11257
|
+
),
|
11258
|
+
response: http_response
|
11259
|
+
)
|
11260
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISDepartmentsPaginated)
|
11261
|
+
response = Models::Operations::HrisListDepartmentGroupsResponse.new(
|
11262
|
+
status_code: http_response.status,
|
11263
|
+
content_type: content_type,
|
11264
|
+
raw_response: http_response,
|
11265
|
+
hris_departments_paginated: obj
|
11266
|
+
)
|
11267
|
+
|
11268
|
+
return response
|
11269
|
+
else
|
11270
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11271
|
+
end
|
11272
|
+
elsif Utils.match_status_code(http_response.status, ['400'])
|
11273
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11274
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11275
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11276
|
+
hook_ctx: hook_ctx
|
11277
|
+
),
|
11278
|
+
response: http_response
|
11279
|
+
)
|
11280
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
|
11281
|
+
throw obj
|
11282
|
+
else
|
11283
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11284
|
+
end
|
11285
|
+
elsif Utils.match_status_code(http_response.status, ['401'])
|
11286
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11287
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11288
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11289
|
+
hook_ctx: hook_ctx
|
11290
|
+
),
|
11291
|
+
response: http_response
|
11292
|
+
)
|
11293
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
|
11294
|
+
throw obj
|
11295
|
+
else
|
11296
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11297
|
+
end
|
11298
|
+
elsif Utils.match_status_code(http_response.status, ['403'])
|
11299
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11300
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11301
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11302
|
+
hook_ctx: hook_ctx
|
11303
|
+
),
|
11304
|
+
response: http_response
|
11305
|
+
)
|
11306
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
|
11307
|
+
throw obj
|
11308
|
+
else
|
11309
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11310
|
+
end
|
11311
|
+
elsif Utils.match_status_code(http_response.status, ['404'])
|
11312
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11313
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11314
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11315
|
+
hook_ctx: hook_ctx
|
11316
|
+
),
|
11317
|
+
response: http_response
|
11318
|
+
)
|
11319
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
|
11320
|
+
throw obj
|
11321
|
+
else
|
11322
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11323
|
+
end
|
11324
|
+
elsif Utils.match_status_code(http_response.status, ['408'])
|
11325
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11326
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11327
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11328
|
+
hook_ctx: hook_ctx
|
11329
|
+
),
|
11330
|
+
response: http_response
|
11331
|
+
)
|
11332
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
|
11333
|
+
throw obj
|
11334
|
+
else
|
11335
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11336
|
+
end
|
11337
|
+
elsif Utils.match_status_code(http_response.status, ['409'])
|
11338
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11339
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11340
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11341
|
+
hook_ctx: hook_ctx
|
11342
|
+
),
|
11343
|
+
response: http_response
|
11344
|
+
)
|
11345
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
|
11346
|
+
throw obj
|
11347
|
+
else
|
11348
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11349
|
+
end
|
11350
|
+
elsif Utils.match_status_code(http_response.status, ['412'])
|
11351
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11352
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11353
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11354
|
+
hook_ctx: hook_ctx
|
11355
|
+
),
|
11356
|
+
response: http_response
|
11357
|
+
)
|
11358
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
|
11359
|
+
throw obj
|
11360
|
+
else
|
11361
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11362
|
+
end
|
11363
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
11364
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11365
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11366
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11367
|
+
hook_ctx: hook_ctx
|
11368
|
+
),
|
11369
|
+
response: http_response
|
11370
|
+
)
|
11371
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
|
11372
|
+
throw obj
|
11373
|
+
else
|
11374
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11375
|
+
end
|
11376
|
+
elsif Utils.match_status_code(http_response.status, ['429'])
|
11377
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11378
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11379
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11380
|
+
hook_ctx: hook_ctx
|
11381
|
+
),
|
11382
|
+
response: http_response
|
11383
|
+
)
|
11384
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
|
11385
|
+
throw obj
|
11386
|
+
else
|
11387
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11388
|
+
end
|
11389
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
11390
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11391
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11392
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11393
|
+
hook_ctx: hook_ctx
|
11394
|
+
),
|
11395
|
+
response: http_response
|
11396
|
+
)
|
11397
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
|
11398
|
+
throw obj
|
11399
|
+
else
|
11400
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11401
|
+
end
|
11402
|
+
elsif Utils.match_status_code(http_response.status, ['501'])
|
11403
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11404
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11405
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11406
|
+
hook_ctx: hook_ctx
|
11407
|
+
),
|
11408
|
+
response: http_response
|
11409
|
+
)
|
11410
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
|
11411
|
+
throw obj
|
11412
|
+
else
|
11413
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11414
|
+
end
|
11415
|
+
elsif Utils.match_status_code(http_response.status, ['502'])
|
11416
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11417
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11418
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11419
|
+
hook_ctx: hook_ctx
|
11420
|
+
),
|
11421
|
+
response: http_response
|
11422
|
+
)
|
11423
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
|
11424
|
+
throw obj
|
11425
|
+
else
|
11426
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11427
|
+
end
|
11428
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
11429
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
11430
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
11431
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
11432
|
+
else
|
11433
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
11434
|
+
|
11435
|
+
end
|
11436
|
+
end
|
11437
|
+
|
11438
|
+
|
11439
|
+
sig { params(request: T.nilable(Models::Operations::HrisListDivisionGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListDivisionGroupsResponse) }
|
11440
|
+
def list_division_groups(request, retries = nil, timeout_ms = nil)
|
11441
|
+
# list_division_groups - List Division Groups
|
11442
|
+
url, params = @sdk_configuration.get_server_details
|
11443
|
+
base_url = Utils.template_url(url, params)
|
11444
|
+
url = "#{base_url}/unified/hris/groups/divisions"
|
11445
|
+
headers = Utils.get_headers(request)
|
11446
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListDivisionGroupsRequest, request)
|
11447
|
+
headers['Accept'] = 'application/json'
|
11448
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
11449
|
+
retries ||= @sdk_configuration.retry_config
|
11450
|
+
retries ||= Utils::RetryConfig.new(
|
11451
|
+
backoff: Utils::BackoffStrategy.new(
|
11452
|
+
exponent: 1.5,
|
11453
|
+
initial_interval: 500,
|
11454
|
+
max_elapsed_time: 3_600_000,
|
11455
|
+
max_interval: 60_000
|
11456
|
+
),
|
11457
|
+
retry_connection_errors: true,
|
11458
|
+
strategy: 'backoff'
|
11459
|
+
)
|
11460
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
11461
|
+
retry_options[:retry_statuses] = [429, 408]
|
11462
|
+
|
11463
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
11464
|
+
|
11465
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
11466
|
+
timeout ||= @sdk_configuration.timeout
|
11467
|
+
|
11468
|
+
connection = @sdk_configuration.client.dup
|
11469
|
+
connection.request :retry, retry_options
|
11470
|
+
|
11471
|
+
hook_ctx = SDKHooks::HookContext.new(
|
11472
|
+
base_url: base_url,
|
11473
|
+
oauth2_scopes: [],
|
11474
|
+
operation_id: 'hris_list_division_groups',
|
11475
|
+
security_source: @sdk_configuration.security_source
|
11476
|
+
)
|
11477
|
+
|
11478
|
+
error = T.let(nil, T.nilable(StandardError))
|
11479
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
11480
|
+
|
11481
|
+
|
11482
|
+
begin
|
11483
|
+
http_response = connection.get(url) do |req|
|
11484
|
+
req.headers.merge!(headers)
|
11485
|
+
req.options.timeout = timeout unless timeout.nil?
|
11486
|
+
req.params = query_params
|
11487
|
+
Utils.configure_request_security(req, security)
|
11488
|
+
|
11489
|
+
@sdk_configuration.hooks.before_request(
|
11490
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
11491
|
+
hook_ctx: hook_ctx
|
11492
|
+
),
|
11493
|
+
request: req
|
11494
|
+
)
|
11495
|
+
end
|
11496
|
+
rescue StandardError => e
|
11497
|
+
error = e
|
11498
|
+
ensure
|
11499
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
11500
|
+
http_response = @sdk_configuration.hooks.after_error(
|
11501
|
+
error: error,
|
11502
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
11503
|
+
hook_ctx: hook_ctx
|
11504
|
+
),
|
11505
|
+
response: http_response
|
11506
|
+
)
|
11507
|
+
else
|
11508
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11509
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11510
|
+
hook_ctx: hook_ctx
|
11511
|
+
),
|
11512
|
+
response: http_response
|
11513
|
+
)
|
11514
|
+
end
|
11515
|
+
|
11516
|
+
if http_response.nil?
|
11517
|
+
raise error if !error.nil?
|
11518
|
+
raise 'no response'
|
11519
|
+
end
|
11520
|
+
end
|
11521
|
+
|
11522
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
11523
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
11524
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11525
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11526
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11527
|
+
hook_ctx: hook_ctx
|
11528
|
+
),
|
11529
|
+
response: http_response
|
11530
|
+
)
|
11531
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISDivisionsPaginated)
|
11532
|
+
response = Models::Operations::HrisListDivisionGroupsResponse.new(
|
11533
|
+
status_code: http_response.status,
|
11534
|
+
content_type: content_type,
|
11535
|
+
raw_response: http_response,
|
11536
|
+
hris_divisions_paginated: obj
|
11537
|
+
)
|
11538
|
+
|
11539
|
+
return response
|
11540
|
+
else
|
11541
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11542
|
+
end
|
11543
|
+
elsif Utils.match_status_code(http_response.status, ['400'])
|
11544
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11545
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11546
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11547
|
+
hook_ctx: hook_ctx
|
11548
|
+
),
|
11549
|
+
response: http_response
|
11550
|
+
)
|
11551
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
|
11552
|
+
throw obj
|
11553
|
+
else
|
11554
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11555
|
+
end
|
11556
|
+
elsif Utils.match_status_code(http_response.status, ['401'])
|
11557
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11558
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11559
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11560
|
+
hook_ctx: hook_ctx
|
11561
|
+
),
|
11562
|
+
response: http_response
|
11563
|
+
)
|
11564
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
|
11565
|
+
throw obj
|
11566
|
+
else
|
11567
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11568
|
+
end
|
11569
|
+
elsif Utils.match_status_code(http_response.status, ['403'])
|
11570
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11571
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11572
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11573
|
+
hook_ctx: hook_ctx
|
11574
|
+
),
|
11575
|
+
response: http_response
|
11576
|
+
)
|
11577
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
|
11578
|
+
throw obj
|
11579
|
+
else
|
11580
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11581
|
+
end
|
11582
|
+
elsif Utils.match_status_code(http_response.status, ['404'])
|
11583
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11584
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11585
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11586
|
+
hook_ctx: hook_ctx
|
11587
|
+
),
|
11588
|
+
response: http_response
|
11589
|
+
)
|
11590
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
|
11591
|
+
throw obj
|
11592
|
+
else
|
11593
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11594
|
+
end
|
11595
|
+
elsif Utils.match_status_code(http_response.status, ['408'])
|
11596
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11597
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11598
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11599
|
+
hook_ctx: hook_ctx
|
11600
|
+
),
|
11601
|
+
response: http_response
|
11602
|
+
)
|
11603
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
|
11604
|
+
throw obj
|
11605
|
+
else
|
11606
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11607
|
+
end
|
11608
|
+
elsif Utils.match_status_code(http_response.status, ['409'])
|
11609
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11610
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11611
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11612
|
+
hook_ctx: hook_ctx
|
11613
|
+
),
|
11614
|
+
response: http_response
|
11615
|
+
)
|
11616
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
|
11617
|
+
throw obj
|
11618
|
+
else
|
11619
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11620
|
+
end
|
11621
|
+
elsif Utils.match_status_code(http_response.status, ['412'])
|
11622
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11623
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11624
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11625
|
+
hook_ctx: hook_ctx
|
11626
|
+
),
|
11627
|
+
response: http_response
|
11628
|
+
)
|
11629
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
|
11630
|
+
throw obj
|
11631
|
+
else
|
11632
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11633
|
+
end
|
11634
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
11635
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11636
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11637
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11638
|
+
hook_ctx: hook_ctx
|
11639
|
+
),
|
11640
|
+
response: http_response
|
11641
|
+
)
|
11642
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
|
11643
|
+
throw obj
|
11644
|
+
else
|
11645
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11646
|
+
end
|
11647
|
+
elsif Utils.match_status_code(http_response.status, ['429'])
|
11648
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11649
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11650
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11651
|
+
hook_ctx: hook_ctx
|
11652
|
+
),
|
11653
|
+
response: http_response
|
11654
|
+
)
|
11655
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
|
11656
|
+
throw obj
|
11657
|
+
else
|
11658
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11659
|
+
end
|
11660
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
11661
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11662
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11663
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11664
|
+
hook_ctx: hook_ctx
|
11665
|
+
),
|
11666
|
+
response: http_response
|
11667
|
+
)
|
11668
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
|
11669
|
+
throw obj
|
11670
|
+
else
|
11671
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11672
|
+
end
|
11673
|
+
elsif Utils.match_status_code(http_response.status, ['501'])
|
11674
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11675
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11676
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11677
|
+
hook_ctx: hook_ctx
|
11678
|
+
),
|
11679
|
+
response: http_response
|
11680
|
+
)
|
11681
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
|
11682
|
+
throw obj
|
11683
|
+
else
|
11684
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11685
|
+
end
|
11686
|
+
elsif Utils.match_status_code(http_response.status, ['502'])
|
11687
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11688
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11689
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11690
|
+
hook_ctx: hook_ctx
|
11691
|
+
),
|
11692
|
+
response: http_response
|
11693
|
+
)
|
11694
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
|
11695
|
+
throw obj
|
11696
|
+
else
|
11697
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11698
|
+
end
|
11699
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
11700
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
11701
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
11702
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
11703
|
+
else
|
11704
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
11705
|
+
|
11706
|
+
end
|
11707
|
+
end
|
11708
|
+
|
11709
|
+
|
11710
|
+
sig { params(request: T.nilable(Models::Operations::HrisListEmployeeCategoriesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeCategoriesResponse) }
|
11711
|
+
def list_employee_categories(request, retries = nil, timeout_ms = nil)
|
11712
|
+
# list_employee_categories - List Employee Document Categories
|
11713
|
+
url, params = @sdk_configuration.get_server_details
|
11714
|
+
base_url = Utils.template_url(url, params)
|
11715
|
+
url = "#{base_url}/unified/hris/documents/employee_categories"
|
11716
|
+
headers = Utils.get_headers(request)
|
11717
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeCategoriesRequest, request)
|
11718
|
+
headers['Accept'] = 'application/json'
|
11719
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
11720
|
+
retries ||= @sdk_configuration.retry_config
|
11721
|
+
retries ||= Utils::RetryConfig.new(
|
11722
|
+
backoff: Utils::BackoffStrategy.new(
|
11723
|
+
exponent: 1.5,
|
11724
|
+
initial_interval: 500,
|
11725
|
+
max_elapsed_time: 3_600_000,
|
11726
|
+
max_interval: 60_000
|
11727
|
+
),
|
11728
|
+
retry_connection_errors: true,
|
11729
|
+
strategy: 'backoff'
|
11730
|
+
)
|
11731
|
+
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
11732
|
+
retry_options[:retry_statuses] = [429, 408]
|
11733
|
+
|
11734
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
11735
|
+
|
11736
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
11737
|
+
timeout ||= @sdk_configuration.timeout
|
11738
|
+
|
11739
|
+
connection = @sdk_configuration.client.dup
|
11740
|
+
connection.request :retry, retry_options
|
11741
|
+
|
11742
|
+
hook_ctx = SDKHooks::HookContext.new(
|
11743
|
+
base_url: base_url,
|
11744
|
+
oauth2_scopes: [],
|
11745
|
+
operation_id: 'hris_list_employee_categories',
|
11746
|
+
security_source: @sdk_configuration.security_source
|
11747
|
+
)
|
11748
|
+
|
11749
|
+
error = T.let(nil, T.nilable(StandardError))
|
11750
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
11751
|
+
|
11752
|
+
|
11753
|
+
begin
|
11754
|
+
http_response = connection.get(url) do |req|
|
11755
|
+
req.headers.merge!(headers)
|
11756
|
+
req.options.timeout = timeout unless timeout.nil?
|
11757
|
+
req.params = query_params
|
11758
|
+
Utils.configure_request_security(req, security)
|
11759
|
+
|
11760
|
+
@sdk_configuration.hooks.before_request(
|
11761
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
11762
|
+
hook_ctx: hook_ctx
|
11763
|
+
),
|
11764
|
+
request: req
|
11765
|
+
)
|
11766
|
+
end
|
11767
|
+
rescue StandardError => e
|
11768
|
+
error = e
|
11769
|
+
ensure
|
11770
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
11771
|
+
http_response = @sdk_configuration.hooks.after_error(
|
11772
|
+
error: error,
|
11773
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
11774
|
+
hook_ctx: hook_ctx
|
11775
|
+
),
|
11776
|
+
response: http_response
|
11777
|
+
)
|
11778
|
+
else
|
11779
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11780
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11781
|
+
hook_ctx: hook_ctx
|
11782
|
+
),
|
11783
|
+
response: http_response
|
11784
|
+
)
|
11785
|
+
end
|
11786
|
+
|
11787
|
+
if http_response.nil?
|
11788
|
+
raise error if !error.nil?
|
11789
|
+
raise 'no response'
|
11790
|
+
end
|
11791
|
+
end
|
11792
|
+
|
11793
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
11794
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
11795
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11796
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11797
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11798
|
+
hook_ctx: hook_ctx
|
11799
|
+
),
|
11800
|
+
response: http_response
|
11801
|
+
)
|
11802
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ReferencePaginated)
|
11803
|
+
response = Models::Operations::HrisListEmployeeCategoriesResponse.new(
|
11804
|
+
status_code: http_response.status,
|
11805
|
+
content_type: content_type,
|
11806
|
+
raw_response: http_response,
|
11807
|
+
reference_paginated: obj
|
11808
|
+
)
|
11809
|
+
|
11810
|
+
return response
|
11811
|
+
else
|
11812
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11813
|
+
end
|
11814
|
+
elsif Utils.match_status_code(http_response.status, ['400'])
|
11815
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11816
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11817
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11818
|
+
hook_ctx: hook_ctx
|
11819
|
+
),
|
11820
|
+
response: http_response
|
11821
|
+
)
|
11822
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
|
11823
|
+
throw obj
|
11824
|
+
else
|
11825
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11826
|
+
end
|
11827
|
+
elsif Utils.match_status_code(http_response.status, ['401'])
|
11828
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11829
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11830
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11831
|
+
hook_ctx: hook_ctx
|
11832
|
+
),
|
11833
|
+
response: http_response
|
11834
|
+
)
|
11835
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
|
11836
|
+
throw obj
|
11837
|
+
else
|
11838
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11839
|
+
end
|
11840
|
+
elsif Utils.match_status_code(http_response.status, ['403'])
|
11841
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11842
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11843
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11844
|
+
hook_ctx: hook_ctx
|
11845
|
+
),
|
11846
|
+
response: http_response
|
11847
|
+
)
|
11848
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
|
11849
|
+
throw obj
|
11850
|
+
else
|
11851
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11852
|
+
end
|
11853
|
+
elsif Utils.match_status_code(http_response.status, ['404'])
|
11854
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11855
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11856
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11857
|
+
hook_ctx: hook_ctx
|
11858
|
+
),
|
11859
|
+
response: http_response
|
11860
|
+
)
|
11861
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
|
11862
|
+
throw obj
|
11863
|
+
else
|
11864
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11865
|
+
end
|
11866
|
+
elsif Utils.match_status_code(http_response.status, ['408'])
|
11867
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11868
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11869
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11870
|
+
hook_ctx: hook_ctx
|
11871
|
+
),
|
11872
|
+
response: http_response
|
11873
|
+
)
|
11874
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
|
11875
|
+
throw obj
|
11876
|
+
else
|
11877
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11878
|
+
end
|
11879
|
+
elsif Utils.match_status_code(http_response.status, ['409'])
|
11880
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11881
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11882
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11883
|
+
hook_ctx: hook_ctx
|
11884
|
+
),
|
11885
|
+
response: http_response
|
11886
|
+
)
|
11887
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
|
11888
|
+
throw obj
|
11889
|
+
else
|
11890
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11891
|
+
end
|
11892
|
+
elsif Utils.match_status_code(http_response.status, ['412'])
|
11893
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11894
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11895
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11896
|
+
hook_ctx: hook_ctx
|
11897
|
+
),
|
11898
|
+
response: http_response
|
11899
|
+
)
|
11900
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
|
11901
|
+
throw obj
|
11902
|
+
else
|
11903
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11904
|
+
end
|
11905
|
+
elsif Utils.match_status_code(http_response.status, ['422'])
|
11906
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11907
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11908
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11909
|
+
hook_ctx: hook_ctx
|
11910
|
+
),
|
11911
|
+
response: http_response
|
11912
|
+
)
|
11913
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
|
11914
|
+
throw obj
|
11915
|
+
else
|
11916
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11917
|
+
end
|
11918
|
+
elsif Utils.match_status_code(http_response.status, ['429'])
|
11919
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11920
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11921
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11922
|
+
hook_ctx: hook_ctx
|
11923
|
+
),
|
11924
|
+
response: http_response
|
11925
|
+
)
|
11926
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
|
11927
|
+
throw obj
|
11928
|
+
else
|
11929
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11930
|
+
end
|
11931
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
11932
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11933
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11934
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11935
|
+
hook_ctx: hook_ctx
|
11936
|
+
),
|
11937
|
+
response: http_response
|
11938
|
+
)
|
11939
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
|
11940
|
+
throw obj
|
11941
|
+
else
|
11942
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11943
|
+
end
|
11944
|
+
elsif Utils.match_status_code(http_response.status, ['501'])
|
11945
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11946
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11947
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11948
|
+
hook_ctx: hook_ctx
|
11949
|
+
),
|
11950
|
+
response: http_response
|
11951
|
+
)
|
11952
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
|
11953
|
+
throw obj
|
11954
|
+
else
|
11955
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11956
|
+
end
|
11957
|
+
elsif Utils.match_status_code(http_response.status, ['502'])
|
11958
|
+
if Utils.match_content_type(content_type, 'application/json')
|
11959
|
+
http_response = @sdk_configuration.hooks.after_success(
|
11960
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
11961
|
+
hook_ctx: hook_ctx
|
11962
|
+
),
|
11963
|
+
response: http_response
|
11964
|
+
)
|
11965
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
|
11966
|
+
throw obj
|
11967
|
+
else
|
11968
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
11969
|
+
end
|
11970
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
11971
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
11972
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
11973
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
11974
|
+
else
|
11975
|
+
raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
11976
|
+
|
11977
|
+
end
|
11978
|
+
end
|
11979
|
+
|
11980
|
+
|
11981
|
+
sig { params(request: T.nilable(Models::Operations::HrisListEmployeeCustomFieldDefinitionsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeCustomFieldDefinitionsResponse) }
|
11982
|
+
def list_employee_custom_field_definitions(request, retries = nil, timeout_ms = nil)
|
11983
|
+
# list_employee_custom_field_definitions - List employee Custom Field Definitions
|
11984
|
+
url, params = @sdk_configuration.get_server_details
|
11985
|
+
base_url = Utils.template_url(url, params)
|
11986
|
+
url = "#{base_url}/unified/hris/custom_field_definitions/employees"
|
11987
|
+
headers = Utils.get_headers(request)
|
11988
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeCustomFieldDefinitionsRequest, request)
|
9801
11989
|
headers['Accept'] = 'application/json'
|
9802
11990
|
headers['user-agent'] = @sdk_configuration.user_agent
|
9803
11991
|
retries ||= @sdk_configuration.retry_config
|
@@ -9825,7 +12013,7 @@ module StackOne
|
|
9825
12013
|
hook_ctx = SDKHooks::HookContext.new(
|
9826
12014
|
base_url: base_url,
|
9827
12015
|
oauth2_scopes: [],
|
9828
|
-
operation_id: '
|
12016
|
+
operation_id: 'hris_list_employee_custom_field_definitions',
|
9829
12017
|
security_source: @sdk_configuration.security_source
|
9830
12018
|
)
|
9831
12019
|
|
@@ -9882,12 +12070,12 @@ module StackOne
|
|
9882
12070
|
),
|
9883
12071
|
response: http_response
|
9884
12072
|
)
|
9885
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
9886
|
-
response = Models::Operations::
|
12073
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomFieldDefinitionsPaginated)
|
12074
|
+
response = Models::Operations::HrisListEmployeeCustomFieldDefinitionsResponse.new(
|
9887
12075
|
status_code: http_response.status,
|
9888
12076
|
content_type: content_type,
|
9889
12077
|
raw_response: http_response,
|
9890
|
-
|
12078
|
+
custom_field_definitions_paginated: obj
|
9891
12079
|
)
|
9892
12080
|
|
9893
12081
|
return response
|
@@ -10061,14 +12249,19 @@ module StackOne
|
|
10061
12249
|
end
|
10062
12250
|
|
10063
12251
|
|
10064
|
-
sig { params(request: T.nilable(Models::Operations::
|
10065
|
-
def
|
10066
|
-
#
|
12252
|
+
sig { params(request: T.nilable(Models::Operations::HrisListEmployeeDocumentsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeDocumentsResponse) }
|
12253
|
+
def list_employee_documents(request, retries = nil, timeout_ms = nil)
|
12254
|
+
# list_employee_documents - List Employee Documents
|
10067
12255
|
url, params = @sdk_configuration.get_server_details
|
10068
12256
|
base_url = Utils.template_url(url, params)
|
10069
|
-
url =
|
12257
|
+
url = Utils.generate_url(
|
12258
|
+
Models::Operations::HrisListEmployeeDocumentsRequest,
|
12259
|
+
base_url,
|
12260
|
+
'/unified/hris/employees/{id}/documents',
|
12261
|
+
request
|
12262
|
+
)
|
10070
12263
|
headers = Utils.get_headers(request)
|
10071
|
-
query_params = Utils.get_query_params(Models::Operations::
|
12264
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeDocumentsRequest, request)
|
10072
12265
|
headers['Accept'] = 'application/json'
|
10073
12266
|
headers['user-agent'] = @sdk_configuration.user_agent
|
10074
12267
|
retries ||= @sdk_configuration.retry_config
|
@@ -10096,7 +12289,7 @@ module StackOne
|
|
10096
12289
|
hook_ctx = SDKHooks::HookContext.new(
|
10097
12290
|
base_url: base_url,
|
10098
12291
|
oauth2_scopes: [],
|
10099
|
-
operation_id: '
|
12292
|
+
operation_id: 'hris_list_employee_documents',
|
10100
12293
|
security_source: @sdk_configuration.security_source
|
10101
12294
|
)
|
10102
12295
|
|
@@ -10153,12 +12346,12 @@ module StackOne
|
|
10153
12346
|
),
|
10154
12347
|
response: http_response
|
10155
12348
|
)
|
10156
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
10157
|
-
response = Models::Operations::
|
12349
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HrisDocumentsPaginated)
|
12350
|
+
response = Models::Operations::HrisListEmployeeDocumentsResponse.new(
|
10158
12351
|
status_code: http_response.status,
|
10159
12352
|
content_type: content_type,
|
10160
12353
|
raw_response: http_response,
|
10161
|
-
|
12354
|
+
hris_documents_paginated: obj
|
10162
12355
|
)
|
10163
12356
|
|
10164
12357
|
return response
|
@@ -10332,14 +12525,19 @@ module StackOne
|
|
10332
12525
|
end
|
10333
12526
|
|
10334
12527
|
|
10335
|
-
sig { params(request: T.nilable(Models::Operations::
|
10336
|
-
def
|
10337
|
-
#
|
12528
|
+
sig { params(request: T.nilable(Models::Operations::HrisListEmployeeEmploymentsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeEmploymentsResponse) }
|
12529
|
+
def list_employee_employments(request, retries = nil, timeout_ms = nil)
|
12530
|
+
# list_employee_employments - List Employee Employments
|
10338
12531
|
url, params = @sdk_configuration.get_server_details
|
10339
12532
|
base_url = Utils.template_url(url, params)
|
10340
|
-
url =
|
12533
|
+
url = Utils.generate_url(
|
12534
|
+
Models::Operations::HrisListEmployeeEmploymentsRequest,
|
12535
|
+
base_url,
|
12536
|
+
'/unified/hris/employees/{id}/employments',
|
12537
|
+
request
|
12538
|
+
)
|
10341
12539
|
headers = Utils.get_headers(request)
|
10342
|
-
query_params = Utils.get_query_params(Models::Operations::
|
12540
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeEmploymentsRequest, request)
|
10343
12541
|
headers['Accept'] = 'application/json'
|
10344
12542
|
headers['user-agent'] = @sdk_configuration.user_agent
|
10345
12543
|
retries ||= @sdk_configuration.retry_config
|
@@ -10367,7 +12565,7 @@ module StackOne
|
|
10367
12565
|
hook_ctx = SDKHooks::HookContext.new(
|
10368
12566
|
base_url: base_url,
|
10369
12567
|
oauth2_scopes: [],
|
10370
|
-
operation_id: '
|
12568
|
+
operation_id: 'hris_list_employee_employments',
|
10371
12569
|
security_source: @sdk_configuration.security_source
|
10372
12570
|
)
|
10373
12571
|
|
@@ -10424,12 +12622,12 @@ module StackOne
|
|
10424
12622
|
),
|
10425
12623
|
response: http_response
|
10426
12624
|
)
|
10427
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
10428
|
-
response = Models::Operations::
|
12625
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EmploymentsPaginated)
|
12626
|
+
response = Models::Operations::HrisListEmployeeEmploymentsResponse.new(
|
10429
12627
|
status_code: http_response.status,
|
10430
12628
|
content_type: content_type,
|
10431
12629
|
raw_response: http_response,
|
10432
|
-
|
12630
|
+
employments_paginated: obj
|
10433
12631
|
)
|
10434
12632
|
|
10435
12633
|
return response
|
@@ -10603,19 +12801,19 @@ module StackOne
|
|
10603
12801
|
end
|
10604
12802
|
|
10605
12803
|
|
10606
|
-
sig { params(request: T.nilable(Models::Operations::
|
10607
|
-
def
|
10608
|
-
#
|
12804
|
+
sig { params(request: T.nilable(Models::Operations::HrisListEmployeeSkillsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeSkillsResponse) }
|
12805
|
+
def list_employee_skills(request, retries = nil, timeout_ms = nil)
|
12806
|
+
# list_employee_skills - List Employee Skills
|
10609
12807
|
url, params = @sdk_configuration.get_server_details
|
10610
12808
|
base_url = Utils.template_url(url, params)
|
10611
12809
|
url = Utils.generate_url(
|
10612
|
-
Models::Operations::
|
12810
|
+
Models::Operations::HrisListEmployeeSkillsRequest,
|
10613
12811
|
base_url,
|
10614
|
-
'/unified/hris/employees/{id}/
|
12812
|
+
'/unified/hris/employees/{id}/skills',
|
10615
12813
|
request
|
10616
12814
|
)
|
10617
12815
|
headers = Utils.get_headers(request)
|
10618
|
-
query_params = Utils.get_query_params(Models::Operations::
|
12816
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeSkillsRequest, request)
|
10619
12817
|
headers['Accept'] = 'application/json'
|
10620
12818
|
headers['user-agent'] = @sdk_configuration.user_agent
|
10621
12819
|
retries ||= @sdk_configuration.retry_config
|
@@ -10643,7 +12841,7 @@ module StackOne
|
|
10643
12841
|
hook_ctx = SDKHooks::HookContext.new(
|
10644
12842
|
base_url: base_url,
|
10645
12843
|
oauth2_scopes: [],
|
10646
|
-
operation_id: '
|
12844
|
+
operation_id: 'hris_list_employee_skills',
|
10647
12845
|
security_source: @sdk_configuration.security_source
|
10648
12846
|
)
|
10649
12847
|
|
@@ -10700,12 +12898,12 @@ module StackOne
|
|
10700
12898
|
),
|
10701
12899
|
response: http_response
|
10702
12900
|
)
|
10703
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
10704
|
-
response = Models::Operations::
|
12901
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EntitySkillsPaginated)
|
12902
|
+
response = Models::Operations::HrisListEmployeeSkillsResponse.new(
|
10705
12903
|
status_code: http_response.status,
|
10706
12904
|
content_type: content_type,
|
10707
12905
|
raw_response: http_response,
|
10708
|
-
|
12906
|
+
entity_skills_paginated: obj
|
10709
12907
|
)
|
10710
12908
|
|
10711
12909
|
return response
|
@@ -10879,19 +13077,19 @@ module StackOne
|
|
10879
13077
|
end
|
10880
13078
|
|
10881
13079
|
|
10882
|
-
sig { params(request: T.nilable(Models::Operations::
|
10883
|
-
def
|
10884
|
-
#
|
13080
|
+
sig { params(request: T.nilable(Models::Operations::HrisListEmployeeTasksRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeTasksResponse) }
|
13081
|
+
def list_employee_tasks(request, retries = nil, timeout_ms = nil)
|
13082
|
+
# list_employee_tasks - List Employee Tasks
|
10885
13083
|
url, params = @sdk_configuration.get_server_details
|
10886
13084
|
base_url = Utils.template_url(url, params)
|
10887
13085
|
url = Utils.generate_url(
|
10888
|
-
Models::Operations::
|
13086
|
+
Models::Operations::HrisListEmployeeTasksRequest,
|
10889
13087
|
base_url,
|
10890
|
-
'/unified/hris/employees/{id}/
|
13088
|
+
'/unified/hris/employees/{id}/tasks',
|
10891
13089
|
request
|
10892
13090
|
)
|
10893
13091
|
headers = Utils.get_headers(request)
|
10894
|
-
query_params = Utils.get_query_params(Models::Operations::
|
13092
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeTasksRequest, request)
|
10895
13093
|
headers['Accept'] = 'application/json'
|
10896
13094
|
headers['user-agent'] = @sdk_configuration.user_agent
|
10897
13095
|
retries ||= @sdk_configuration.retry_config
|
@@ -10919,7 +13117,7 @@ module StackOne
|
|
10919
13117
|
hook_ctx = SDKHooks::HookContext.new(
|
10920
13118
|
base_url: base_url,
|
10921
13119
|
oauth2_scopes: [],
|
10922
|
-
operation_id: '
|
13120
|
+
operation_id: 'hris_list_employee_tasks',
|
10923
13121
|
security_source: @sdk_configuration.security_source
|
10924
13122
|
)
|
10925
13123
|
|
@@ -10976,12 +13174,12 @@ module StackOne
|
|
10976
13174
|
),
|
10977
13175
|
response: http_response
|
10978
13176
|
)
|
10979
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
10980
|
-
response = Models::Operations::
|
13177
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TasksPaginated)
|
13178
|
+
response = Models::Operations::HrisListEmployeeTasksResponse.new(
|
10981
13179
|
status_code: http_response.status,
|
10982
13180
|
content_type: content_type,
|
10983
13181
|
raw_response: http_response,
|
10984
|
-
|
13182
|
+
tasks_paginated: obj
|
10985
13183
|
)
|
10986
13184
|
|
10987
13185
|
return response
|
@@ -11155,19 +13353,19 @@ module StackOne
|
|
11155
13353
|
end
|
11156
13354
|
|
11157
13355
|
|
11158
|
-
sig { params(request: T.nilable(Models::Operations::
|
11159
|
-
def
|
11160
|
-
#
|
13356
|
+
sig { params(request: T.nilable(Models::Operations::HrisListEmployeeTimeOffBalancesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeTimeOffBalancesResponse) }
|
13357
|
+
def list_employee_time_off_balances(request, retries = nil, timeout_ms = nil)
|
13358
|
+
# list_employee_time_off_balances - List Employee Time Off Balances
|
11161
13359
|
url, params = @sdk_configuration.get_server_details
|
11162
13360
|
base_url = Utils.template_url(url, params)
|
11163
13361
|
url = Utils.generate_url(
|
11164
|
-
Models::Operations::
|
13362
|
+
Models::Operations::HrisListEmployeeTimeOffBalancesRequest,
|
11165
13363
|
base_url,
|
11166
|
-
'/unified/hris/employees/{id}/
|
13364
|
+
'/unified/hris/employees/{id}/time_off_balances',
|
11167
13365
|
request
|
11168
13366
|
)
|
11169
13367
|
headers = Utils.get_headers(request)
|
11170
|
-
query_params = Utils.get_query_params(Models::Operations::
|
13368
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeTimeOffBalancesRequest, request)
|
11171
13369
|
headers['Accept'] = 'application/json'
|
11172
13370
|
headers['user-agent'] = @sdk_configuration.user_agent
|
11173
13371
|
retries ||= @sdk_configuration.retry_config
|
@@ -11195,7 +13393,7 @@ module StackOne
|
|
11195
13393
|
hook_ctx = SDKHooks::HookContext.new(
|
11196
13394
|
base_url: base_url,
|
11197
13395
|
oauth2_scopes: [],
|
11198
|
-
operation_id: '
|
13396
|
+
operation_id: 'hris_list_employee_time_off_balances',
|
11199
13397
|
security_source: @sdk_configuration.security_source
|
11200
13398
|
)
|
11201
13399
|
|
@@ -11252,12 +13450,12 @@ module StackOne
|
|
11252
13450
|
),
|
11253
13451
|
response: http_response
|
11254
13452
|
)
|
11255
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
11256
|
-
response = Models::Operations::
|
13453
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffBalancesPaginated)
|
13454
|
+
response = Models::Operations::HrisListEmployeeTimeOffBalancesResponse.new(
|
11257
13455
|
status_code: http_response.status,
|
11258
13456
|
content_type: content_type,
|
11259
13457
|
raw_response: http_response,
|
11260
|
-
|
13458
|
+
time_off_balances_paginated: obj
|
11261
13459
|
)
|
11262
13460
|
|
11263
13461
|
return response
|
@@ -11431,19 +13629,19 @@ module StackOne
|
|
11431
13629
|
end
|
11432
13630
|
|
11433
13631
|
|
11434
|
-
sig { params(request: T.nilable(Models::Operations::
|
11435
|
-
def
|
11436
|
-
#
|
13632
|
+
sig { params(request: T.nilable(Models::Operations::HrisListEmployeeTimeOffPoliciesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeTimeOffPoliciesResponse) }
|
13633
|
+
def list_employee_time_off_policies(request, retries = nil, timeout_ms = nil)
|
13634
|
+
# list_employee_time_off_policies - List Assigned Time Off Policies
|
11437
13635
|
url, params = @sdk_configuration.get_server_details
|
11438
13636
|
base_url = Utils.template_url(url, params)
|
11439
13637
|
url = Utils.generate_url(
|
11440
|
-
Models::Operations::
|
13638
|
+
Models::Operations::HrisListEmployeeTimeOffPoliciesRequest,
|
11441
13639
|
base_url,
|
11442
|
-
'/unified/hris/employees/{id}/
|
13640
|
+
'/unified/hris/employees/{id}/time_off_policies',
|
11443
13641
|
request
|
11444
13642
|
)
|
11445
13643
|
headers = Utils.get_headers(request)
|
11446
|
-
query_params = Utils.get_query_params(Models::Operations::
|
13644
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeTimeOffPoliciesRequest, request)
|
11447
13645
|
headers['Accept'] = 'application/json'
|
11448
13646
|
headers['user-agent'] = @sdk_configuration.user_agent
|
11449
13647
|
retries ||= @sdk_configuration.retry_config
|
@@ -11471,7 +13669,7 @@ module StackOne
|
|
11471
13669
|
hook_ctx = SDKHooks::HookContext.new(
|
11472
13670
|
base_url: base_url,
|
11473
13671
|
oauth2_scopes: [],
|
11474
|
-
operation_id: '
|
13672
|
+
operation_id: 'hris_list_employee_time_off_policies',
|
11475
13673
|
security_source: @sdk_configuration.security_source
|
11476
13674
|
)
|
11477
13675
|
|
@@ -11528,12 +13726,12 @@ module StackOne
|
|
11528
13726
|
),
|
11529
13727
|
response: http_response
|
11530
13728
|
)
|
11531
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
11532
|
-
response = Models::Operations::
|
13729
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffPoliciesPaginated)
|
13730
|
+
response = Models::Operations::HrisListEmployeeTimeOffPoliciesResponse.new(
|
11533
13731
|
status_code: http_response.status,
|
11534
13732
|
content_type: content_type,
|
11535
13733
|
raw_response: http_response,
|
11536
|
-
|
13734
|
+
time_off_policies_paginated: obj
|
11537
13735
|
)
|
11538
13736
|
|
11539
13737
|
return response
|
@@ -11707,19 +13905,19 @@ module StackOne
|
|
11707
13905
|
end
|
11708
13906
|
|
11709
13907
|
|
11710
|
-
sig { params(request: T.nilable(Models::Operations::
|
11711
|
-
def
|
11712
|
-
#
|
13908
|
+
sig { params(request: T.nilable(Models::Operations::HrisListEmployeeTimeOffRequestsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeTimeOffRequestsResponse) }
|
13909
|
+
def list_employee_time_off_requests(request, retries = nil, timeout_ms = nil)
|
13910
|
+
# list_employee_time_off_requests - List Employee Time Off Requests
|
11713
13911
|
url, params = @sdk_configuration.get_server_details
|
11714
13912
|
base_url = Utils.template_url(url, params)
|
11715
13913
|
url = Utils.generate_url(
|
11716
|
-
Models::Operations::
|
13914
|
+
Models::Operations::HrisListEmployeeTimeOffRequestsRequest,
|
11717
13915
|
base_url,
|
11718
|
-
'/unified/hris/employees/{id}/
|
13916
|
+
'/unified/hris/employees/{id}/time_off',
|
11719
13917
|
request
|
11720
13918
|
)
|
11721
13919
|
headers = Utils.get_headers(request)
|
11722
|
-
query_params = Utils.get_query_params(Models::Operations::
|
13920
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeTimeOffRequestsRequest, request)
|
11723
13921
|
headers['Accept'] = 'application/json'
|
11724
13922
|
headers['user-agent'] = @sdk_configuration.user_agent
|
11725
13923
|
retries ||= @sdk_configuration.retry_config
|
@@ -11747,7 +13945,7 @@ module StackOne
|
|
11747
13945
|
hook_ctx = SDKHooks::HookContext.new(
|
11748
13946
|
base_url: base_url,
|
11749
13947
|
oauth2_scopes: [],
|
11750
|
-
operation_id: '
|
13948
|
+
operation_id: 'hris_list_employee_time_off_requests',
|
11751
13949
|
security_source: @sdk_configuration.security_source
|
11752
13950
|
)
|
11753
13951
|
|
@@ -11804,12 +14002,12 @@ module StackOne
|
|
11804
14002
|
),
|
11805
14003
|
response: http_response
|
11806
14004
|
)
|
11807
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
11808
|
-
response = Models::Operations::
|
14005
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffPaginated)
|
14006
|
+
response = Models::Operations::HrisListEmployeeTimeOffRequestsResponse.new(
|
11809
14007
|
status_code: http_response.status,
|
11810
14008
|
content_type: content_type,
|
11811
14009
|
raw_response: http_response,
|
11812
|
-
|
14010
|
+
time_off_paginated: obj
|
11813
14011
|
)
|
11814
14012
|
|
11815
14013
|
return response
|
@@ -11983,19 +14181,19 @@ module StackOne
|
|
11983
14181
|
end
|
11984
14182
|
|
11985
14183
|
|
11986
|
-
sig { params(request: T.nilable(Models::Operations::
|
11987
|
-
def
|
11988
|
-
#
|
14184
|
+
sig { params(request: T.nilable(Models::Operations::HrisListEmployeeWorkEligibilityRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeWorkEligibilityResponse) }
|
14185
|
+
def list_employee_work_eligibility(request, retries = nil, timeout_ms = nil)
|
14186
|
+
# list_employee_work_eligibility - List Employee Work Eligibility
|
11989
14187
|
url, params = @sdk_configuration.get_server_details
|
11990
14188
|
base_url = Utils.template_url(url, params)
|
11991
14189
|
url = Utils.generate_url(
|
11992
|
-
Models::Operations::
|
14190
|
+
Models::Operations::HrisListEmployeeWorkEligibilityRequest,
|
11993
14191
|
base_url,
|
11994
|
-
'/unified/hris/employees/{id}/
|
14192
|
+
'/unified/hris/employees/{id}/work_eligibility',
|
11995
14193
|
request
|
11996
14194
|
)
|
11997
14195
|
headers = Utils.get_headers(request)
|
11998
|
-
query_params = Utils.get_query_params(Models::Operations::
|
14196
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeWorkEligibilityRequest, request)
|
11999
14197
|
headers['Accept'] = 'application/json'
|
12000
14198
|
headers['user-agent'] = @sdk_configuration.user_agent
|
12001
14199
|
retries ||= @sdk_configuration.retry_config
|
@@ -12023,7 +14221,7 @@ module StackOne
|
|
12023
14221
|
hook_ctx = SDKHooks::HookContext.new(
|
12024
14222
|
base_url: base_url,
|
12025
14223
|
oauth2_scopes: [],
|
12026
|
-
operation_id: '
|
14224
|
+
operation_id: 'hris_list_employee_work_eligibility',
|
12027
14225
|
security_source: @sdk_configuration.security_source
|
12028
14226
|
)
|
12029
14227
|
|
@@ -12080,12 +14278,12 @@ module StackOne
|
|
12080
14278
|
),
|
12081
14279
|
response: http_response
|
12082
14280
|
)
|
12083
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
12084
|
-
response = Models::Operations::
|
14281
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::WorkEligibilityPaginated)
|
14282
|
+
response = Models::Operations::HrisListEmployeeWorkEligibilityResponse.new(
|
12085
14283
|
status_code: http_response.status,
|
12086
14284
|
content_type: content_type,
|
12087
14285
|
raw_response: http_response,
|
12088
|
-
|
14286
|
+
work_eligibility_paginated: obj
|
12089
14287
|
)
|
12090
14288
|
|
12091
14289
|
return response
|
@@ -12259,19 +14457,14 @@ module StackOne
|
|
12259
14457
|
end
|
12260
14458
|
|
12261
14459
|
|
12262
|
-
sig { params(request: T.nilable(Models::Operations::
|
12263
|
-
def
|
12264
|
-
#
|
14460
|
+
sig { params(request: T.nilable(Models::Operations::HrisListEmployeesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeesResponse) }
|
14461
|
+
def list_employees(request, retries = nil, timeout_ms = nil)
|
14462
|
+
# list_employees - List Employees
|
12265
14463
|
url, params = @sdk_configuration.get_server_details
|
12266
14464
|
base_url = Utils.template_url(url, params)
|
12267
|
-
url =
|
12268
|
-
Models::Operations::HrisListEmployeeTimeOffRequestsRequest,
|
12269
|
-
base_url,
|
12270
|
-
'/unified/hris/employees/{id}/time_off',
|
12271
|
-
request
|
12272
|
-
)
|
14465
|
+
url = "#{base_url}/unified/hris/employees"
|
12273
14466
|
headers = Utils.get_headers(request)
|
12274
|
-
query_params = Utils.get_query_params(Models::Operations::
|
14467
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListEmployeesRequest, request)
|
12275
14468
|
headers['Accept'] = 'application/json'
|
12276
14469
|
headers['user-agent'] = @sdk_configuration.user_agent
|
12277
14470
|
retries ||= @sdk_configuration.retry_config
|
@@ -12299,7 +14492,7 @@ module StackOne
|
|
12299
14492
|
hook_ctx = SDKHooks::HookContext.new(
|
12300
14493
|
base_url: base_url,
|
12301
14494
|
oauth2_scopes: [],
|
12302
|
-
operation_id: '
|
14495
|
+
operation_id: 'hris_list_employees',
|
12303
14496
|
security_source: @sdk_configuration.security_source
|
12304
14497
|
)
|
12305
14498
|
|
@@ -12356,12 +14549,12 @@ module StackOne
|
|
12356
14549
|
),
|
12357
14550
|
response: http_response
|
12358
14551
|
)
|
12359
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
12360
|
-
response = Models::Operations::
|
14552
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EmployeesPaginated)
|
14553
|
+
response = Models::Operations::HrisListEmployeesResponse.new(
|
12361
14554
|
status_code: http_response.status,
|
12362
14555
|
content_type: content_type,
|
12363
14556
|
raw_response: http_response,
|
12364
|
-
|
14557
|
+
employees_paginated: obj
|
12365
14558
|
)
|
12366
14559
|
|
12367
14560
|
return response
|
@@ -12535,19 +14728,14 @@ module StackOne
|
|
12535
14728
|
end
|
12536
14729
|
|
12537
14730
|
|
12538
|
-
sig { params(request: T.nilable(Models::Operations::
|
12539
|
-
def
|
12540
|
-
#
|
14731
|
+
sig { params(request: T.nilable(Models::Operations::HrisListEmploymentsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmploymentsResponse) }
|
14732
|
+
def list_employments(request, retries = nil, timeout_ms = nil)
|
14733
|
+
# list_employments - List Employments
|
12541
14734
|
url, params = @sdk_configuration.get_server_details
|
12542
14735
|
base_url = Utils.template_url(url, params)
|
12543
|
-
url =
|
12544
|
-
Models::Operations::HrisListEmployeeWorkEligibilityRequest,
|
12545
|
-
base_url,
|
12546
|
-
'/unified/hris/employees/{id}/work_eligibility',
|
12547
|
-
request
|
12548
|
-
)
|
14736
|
+
url = "#{base_url}/unified/hris/employments"
|
12549
14737
|
headers = Utils.get_headers(request)
|
12550
|
-
query_params = Utils.get_query_params(Models::Operations::
|
14738
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListEmploymentsRequest, request)
|
12551
14739
|
headers['Accept'] = 'application/json'
|
12552
14740
|
headers['user-agent'] = @sdk_configuration.user_agent
|
12553
14741
|
retries ||= @sdk_configuration.retry_config
|
@@ -12575,7 +14763,7 @@ module StackOne
|
|
12575
14763
|
hook_ctx = SDKHooks::HookContext.new(
|
12576
14764
|
base_url: base_url,
|
12577
14765
|
oauth2_scopes: [],
|
12578
|
-
operation_id: '
|
14766
|
+
operation_id: 'hris_list_employments',
|
12579
14767
|
security_source: @sdk_configuration.security_source
|
12580
14768
|
)
|
12581
14769
|
|
@@ -12632,12 +14820,12 @@ module StackOne
|
|
12632
14820
|
),
|
12633
14821
|
response: http_response
|
12634
14822
|
)
|
12635
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
12636
|
-
response = Models::Operations::
|
14823
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EmploymentsPaginated)
|
14824
|
+
response = Models::Operations::HrisListEmploymentsResponse.new(
|
12637
14825
|
status_code: http_response.status,
|
12638
14826
|
content_type: content_type,
|
12639
14827
|
raw_response: http_response,
|
12640
|
-
|
14828
|
+
employments_paginated: obj
|
12641
14829
|
)
|
12642
14830
|
|
12643
14831
|
return response
|
@@ -12811,14 +14999,14 @@ module StackOne
|
|
12811
14999
|
end
|
12812
15000
|
|
12813
15001
|
|
12814
|
-
sig { params(request: T.nilable(Models::Operations::
|
12815
|
-
def
|
12816
|
-
#
|
15002
|
+
sig { params(request: T.nilable(Models::Operations::HrisListGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListGroupsResponse) }
|
15003
|
+
def list_groups(request, retries = nil, timeout_ms = nil)
|
15004
|
+
# list_groups - List Groups
|
12817
15005
|
url, params = @sdk_configuration.get_server_details
|
12818
15006
|
base_url = Utils.template_url(url, params)
|
12819
|
-
url = "#{base_url}/unified/hris/
|
15007
|
+
url = "#{base_url}/unified/hris/groups"
|
12820
15008
|
headers = Utils.get_headers(request)
|
12821
|
-
query_params = Utils.get_query_params(Models::Operations::
|
15009
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListGroupsRequest, request)
|
12822
15010
|
headers['Accept'] = 'application/json'
|
12823
15011
|
headers['user-agent'] = @sdk_configuration.user_agent
|
12824
15012
|
retries ||= @sdk_configuration.retry_config
|
@@ -12846,7 +15034,7 @@ module StackOne
|
|
12846
15034
|
hook_ctx = SDKHooks::HookContext.new(
|
12847
15035
|
base_url: base_url,
|
12848
15036
|
oauth2_scopes: [],
|
12849
|
-
operation_id: '
|
15037
|
+
operation_id: 'hris_list_groups',
|
12850
15038
|
security_source: @sdk_configuration.security_source
|
12851
15039
|
)
|
12852
15040
|
|
@@ -12903,12 +15091,12 @@ module StackOne
|
|
12903
15091
|
),
|
12904
15092
|
response: http_response
|
12905
15093
|
)
|
12906
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
12907
|
-
response = Models::Operations::
|
15094
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISGroupsPaginated)
|
15095
|
+
response = Models::Operations::HrisListGroupsResponse.new(
|
12908
15096
|
status_code: http_response.status,
|
12909
15097
|
content_type: content_type,
|
12910
15098
|
raw_response: http_response,
|
12911
|
-
|
15099
|
+
hris_groups_paginated: obj
|
12912
15100
|
)
|
12913
15101
|
|
12914
15102
|
return response
|
@@ -13082,14 +15270,14 @@ module StackOne
|
|
13082
15270
|
end
|
13083
15271
|
|
13084
15272
|
|
13085
|
-
sig { params(request: T.nilable(Models::Operations::
|
13086
|
-
def
|
13087
|
-
#
|
15273
|
+
sig { params(request: T.nilable(Models::Operations::HrisListJobsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListJobsResponse) }
|
15274
|
+
def list_jobs(request, retries = nil, timeout_ms = nil)
|
15275
|
+
# list_jobs - List Jobs
|
13088
15276
|
url, params = @sdk_configuration.get_server_details
|
13089
15277
|
base_url = Utils.template_url(url, params)
|
13090
|
-
url = "#{base_url}/unified/hris/
|
15278
|
+
url = "#{base_url}/unified/hris/jobs"
|
13091
15279
|
headers = Utils.get_headers(request)
|
13092
|
-
query_params = Utils.get_query_params(Models::Operations::
|
15280
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListJobsRequest, request)
|
13093
15281
|
headers['Accept'] = 'application/json'
|
13094
15282
|
headers['user-agent'] = @sdk_configuration.user_agent
|
13095
15283
|
retries ||= @sdk_configuration.retry_config
|
@@ -13117,7 +15305,7 @@ module StackOne
|
|
13117
15305
|
hook_ctx = SDKHooks::HookContext.new(
|
13118
15306
|
base_url: base_url,
|
13119
15307
|
oauth2_scopes: [],
|
13120
|
-
operation_id: '
|
15308
|
+
operation_id: 'hris_list_jobs',
|
13121
15309
|
security_source: @sdk_configuration.security_source
|
13122
15310
|
)
|
13123
15311
|
|
@@ -13174,12 +15362,12 @@ module StackOne
|
|
13174
15362
|
),
|
13175
15363
|
response: http_response
|
13176
15364
|
)
|
13177
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
13178
|
-
response = Models::Operations::
|
15365
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::JobsPaginated)
|
15366
|
+
response = Models::Operations::HrisListJobsResponse.new(
|
13179
15367
|
status_code: http_response.status,
|
13180
15368
|
content_type: content_type,
|
13181
15369
|
raw_response: http_response,
|
13182
|
-
|
15370
|
+
jobs_paginated: obj
|
13183
15371
|
)
|
13184
15372
|
|
13185
15373
|
return response
|
@@ -13353,14 +15541,14 @@ module StackOne
|
|
13353
15541
|
end
|
13354
15542
|
|
13355
15543
|
|
13356
|
-
sig { params(request: T.nilable(Models::Operations::
|
13357
|
-
def
|
13358
|
-
#
|
15544
|
+
sig { params(request: T.nilable(Models::Operations::HrisListLocationsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListLocationsResponse) }
|
15545
|
+
def list_locations(request, retries = nil, timeout_ms = nil)
|
15546
|
+
# list_locations - List Work Locations
|
13359
15547
|
url, params = @sdk_configuration.get_server_details
|
13360
15548
|
base_url = Utils.template_url(url, params)
|
13361
|
-
url = "#{base_url}/unified/hris/
|
15549
|
+
url = "#{base_url}/unified/hris/locations"
|
13362
15550
|
headers = Utils.get_headers(request)
|
13363
|
-
query_params = Utils.get_query_params(Models::Operations::
|
15551
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListLocationsRequest, request)
|
13364
15552
|
headers['Accept'] = 'application/json'
|
13365
15553
|
headers['user-agent'] = @sdk_configuration.user_agent
|
13366
15554
|
retries ||= @sdk_configuration.retry_config
|
@@ -13388,7 +15576,7 @@ module StackOne
|
|
13388
15576
|
hook_ctx = SDKHooks::HookContext.new(
|
13389
15577
|
base_url: base_url,
|
13390
15578
|
oauth2_scopes: [],
|
13391
|
-
operation_id: '
|
15579
|
+
operation_id: 'hris_list_locations',
|
13392
15580
|
security_source: @sdk_configuration.security_source
|
13393
15581
|
)
|
13394
15582
|
|
@@ -13445,12 +15633,12 @@ module StackOne
|
|
13445
15633
|
),
|
13446
15634
|
response: http_response
|
13447
15635
|
)
|
13448
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
13449
|
-
response = Models::Operations::
|
15636
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISLocationsPaginated)
|
15637
|
+
response = Models::Operations::HrisListLocationsResponse.new(
|
13450
15638
|
status_code: http_response.status,
|
13451
15639
|
content_type: content_type,
|
13452
15640
|
raw_response: http_response,
|
13453
|
-
|
15641
|
+
hris_locations_paginated: obj
|
13454
15642
|
)
|
13455
15643
|
|
13456
15644
|
return response
|
@@ -13624,14 +15812,14 @@ module StackOne
|
|
13624
15812
|
end
|
13625
15813
|
|
13626
15814
|
|
13627
|
-
sig { params(request: T.nilable(Models::Operations::
|
13628
|
-
def
|
13629
|
-
#
|
15815
|
+
sig { params(request: T.nilable(Models::Operations::HrisListPositionsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListPositionsResponse) }
|
15816
|
+
def list_positions(request, retries = nil, timeout_ms = nil)
|
15817
|
+
# list_positions - List Positions
|
13630
15818
|
url, params = @sdk_configuration.get_server_details
|
13631
15819
|
base_url = Utils.template_url(url, params)
|
13632
|
-
url = "#{base_url}/unified/hris/
|
15820
|
+
url = "#{base_url}/unified/hris/positions"
|
13633
15821
|
headers = Utils.get_headers(request)
|
13634
|
-
query_params = Utils.get_query_params(Models::Operations::
|
15822
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListPositionsRequest, request)
|
13635
15823
|
headers['Accept'] = 'application/json'
|
13636
15824
|
headers['user-agent'] = @sdk_configuration.user_agent
|
13637
15825
|
retries ||= @sdk_configuration.retry_config
|
@@ -13659,7 +15847,7 @@ module StackOne
|
|
13659
15847
|
hook_ctx = SDKHooks::HookContext.new(
|
13660
15848
|
base_url: base_url,
|
13661
15849
|
oauth2_scopes: [],
|
13662
|
-
operation_id: '
|
15850
|
+
operation_id: 'hris_list_positions',
|
13663
15851
|
security_source: @sdk_configuration.security_source
|
13664
15852
|
)
|
13665
15853
|
|
@@ -13716,12 +15904,12 @@ module StackOne
|
|
13716
15904
|
),
|
13717
15905
|
response: http_response
|
13718
15906
|
)
|
13719
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
13720
|
-
response = Models::Operations::
|
15907
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::PositionsPaginated)
|
15908
|
+
response = Models::Operations::HrisListPositionsResponse.new(
|
13721
15909
|
status_code: http_response.status,
|
13722
15910
|
content_type: content_type,
|
13723
15911
|
raw_response: http_response,
|
13724
|
-
|
15912
|
+
positions_paginated: obj
|
13725
15913
|
)
|
13726
15914
|
|
13727
15915
|
return response
|
@@ -13895,14 +16083,14 @@ module StackOne
|
|
13895
16083
|
end
|
13896
16084
|
|
13897
16085
|
|
13898
|
-
sig { params(request: T.nilable(Models::Operations::
|
13899
|
-
def
|
13900
|
-
#
|
16086
|
+
sig { params(request: T.nilable(Models::Operations::HrisListTasksRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListTasksResponse) }
|
16087
|
+
def list_tasks(request, retries = nil, timeout_ms = nil)
|
16088
|
+
# list_tasks - List Tasks
|
13901
16089
|
url, params = @sdk_configuration.get_server_details
|
13902
16090
|
base_url = Utils.template_url(url, params)
|
13903
|
-
url = "#{base_url}/unified/hris/
|
16091
|
+
url = "#{base_url}/unified/hris/tasks"
|
13904
16092
|
headers = Utils.get_headers(request)
|
13905
|
-
query_params = Utils.get_query_params(Models::Operations::
|
16093
|
+
query_params = Utils.get_query_params(Models::Operations::HrisListTasksRequest, request)
|
13906
16094
|
headers['Accept'] = 'application/json'
|
13907
16095
|
headers['user-agent'] = @sdk_configuration.user_agent
|
13908
16096
|
retries ||= @sdk_configuration.retry_config
|
@@ -13930,7 +16118,7 @@ module StackOne
|
|
13930
16118
|
hook_ctx = SDKHooks::HookContext.new(
|
13931
16119
|
base_url: base_url,
|
13932
16120
|
oauth2_scopes: [],
|
13933
|
-
operation_id: '
|
16121
|
+
operation_id: 'hris_list_tasks',
|
13934
16122
|
security_source: @sdk_configuration.security_source
|
13935
16123
|
)
|
13936
16124
|
|
@@ -13987,12 +16175,12 @@ module StackOne
|
|
13987
16175
|
),
|
13988
16176
|
response: http_response
|
13989
16177
|
)
|
13990
|
-
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::
|
13991
|
-
response = Models::Operations::
|
16178
|
+
obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TasksPaginated)
|
16179
|
+
response = Models::Operations::HrisListTasksResponse.new(
|
13992
16180
|
status_code: http_response.status,
|
13993
16181
|
content_type: content_type,
|
13994
16182
|
raw_response: http_response,
|
13995
|
-
|
16183
|
+
tasks_paginated: obj
|
13996
16184
|
)
|
13997
16185
|
|
13998
16186
|
return response
|