stackone_client 0.25.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stack_one/ats.rb +786 -239
  3. data/lib/stack_one/hris.rb +2634 -446
  4. data/lib/stack_one/models/operations/ats_get_application_document_category_request.rb +49 -0
  5. data/lib/stack_one/models/operations/ats_get_application_document_category_response.rb +49 -0
  6. data/lib/stack_one/models/operations/ats_list_application_document_categories_queryparam_filter.rb +33 -0
  7. data/lib/stack_one/models/operations/ats_list_application_document_categories_request.rb +69 -0
  8. data/lib/stack_one/models/operations/ats_list_application_document_categories_response.rb +49 -0
  9. data/lib/stack_one/models/operations/hris_get_company_group_request.rb +49 -0
  10. data/lib/stack_one/models/operations/hris_get_company_group_response.rb +49 -0
  11. data/lib/stack_one/models/operations/hris_get_division_group_request.rb +49 -0
  12. data/lib/stack_one/models/operations/hris_get_division_group_response.rb +49 -0
  13. data/lib/stack_one/models/operations/hris_get_shift_request.rb +49 -0
  14. data/lib/stack_one/models/operations/hris_get_shift_response.rb +49 -0
  15. data/lib/stack_one/models/operations/hris_get_task_request.rb +53 -0
  16. data/lib/stack_one/models/operations/hris_get_task_response.rb +49 -0
  17. data/lib/stack_one/models/operations/hris_list_companies_groups_queryparam_filter.rb +33 -0
  18. data/lib/stack_one/models/operations/hris_list_companies_groups_request.rb +69 -0
  19. data/lib/stack_one/models/operations/hris_list_companies_groups_response.rb +49 -0
  20. data/lib/stack_one/models/operations/hris_list_division_groups_queryparam_filter.rb +33 -0
  21. data/lib/stack_one/models/operations/hris_list_division_groups_request.rb +69 -0
  22. data/lib/stack_one/models/operations/hris_list_division_groups_response.rb +49 -0
  23. data/lib/stack_one/models/operations/hris_list_shifts_queryparam_filter.rb +49 -0
  24. data/lib/stack_one/models/operations/hris_list_shifts_queryparam_status.rb +23 -0
  25. data/lib/stack_one/models/operations/hris_list_shifts_request.rb +69 -0
  26. data/lib/stack_one/models/operations/hris_list_shifts_response.rb +49 -0
  27. data/lib/stack_one/models/operations/hris_list_tasks_queryparam_filter.rb +33 -0
  28. data/lib/stack_one/models/operations/hris_list_tasks_request.rb +73 -0
  29. data/lib/stack_one/models/operations/hris_list_tasks_response.rb +49 -0
  30. data/lib/stack_one/models/operations.rb +26 -0
  31. data/lib/stack_one/models/shared/approval_status.rb +37 -0
  32. data/lib/stack_one/models/shared/data.rb +81 -0
  33. data/lib/stack_one/models/shared/hrisdivision.rb +73 -0
  34. data/lib/stack_one/models/shared/hrisdivision_4.rb +28 -0
  35. data/lib/stack_one/models/shared/hrisdivision_source_value.rb +28 -0
  36. data/lib/stack_one/models/shared/hrisdivision_type.rb +37 -0
  37. data/lib/stack_one/models/shared/hrisdivision_value.rb +26 -0
  38. data/lib/stack_one/models/shared/hrisdivisionspaginated.rb +45 -0
  39. data/lib/stack_one/models/shared/hrisdivisionsresult.rb +37 -0
  40. data/lib/stack_one/models/shared/hrisshift.rb +81 -0
  41. data/lib/stack_one/models/shared/hrisshift_4.rb +28 -0
  42. data/lib/stack_one/models/shared/hrisshift_schemas_4.rb +28 -0
  43. data/lib/stack_one/models/shared/hrisshift_schemas_source_value.rb +28 -0
  44. data/lib/stack_one/models/shared/hrisshift_schemas_value.rb +23 -0
  45. data/lib/stack_one/models/shared/hrisshift_source_value.rb +28 -0
  46. data/lib/stack_one/models/shared/hrisshift_status.rb +37 -0
  47. data/lib/stack_one/models/shared/hrisshift_value.rb +22 -0
  48. data/lib/stack_one/models/shared/hrisshiftresult.rb +37 -0
  49. data/lib/stack_one/models/shared/hrisshiftresult_4.rb +28 -0
  50. data/lib/stack_one/models/shared/hrisshiftresult_approval_status.rb +37 -0
  51. data/lib/stack_one/models/shared/hrisshiftresult_schemas_4.rb +28 -0
  52. data/lib/stack_one/models/shared/hrisshiftresult_schemas_source_value.rb +28 -0
  53. data/lib/stack_one/models/shared/hrisshiftresult_schemas_value.rb +23 -0
  54. data/lib/stack_one/models/shared/hrisshiftresult_source_value.rb +28 -0
  55. data/lib/stack_one/models/shared/hrisshiftresult_status.rb +37 -0
  56. data/lib/stack_one/models/shared/hrisshiftresult_value.rb +22 -0
  57. data/lib/stack_one/models/shared/hrisshiftspaginated.rb +41 -0
  58. data/lib/stack_one/models/shared/shiftbreak.rb +57 -0
  59. data/lib/stack_one/models/shared.rb +28 -0
  60. data/lib/stack_one/sdkconfiguration.rb +2 -2
  61. metadata +56 -2
@@ -2887,19 +2887,19 @@ module StackOne
2887
2887
  end
2888
2888
 
2889
2889
 
2890
- sig { params(request: T.nilable(Models::Operations::HrisGetCostCenterGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetCostCenterGroupResponse) }
2891
- def get_cost_center_group(request, retries = nil, timeout_ms = nil)
2892
- # get_cost_center_group - Get Cost Center Group
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::HrisGetCostCenterGroupRequest,
2896
+ Models::Operations::HrisGetCompanyGroupRequest,
2897
2897
  base_url,
2898
- '/unified/hris/groups/cost_centers/{id}',
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::HrisGetCostCenterGroupRequest, request)
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: 'hris_get_cost_center_group',
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::HRISCostCenterResult)
2988
- response = Models::Operations::HrisGetCostCenterGroupResponse.new(
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
- hris_cost_center_result: obj
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::HrisGetDepartmentGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetDepartmentGroupResponse) }
3167
- def get_department_group(request, retries = nil, timeout_ms = nil)
3168
- # get_department_group - Get Department Group
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::HrisGetDepartmentGroupRequest,
3172
+ Models::Operations::HrisGetCostCenterGroupRequest,
3173
3173
  base_url,
3174
- '/unified/hris/groups/departments/{id}',
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::HrisGetDepartmentGroupRequest, request)
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: 'hris_get_department_group',
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::HRISDepartmentsResult)
3264
- response = Models::Operations::HrisGetDepartmentGroupResponse.new(
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
- hris_departments_result: obj
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::HrisGetEmployeeRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeResponse) }
3443
- def get_employee(request, retries = nil, timeout_ms = nil)
3444
- # get_employee - Get Employee
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::HrisGetEmployeeRequest,
3448
+ Models::Operations::HrisGetDepartmentGroupRequest,
3449
3449
  base_url,
3450
- '/unified/hris/employees/{id}',
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::HrisGetEmployeeRequest, request)
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: 'hris_get_employee',
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::EmployeeResult)
3540
- response = Models::Operations::HrisGetEmployeeResponse.new(
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
- employee_result: obj
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::HrisGetEmployeeCustomFieldDefinitionRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeCustomFieldDefinitionResponse) }
3719
- def get_employee_custom_field_definition(request, retries = nil, timeout_ms = nil)
3720
- # get_employee_custom_field_definition - Get employee Custom Field Definition
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::HrisGetEmployeeCustomFieldDefinitionRequest,
3724
+ Models::Operations::HrisGetDivisionGroupRequest,
3725
3725
  base_url,
3726
- '/unified/hris/custom_field_definitions/employees/{id}',
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::HrisGetEmployeeCustomFieldDefinitionRequest, request)
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: 'hris_get_employee_custom_field_definition',
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::CustomFieldDefinitionResultApiModel)
3816
- response = Models::Operations::HrisGetEmployeeCustomFieldDefinitionResponse.new(
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
- custom_field_definition_result_api_model: obj
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::HrisGetEmployeeDocumentRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeDocumentResponse) }
3995
- def get_employee_document(request, retries = nil, timeout_ms = nil)
3996
- # get_employee_document - Get Employee Document
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::HrisGetEmployeeDocumentRequest,
4000
+ Models::Operations::HrisGetEmployeeRequest,
4001
4001
  base_url,
4002
- '/unified/hris/employees/{id}/documents/{subResourceId}',
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::HrisGetEmployeeDocumentRequest, request)
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: 'hris_get_employee_document',
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::HrisDocumentResult)
4092
- response = Models::Operations::HrisGetEmployeeDocumentResponse.new(
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
- hris_document_result: obj
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::HrisGetEmployeeDocumentCategoryRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeDocumentCategoryResponse) }
4271
- def get_employee_document_category(request, retries = nil, timeout_ms = nil)
4272
- # get_employee_document_category - Get Employee Document Category
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::HrisGetEmployeeDocumentCategoryRequest,
4276
+ Models::Operations::HrisGetEmployeeCustomFieldDefinitionRequest,
4277
4277
  base_url,
4278
- '/unified/hris/documents/employee_categories/{id}',
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::HrisGetEmployeeDocumentCategoryRequest, request)
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: 'hris_get_employee_document_category',
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::ReferenceResult)
4368
- response = Models::Operations::HrisGetEmployeeDocumentCategoryResponse.new(
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
- reference_result: obj
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::HrisGetEmployeeEmploymentRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeEmploymentResponse) }
4547
- def get_employee_employment(request, retries = nil, timeout_ms = nil)
4548
- # get_employee_employment - Get Employee Employment
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::HrisGetEmployeeEmploymentRequest,
4552
+ Models::Operations::HrisGetEmployeeDocumentRequest,
4553
4553
  base_url,
4554
- '/unified/hris/employees/{id}/employments/{subResourceId}',
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::HrisGetEmployeeEmploymentRequest, request)
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: 'hris_get_employee_employment',
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::EmploymentResult)
4644
- response = Models::Operations::HrisGetEmployeeEmploymentResponse.new(
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
- employment_result: obj
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::HrisGetEmployeeSkillRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeSkillResponse) }
4823
- def get_employee_skill(request, retries = nil, timeout_ms = nil)
4824
- # get_employee_skill - Get Employee Skill
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::HrisGetEmployeeSkillRequest,
4828
+ Models::Operations::HrisGetEmployeeDocumentCategoryRequest,
4829
4829
  base_url,
4830
- '/unified/hris/employees/{id}/skills/{subResourceId}',
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::HrisGetEmployeeSkillRequest, request)
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: 'hris_get_employee_skill',
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::EntitySkillResult)
4920
- response = Models::Operations::HrisGetEmployeeSkillResponse.new(
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
- entity_skill_result: obj
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::HrisGetEmployeeTaskRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeTaskResponse) }
5099
- def get_employee_task(request, retries = nil, timeout_ms = nil)
5100
- # get_employee_task - Get Employee Task
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::HrisGetEmployeeTaskRequest,
5104
+ Models::Operations::HrisGetEmployeeEmploymentRequest,
5105
5105
  base_url,
5106
- '/unified/hris/employees/{id}/tasks/{subResourceId}',
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::HrisGetEmployeeTaskRequest, request)
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: 'hris_get_employee_task',
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::TaskResult)
5196
- response = Models::Operations::HrisGetEmployeeTaskResponse.new(
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
- task_result: obj
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::HrisGetEmployeeTimeOffBalanceRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeeTimeOffBalanceResponse) }
5375
- def get_employee_time_off_balance(request, retries = nil, timeout_ms = nil)
5376
- # get_employee_time_off_balance - Get Employee Time Off Balance
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::HrisGetEmployeeTimeOffBalanceRequest,
5380
+ Models::Operations::HrisGetEmployeeSkillRequest,
5381
5381
  base_url,
5382
- '/unified/hris/employees/{id}/time_off_balances/{subResourceId}',
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::HrisGetEmployeeTimeOffBalanceRequest, request)
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: 'hris_get_employee_time_off_balance',
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::TimeOffBalanceResult)
5472
- response = Models::Operations::HrisGetEmployeeTimeOffBalanceResponse.new(
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
- time_off_balance_result: obj
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::HrisGetEmployeesTimeOffRequestRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeesTimeOffRequestResponse) }
5651
- def get_employees_time_off_request(request, retries = nil, timeout_ms = nil)
5652
- # get_employees_time_off_request - Get Employees Time Off Request
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::HrisGetEmployeesTimeOffRequestRequest,
5656
+ Models::Operations::HrisGetEmployeeTaskRequest,
5657
5657
  base_url,
5658
- '/unified/hris/employees/{id}/time_off/{subResourceId}',
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::HrisGetEmployeesTimeOffRequestRequest, request)
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: 'hris_get_employees_time_off_request',
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::TimeOffResult)
5748
- response = Models::Operations::HrisGetEmployeesTimeOffRequestResponse.new(
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
- time_off_result: obj
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::HrisGetEmployeesWorkEligibilityRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmployeesWorkEligibilityResponse) }
5927
- def get_employees_work_eligibility(request, retries = nil, timeout_ms = nil)
5928
- # get_employees_work_eligibility - Get Employees Work Eligibility
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::HrisGetEmployeesWorkEligibilityRequest,
5932
+ Models::Operations::HrisGetEmployeeTimeOffBalanceRequest,
5933
5933
  base_url,
5934
- '/unified/hris/employees/{id}/work_eligibility/{subResourceId}',
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::HrisGetEmployeesWorkEligibilityRequest, request)
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: 'hris_get_employees_work_eligibility',
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::WorkEligibilityResult)
6024
- response = Models::Operations::HrisGetEmployeesWorkEligibilityResponse.new(
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
- work_eligibility_result: obj
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::HrisGetEmploymentRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetEmploymentResponse) }
6203
- def get_employment(request, retries = nil, timeout_ms = nil)
6204
- # get_employment - Get Employment
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::HrisGetEmploymentRequest,
6208
+ Models::Operations::HrisGetEmployeesTimeOffRequestRequest,
6209
6209
  base_url,
6210
- '/unified/hris/employments/{id}',
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::HrisGetEmploymentRequest, request)
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: 'hris_get_employment',
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::EmploymentResult)
6300
- response = Models::Operations::HrisGetEmploymentResponse.new(
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
- employment_result: obj
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::HrisGetGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetGroupResponse) }
6479
- def get_group(request, retries = nil, timeout_ms = nil)
6480
- # get_group - Get Group
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::HrisGetGroupRequest,
6484
+ Models::Operations::HrisGetEmployeesWorkEligibilityRequest,
6485
6485
  base_url,
6486
- '/unified/hris/groups/{id}',
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::HrisGetGroupRequest, request)
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: 'hris_get_group',
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::HRISGroupsResult)
6576
- response = Models::Operations::HrisGetGroupResponse.new(
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
- hris_groups_result: obj
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::HrisGetJobRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetJobResponse) }
6755
- def get_job(request, retries = nil, timeout_ms = nil)
6756
- # get_job - Get Job
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::HrisGetJobRequest,
6760
+ Models::Operations::HrisGetEmploymentRequest,
6761
6761
  base_url,
6762
- '/unified/hris/jobs/{id}',
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::HrisGetJobRequest, request)
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: 'hris_get_job',
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::JobResult)
6852
- response = Models::Operations::HrisGetJobResponse.new(
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
- job_result: obj
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::HrisGetLocationRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetLocationResponse) }
7031
- def get_location(request, retries = nil, timeout_ms = nil)
7032
- # get_location - Get Work Location
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::HrisGetLocationRequest,
7036
+ Models::Operations::HrisGetGroupRequest,
7037
7037
  base_url,
7038
- '/unified/hris/locations/{id}',
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::HrisGetLocationRequest, request)
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: 'hris_get_location',
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::HRISLocationResult)
7128
- response = Models::Operations::HrisGetLocationResponse.new(
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
- hris_location_result: obj
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::HrisGetPositionRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetPositionResponse) }
7307
- def get_position(request, retries = nil, timeout_ms = nil)
7308
- # get_position - Get Position
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::HrisGetPositionRequest,
7312
+ Models::Operations::HrisGetJobRequest,
7313
7313
  base_url,
7314
- '/unified/hris/positions/{id}',
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::HrisGetPositionRequest, request)
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: 'hris_get_position',
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::PositionResult)
7404
- response = Models::Operations::HrisGetPositionResponse.new(
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
- position_result: obj
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::HrisGetTeamGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTeamGroupResponse) }
7583
- def get_team_group(request, retries = nil, timeout_ms = nil)
7584
- # get_team_group - Get Team Group
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::HrisGetTeamGroupRequest,
7588
+ Models::Operations::HrisGetLocationRequest,
7589
7589
  base_url,
7590
- '/unified/hris/groups/teams/{id}',
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::HrisGetTeamGroupRequest, request)
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: 'hris_get_team_group',
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::HRISTeamsResult)
7680
- response = Models::Operations::HrisGetTeamGroupResponse.new(
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
- hris_teams_result: obj
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::HrisGetTimeEntriesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTimeEntriesResponse) }
7859
- def get_time_entries(request, retries = nil, timeout_ms = nil)
7860
- # get_time_entries - Get Time Entry
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::HrisGetTimeEntriesRequest,
7864
+ Models::Operations::HrisGetPositionRequest,
7865
7865
  base_url,
7866
- '/unified/hris/time_entries/{id}',
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::HrisGetTimeEntriesRequest, request)
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: 'hris_get_time_entries',
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::TimeEntriesResult)
7956
- response = Models::Operations::HrisGetTimeEntriesResponse.new(
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
- time_entries_result: obj
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::HrisGetTimeOffPolicyRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTimeOffPolicyResponse) }
8135
- def get_time_off_policy(request, retries = nil, timeout_ms = nil)
8136
- # get_time_off_policy - Get Time Off Policy
8134
+ sig { params(request: T.nilable(Models::Operations::HrisGetShiftRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetShiftResponse) }
8135
+ def get_shift(request, retries = nil, timeout_ms = nil)
8136
+ # get_shift - Get Shift
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::HrisGetTimeOffPolicyRequest,
8140
+ Models::Operations::HrisGetShiftRequest,
8141
8141
  base_url,
8142
- '/unified/hris/time_off_policies/{id}',
8142
+ '/unified/hris/shifts/{id}',
8143
8143
  request
8144
8144
  )
8145
8145
  headers = Utils.get_headers(request)
8146
- query_params = Utils.get_query_params(Models::Operations::HrisGetTimeOffPolicyRequest, request)
8146
+ query_params = Utils.get_query_params(Models::Operations::HrisGetShiftRequest, 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: 'hris_get_time_off_policy',
8174
+ operation_id: 'hris_get_shift',
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::TimeOffPolicyResult)
8232
- response = Models::Operations::HrisGetTimeOffPolicyResponse.new(
8231
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HrisShiftResult)
8232
+ response = Models::Operations::HrisGetShiftResponse.new(
8233
8233
  status_code: http_response.status,
8234
8234
  content_type: content_type,
8235
8235
  raw_response: http_response,
8236
- time_off_policy_result: obj
8236
+ hris_shift_result: obj
8237
8237
  )
8238
8238
 
8239
8239
  return response
@@ -8407,19 +8407,19 @@ module StackOne
8407
8407
  end
8408
8408
 
8409
8409
 
8410
- sig { params(request: T.nilable(Models::Operations::HrisGetTimeOffRequestRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTimeOffRequestResponse) }
8411
- def get_time_off_request(request, retries = nil, timeout_ms = nil)
8412
- # get_time_off_request - Get time off request
8410
+ sig { params(request: T.nilable(Models::Operations::HrisGetTaskRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTaskResponse) }
8411
+ def get_task(request, retries = nil, timeout_ms = nil)
8412
+ # get_task - Get Task
8413
8413
  url, params = @sdk_configuration.get_server_details
8414
8414
  base_url = Utils.template_url(url, params)
8415
8415
  url = Utils.generate_url(
8416
- Models::Operations::HrisGetTimeOffRequestRequest,
8416
+ Models::Operations::HrisGetTaskRequest,
8417
8417
  base_url,
8418
- '/unified/hris/time_off/{id}',
8418
+ '/unified/hris/tasks/{id}',
8419
8419
  request
8420
8420
  )
8421
8421
  headers = Utils.get_headers(request)
8422
- query_params = Utils.get_query_params(Models::Operations::HrisGetTimeOffRequestRequest, request)
8422
+ query_params = Utils.get_query_params(Models::Operations::HrisGetTaskRequest, request)
8423
8423
  headers['Accept'] = 'application/json'
8424
8424
  headers['user-agent'] = @sdk_configuration.user_agent
8425
8425
  retries ||= @sdk_configuration.retry_config
@@ -8447,7 +8447,7 @@ module StackOne
8447
8447
  hook_ctx = SDKHooks::HookContext.new(
8448
8448
  base_url: base_url,
8449
8449
  oauth2_scopes: [],
8450
- operation_id: 'hris_get_time_off_request',
8450
+ operation_id: 'hris_get_task',
8451
8451
  security_source: @sdk_configuration.security_source
8452
8452
  )
8453
8453
 
@@ -8504,12 +8504,12 @@ module StackOne
8504
8504
  ),
8505
8505
  response: http_response
8506
8506
  )
8507
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffResult)
8508
- response = Models::Operations::HrisGetTimeOffRequestResponse.new(
8507
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TaskResult)
8508
+ response = Models::Operations::HrisGetTaskResponse.new(
8509
8509
  status_code: http_response.status,
8510
8510
  content_type: content_type,
8511
8511
  raw_response: http_response,
8512
- time_off_result: obj
8512
+ task_result: obj
8513
8513
  )
8514
8514
 
8515
8515
  return response
@@ -8683,21 +8683,19 @@ module StackOne
8683
8683
  end
8684
8684
 
8685
8685
 
8686
- sig { params(request: T.nilable(Models::Operations::HrisGetTimeOffTypeRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTimeOffTypeResponse) }
8687
- def get_time_off_type(request, retries = nil, timeout_ms = nil)
8688
- # get_time_off_type - Get time off type
8689
- #
8690
- # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
8686
+ sig { params(request: T.nilable(Models::Operations::HrisGetTeamGroupRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTeamGroupResponse) }
8687
+ def get_team_group(request, retries = nil, timeout_ms = nil)
8688
+ # get_team_group - Get Team Group
8691
8689
  url, params = @sdk_configuration.get_server_details
8692
8690
  base_url = Utils.template_url(url, params)
8693
8691
  url = Utils.generate_url(
8694
- Models::Operations::HrisGetTimeOffTypeRequest,
8692
+ Models::Operations::HrisGetTeamGroupRequest,
8695
8693
  base_url,
8696
- '/unified/hris/time_off_types/{id}',
8694
+ '/unified/hris/groups/teams/{id}',
8697
8695
  request
8698
8696
  )
8699
8697
  headers = Utils.get_headers(request)
8700
- query_params = Utils.get_query_params(Models::Operations::HrisGetTimeOffTypeRequest, request)
8698
+ query_params = Utils.get_query_params(Models::Operations::HrisGetTeamGroupRequest, request)
8701
8699
  headers['Accept'] = 'application/json'
8702
8700
  headers['user-agent'] = @sdk_configuration.user_agent
8703
8701
  retries ||= @sdk_configuration.retry_config
@@ -8725,7 +8723,7 @@ module StackOne
8725
8723
  hook_ctx = SDKHooks::HookContext.new(
8726
8724
  base_url: base_url,
8727
8725
  oauth2_scopes: [],
8728
- operation_id: 'hris_get_time_off_type',
8726
+ operation_id: 'hris_get_team_group',
8729
8727
  security_source: @sdk_configuration.security_source
8730
8728
  )
8731
8729
 
@@ -8782,12 +8780,12 @@ module StackOne
8782
8780
  ),
8783
8781
  response: http_response
8784
8782
  )
8785
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ReferenceResult)
8786
- response = Models::Operations::HrisGetTimeOffTypeResponse.new(
8783
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISTeamsResult)
8784
+ response = Models::Operations::HrisGetTeamGroupResponse.new(
8787
8785
  status_code: http_response.status,
8788
8786
  content_type: content_type,
8789
8787
  raw_response: http_response,
8790
- reference_result: obj
8788
+ hris_teams_result: obj
8791
8789
  )
8792
8790
 
8793
8791
  return response
@@ -8961,35 +8959,19 @@ module StackOne
8961
8959
  end
8962
8960
 
8963
8961
 
8964
- 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) }
8965
- def invite_employee(hris_invite_employee_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
8966
- # invite_employee - Invite Employee
8967
- request = Models::Operations::HrisInviteEmployeeRequest.new(
8968
-
8969
- hris_invite_employee_request_dto: hris_invite_employee_request_dto,
8970
- id: id,
8971
- x_account_id: x_account_id
8972
- )
8962
+ sig { params(request: T.nilable(Models::Operations::HrisGetTimeEntriesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTimeEntriesResponse) }
8963
+ def get_time_entries(request, retries = nil, timeout_ms = nil)
8964
+ # get_time_entries - Get Time Entry
8973
8965
  url, params = @sdk_configuration.get_server_details
8974
8966
  base_url = Utils.template_url(url, params)
8975
8967
  url = Utils.generate_url(
8976
- Models::Operations::HrisInviteEmployeeRequest,
8968
+ Models::Operations::HrisGetTimeEntriesRequest,
8977
8969
  base_url,
8978
- '/unified/hris/employees/{id}/invite',
8970
+ '/unified/hris/time_entries/{id}',
8979
8971
  request
8980
8972
  )
8981
8973
  headers = Utils.get_headers(request)
8982
- req_content_type, data, form = Utils.serialize_request_body(request, :hris_invite_employee_request_dto, :json)
8983
- headers['content-type'] = req_content_type
8984
- raise StandardError, 'request body is required' if data.nil? && form.nil?
8985
-
8986
- if form
8987
- body = Utils.encode_form(form)
8988
- elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
8989
- body = URI.encode_www_form(data)
8990
- else
8991
- body = data
8992
- end
8974
+ query_params = Utils.get_query_params(Models::Operations::HrisGetTimeEntriesRequest, request)
8993
8975
  headers['Accept'] = 'application/json'
8994
8976
  headers['user-agent'] = @sdk_configuration.user_agent
8995
8977
  retries ||= @sdk_configuration.retry_config
@@ -9017,7 +8999,7 @@ module StackOne
9017
8999
  hook_ctx = SDKHooks::HookContext.new(
9018
9000
  base_url: base_url,
9019
9001
  oauth2_scopes: [],
9020
- operation_id: 'hris_invite_employee',
9002
+ operation_id: 'hris_get_time_entries',
9021
9003
  security_source: @sdk_configuration.security_source
9022
9004
  )
9023
9005
 
@@ -9026,10 +9008,10 @@ module StackOne
9026
9008
 
9027
9009
 
9028
9010
  begin
9029
- http_response = connection.post(url) do |req|
9030
- req.body = body
9011
+ http_response = connection.get(url) do |req|
9031
9012
  req.headers.merge!(headers)
9032
9013
  req.options.timeout = timeout unless timeout.nil?
9014
+ req.params = query_params
9033
9015
  Utils.configure_request_security(req, security)
9034
9016
 
9035
9017
  @sdk_configuration.hooks.before_request(
@@ -9074,12 +9056,12 @@ module StackOne
9074
9056
  ),
9075
9057
  response: http_response
9076
9058
  )
9077
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::InviteEmployeeResult)
9078
- response = Models::Operations::HrisInviteEmployeeResponse.new(
9059
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeEntriesResult)
9060
+ response = Models::Operations::HrisGetTimeEntriesResponse.new(
9079
9061
  status_code: http_response.status,
9080
9062
  content_type: content_type,
9081
9063
  raw_response: http_response,
9082
- invite_employee_result: obj
9064
+ time_entries_result: obj
9083
9065
  )
9084
9066
 
9085
9067
  return response
@@ -9253,14 +9235,19 @@ module StackOne
9253
9235
  end
9254
9236
 
9255
9237
 
9256
- sig { params(request: T.nilable(Models::Operations::HrisListBenefitsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListBenefitsResponse) }
9257
- def list_benefits(request, retries = nil, timeout_ms = nil)
9258
- # list_benefits - List benefits
9238
+ sig { params(request: T.nilable(Models::Operations::HrisGetTimeOffPolicyRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTimeOffPolicyResponse) }
9239
+ def get_time_off_policy(request, retries = nil, timeout_ms = nil)
9240
+ # get_time_off_policy - Get Time Off Policy
9259
9241
  url, params = @sdk_configuration.get_server_details
9260
9242
  base_url = Utils.template_url(url, params)
9261
- url = "#{base_url}/unified/hris/benefits"
9243
+ url = Utils.generate_url(
9244
+ Models::Operations::HrisGetTimeOffPolicyRequest,
9245
+ base_url,
9246
+ '/unified/hris/time_off_policies/{id}',
9247
+ request
9248
+ )
9262
9249
  headers = Utils.get_headers(request)
9263
- query_params = Utils.get_query_params(Models::Operations::HrisListBenefitsRequest, request)
9250
+ query_params = Utils.get_query_params(Models::Operations::HrisGetTimeOffPolicyRequest, request)
9264
9251
  headers['Accept'] = 'application/json'
9265
9252
  headers['user-agent'] = @sdk_configuration.user_agent
9266
9253
  retries ||= @sdk_configuration.retry_config
@@ -9288,7 +9275,7 @@ module StackOne
9288
9275
  hook_ctx = SDKHooks::HookContext.new(
9289
9276
  base_url: base_url,
9290
9277
  oauth2_scopes: [],
9291
- operation_id: 'hris_list_benefits',
9278
+ operation_id: 'hris_get_time_off_policy',
9292
9279
  security_source: @sdk_configuration.security_source
9293
9280
  )
9294
9281
 
@@ -9345,12 +9332,12 @@ module StackOne
9345
9332
  ),
9346
9333
  response: http_response
9347
9334
  )
9348
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISBenefitsPaginated)
9349
- response = Models::Operations::HrisListBenefitsResponse.new(
9335
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffPolicyResult)
9336
+ response = Models::Operations::HrisGetTimeOffPolicyResponse.new(
9350
9337
  status_code: http_response.status,
9351
9338
  content_type: content_type,
9352
9339
  raw_response: http_response,
9353
- hris_benefits_paginated: obj
9340
+ time_off_policy_result: obj
9354
9341
  )
9355
9342
 
9356
9343
  return response
@@ -9524,14 +9511,19 @@ module StackOne
9524
9511
  end
9525
9512
 
9526
9513
 
9527
- sig { params(request: T.nilable(Models::Operations::HrisListCompaniesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListCompaniesResponse) }
9528
- def list_companies(request, retries = nil, timeout_ms = nil)
9529
- # list_companies - List Companies
9514
+ sig { params(request: T.nilable(Models::Operations::HrisGetTimeOffRequestRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTimeOffRequestResponse) }
9515
+ def get_time_off_request(request, retries = nil, timeout_ms = nil)
9516
+ # get_time_off_request - Get time off request
9530
9517
  url, params = @sdk_configuration.get_server_details
9531
9518
  base_url = Utils.template_url(url, params)
9532
- url = "#{base_url}/unified/hris/companies"
9519
+ url = Utils.generate_url(
9520
+ Models::Operations::HrisGetTimeOffRequestRequest,
9521
+ base_url,
9522
+ '/unified/hris/time_off/{id}',
9523
+ request
9524
+ )
9533
9525
  headers = Utils.get_headers(request)
9534
- query_params = Utils.get_query_params(Models::Operations::HrisListCompaniesRequest, request)
9526
+ query_params = Utils.get_query_params(Models::Operations::HrisGetTimeOffRequestRequest, request)
9535
9527
  headers['Accept'] = 'application/json'
9536
9528
  headers['user-agent'] = @sdk_configuration.user_agent
9537
9529
  retries ||= @sdk_configuration.retry_config
@@ -9559,7 +9551,7 @@ module StackOne
9559
9551
  hook_ctx = SDKHooks::HookContext.new(
9560
9552
  base_url: base_url,
9561
9553
  oauth2_scopes: [],
9562
- operation_id: 'hris_list_companies',
9554
+ operation_id: 'hris_get_time_off_request',
9563
9555
  security_source: @sdk_configuration.security_source
9564
9556
  )
9565
9557
 
@@ -9616,12 +9608,12 @@ module StackOne
9616
9608
  ),
9617
9609
  response: http_response
9618
9610
  )
9619
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CompaniesPaginated)
9620
- response = Models::Operations::HrisListCompaniesResponse.new(
9611
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffResult)
9612
+ response = Models::Operations::HrisGetTimeOffRequestResponse.new(
9621
9613
  status_code: http_response.status,
9622
9614
  content_type: content_type,
9623
9615
  raw_response: http_response,
9624
- companies_paginated: obj
9616
+ time_off_result: obj
9625
9617
  )
9626
9618
 
9627
9619
  return response
@@ -9795,14 +9787,21 @@ module StackOne
9795
9787
  end
9796
9788
 
9797
9789
 
9798
- sig { params(request: T.nilable(Models::Operations::HrisListCostCenterGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListCostCenterGroupsResponse) }
9799
- def list_cost_center_groups(request, retries = nil, timeout_ms = nil)
9800
- # list_cost_center_groups - List Cost Center Groups
9790
+ sig { params(request: T.nilable(Models::Operations::HrisGetTimeOffTypeRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisGetTimeOffTypeResponse) }
9791
+ def get_time_off_type(request, retries = nil, timeout_ms = nil)
9792
+ # get_time_off_type - Get time off type
9793
+ #
9794
+ # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
9801
9795
  url, params = @sdk_configuration.get_server_details
9802
9796
  base_url = Utils.template_url(url, params)
9803
- url = "#{base_url}/unified/hris/groups/cost_centers"
9797
+ url = Utils.generate_url(
9798
+ Models::Operations::HrisGetTimeOffTypeRequest,
9799
+ base_url,
9800
+ '/unified/hris/time_off_types/{id}',
9801
+ request
9802
+ )
9804
9803
  headers = Utils.get_headers(request)
9805
- query_params = Utils.get_query_params(Models::Operations::HrisListCostCenterGroupsRequest, request)
9804
+ query_params = Utils.get_query_params(Models::Operations::HrisGetTimeOffTypeRequest, request)
9806
9805
  headers['Accept'] = 'application/json'
9807
9806
  headers['user-agent'] = @sdk_configuration.user_agent
9808
9807
  retries ||= @sdk_configuration.retry_config
@@ -9830,7 +9829,7 @@ module StackOne
9830
9829
  hook_ctx = SDKHooks::HookContext.new(
9831
9830
  base_url: base_url,
9832
9831
  oauth2_scopes: [],
9833
- operation_id: 'hris_list_cost_center_groups',
9832
+ operation_id: 'hris_get_time_off_type',
9834
9833
  security_source: @sdk_configuration.security_source
9835
9834
  )
9836
9835
 
@@ -9887,12 +9886,2201 @@ module StackOne
9887
9886
  ),
9888
9887
  response: http_response
9889
9888
  )
9890
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISCostCenterPaginated)
9889
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ReferenceResult)
9890
+ response = Models::Operations::HrisGetTimeOffTypeResponse.new(
9891
+ status_code: http_response.status,
9892
+ content_type: content_type,
9893
+ raw_response: http_response,
9894
+ reference_result: obj
9895
+ )
9896
+
9897
+ return response
9898
+ else
9899
+ 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'
9900
+ end
9901
+ elsif Utils.match_status_code(http_response.status, ['400'])
9902
+ if Utils.match_content_type(content_type, 'application/json')
9903
+ http_response = @sdk_configuration.hooks.after_success(
9904
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
9905
+ hook_ctx: hook_ctx
9906
+ ),
9907
+ response: http_response
9908
+ )
9909
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
9910
+ throw obj
9911
+ else
9912
+ 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'
9913
+ end
9914
+ elsif Utils.match_status_code(http_response.status, ['401'])
9915
+ if Utils.match_content_type(content_type, 'application/json')
9916
+ http_response = @sdk_configuration.hooks.after_success(
9917
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
9918
+ hook_ctx: hook_ctx
9919
+ ),
9920
+ response: http_response
9921
+ )
9922
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
9923
+ throw obj
9924
+ else
9925
+ 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'
9926
+ end
9927
+ elsif Utils.match_status_code(http_response.status, ['403'])
9928
+ if Utils.match_content_type(content_type, 'application/json')
9929
+ http_response = @sdk_configuration.hooks.after_success(
9930
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
9931
+ hook_ctx: hook_ctx
9932
+ ),
9933
+ response: http_response
9934
+ )
9935
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
9936
+ throw obj
9937
+ else
9938
+ 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'
9939
+ end
9940
+ elsif Utils.match_status_code(http_response.status, ['404'])
9941
+ if Utils.match_content_type(content_type, 'application/json')
9942
+ http_response = @sdk_configuration.hooks.after_success(
9943
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
9944
+ hook_ctx: hook_ctx
9945
+ ),
9946
+ response: http_response
9947
+ )
9948
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
9949
+ throw obj
9950
+ else
9951
+ 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'
9952
+ end
9953
+ elsif Utils.match_status_code(http_response.status, ['408'])
9954
+ if Utils.match_content_type(content_type, 'application/json')
9955
+ http_response = @sdk_configuration.hooks.after_success(
9956
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
9957
+ hook_ctx: hook_ctx
9958
+ ),
9959
+ response: http_response
9960
+ )
9961
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
9962
+ throw obj
9963
+ else
9964
+ 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'
9965
+ end
9966
+ elsif Utils.match_status_code(http_response.status, ['409'])
9967
+ if Utils.match_content_type(content_type, 'application/json')
9968
+ http_response = @sdk_configuration.hooks.after_success(
9969
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
9970
+ hook_ctx: hook_ctx
9971
+ ),
9972
+ response: http_response
9973
+ )
9974
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
9975
+ throw obj
9976
+ else
9977
+ 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'
9978
+ end
9979
+ elsif Utils.match_status_code(http_response.status, ['412'])
9980
+ if Utils.match_content_type(content_type, 'application/json')
9981
+ http_response = @sdk_configuration.hooks.after_success(
9982
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
9983
+ hook_ctx: hook_ctx
9984
+ ),
9985
+ response: http_response
9986
+ )
9987
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
9988
+ throw obj
9989
+ else
9990
+ 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'
9991
+ end
9992
+ elsif Utils.match_status_code(http_response.status, ['422'])
9993
+ if Utils.match_content_type(content_type, 'application/json')
9994
+ http_response = @sdk_configuration.hooks.after_success(
9995
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
9996
+ hook_ctx: hook_ctx
9997
+ ),
9998
+ response: http_response
9999
+ )
10000
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
10001
+ throw obj
10002
+ else
10003
+ 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'
10004
+ end
10005
+ elsif Utils.match_status_code(http_response.status, ['429'])
10006
+ if Utils.match_content_type(content_type, 'application/json')
10007
+ http_response = @sdk_configuration.hooks.after_success(
10008
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10009
+ hook_ctx: hook_ctx
10010
+ ),
10011
+ response: http_response
10012
+ )
10013
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
10014
+ throw obj
10015
+ else
10016
+ 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'
10017
+ end
10018
+ elsif Utils.match_status_code(http_response.status, ['500'])
10019
+ if Utils.match_content_type(content_type, 'application/json')
10020
+ http_response = @sdk_configuration.hooks.after_success(
10021
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10022
+ hook_ctx: hook_ctx
10023
+ ),
10024
+ response: http_response
10025
+ )
10026
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
10027
+ throw obj
10028
+ else
10029
+ 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'
10030
+ end
10031
+ elsif Utils.match_status_code(http_response.status, ['501'])
10032
+ if Utils.match_content_type(content_type, 'application/json')
10033
+ http_response = @sdk_configuration.hooks.after_success(
10034
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10035
+ hook_ctx: hook_ctx
10036
+ ),
10037
+ response: http_response
10038
+ )
10039
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
10040
+ throw obj
10041
+ else
10042
+ 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'
10043
+ end
10044
+ elsif Utils.match_status_code(http_response.status, ['502'])
10045
+ if Utils.match_content_type(content_type, 'application/json')
10046
+ http_response = @sdk_configuration.hooks.after_success(
10047
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10048
+ hook_ctx: hook_ctx
10049
+ ),
10050
+ response: http_response
10051
+ )
10052
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
10053
+ throw obj
10054
+ else
10055
+ 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'
10056
+ end
10057
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
10058
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
10059
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
10060
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
10061
+ else
10062
+ 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'
10063
+
10064
+ end
10065
+ end
10066
+
10067
+
10068
+ 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) }
10069
+ def invite_employee(hris_invite_employee_request_dto, id, x_account_id, retries = nil, timeout_ms = nil)
10070
+ # invite_employee - Invite Employee
10071
+ request = Models::Operations::HrisInviteEmployeeRequest.new(
10072
+
10073
+ hris_invite_employee_request_dto: hris_invite_employee_request_dto,
10074
+ id: id,
10075
+ x_account_id: x_account_id
10076
+ )
10077
+ url, params = @sdk_configuration.get_server_details
10078
+ base_url = Utils.template_url(url, params)
10079
+ url = Utils.generate_url(
10080
+ Models::Operations::HrisInviteEmployeeRequest,
10081
+ base_url,
10082
+ '/unified/hris/employees/{id}/invite',
10083
+ request
10084
+ )
10085
+ headers = Utils.get_headers(request)
10086
+ req_content_type, data, form = Utils.serialize_request_body(request, :hris_invite_employee_request_dto, :json)
10087
+ headers['content-type'] = req_content_type
10088
+ raise StandardError, 'request body is required' if data.nil? && form.nil?
10089
+
10090
+ if form
10091
+ body = Utils.encode_form(form)
10092
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
10093
+ body = URI.encode_www_form(data)
10094
+ else
10095
+ body = data
10096
+ end
10097
+ headers['Accept'] = 'application/json'
10098
+ headers['user-agent'] = @sdk_configuration.user_agent
10099
+ retries ||= @sdk_configuration.retry_config
10100
+ retries ||= Utils::RetryConfig.new(
10101
+ backoff: Utils::BackoffStrategy.new(
10102
+ exponent: 1.5,
10103
+ initial_interval: 500,
10104
+ max_elapsed_time: 3_600_000,
10105
+ max_interval: 60_000
10106
+ ),
10107
+ retry_connection_errors: true,
10108
+ strategy: 'backoff'
10109
+ )
10110
+ retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
10111
+ retry_options[:retry_statuses] = [429, 408]
10112
+
10113
+ security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
10114
+
10115
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
10116
+ timeout ||= @sdk_configuration.timeout
10117
+
10118
+ connection = @sdk_configuration.client.dup
10119
+ connection.request :retry, retry_options
10120
+
10121
+ hook_ctx = SDKHooks::HookContext.new(
10122
+ base_url: base_url,
10123
+ oauth2_scopes: [],
10124
+ operation_id: 'hris_invite_employee',
10125
+ security_source: @sdk_configuration.security_source
10126
+ )
10127
+
10128
+ error = T.let(nil, T.nilable(StandardError))
10129
+ http_response = T.let(nil, T.nilable(Faraday::Response))
10130
+
10131
+
10132
+ begin
10133
+ http_response = connection.post(url) do |req|
10134
+ req.body = body
10135
+ req.headers.merge!(headers)
10136
+ req.options.timeout = timeout unless timeout.nil?
10137
+ Utils.configure_request_security(req, security)
10138
+
10139
+ @sdk_configuration.hooks.before_request(
10140
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
10141
+ hook_ctx: hook_ctx
10142
+ ),
10143
+ request: req
10144
+ )
10145
+ end
10146
+ rescue StandardError => e
10147
+ error = e
10148
+ ensure
10149
+ if http_response.nil? || Utils.error_status?(http_response.status)
10150
+ http_response = @sdk_configuration.hooks.after_error(
10151
+ error: error,
10152
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
10153
+ hook_ctx: hook_ctx
10154
+ ),
10155
+ response: http_response
10156
+ )
10157
+ else
10158
+ http_response = @sdk_configuration.hooks.after_success(
10159
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10160
+ hook_ctx: hook_ctx
10161
+ ),
10162
+ response: http_response
10163
+ )
10164
+ end
10165
+
10166
+ if http_response.nil?
10167
+ raise error if !error.nil?
10168
+ raise 'no response'
10169
+ end
10170
+ end
10171
+
10172
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
10173
+ if Utils.match_status_code(http_response.status, ['200'])
10174
+ if Utils.match_content_type(content_type, 'application/json')
10175
+ http_response = @sdk_configuration.hooks.after_success(
10176
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10177
+ hook_ctx: hook_ctx
10178
+ ),
10179
+ response: http_response
10180
+ )
10181
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::InviteEmployeeResult)
10182
+ response = Models::Operations::HrisInviteEmployeeResponse.new(
10183
+ status_code: http_response.status,
10184
+ content_type: content_type,
10185
+ raw_response: http_response,
10186
+ invite_employee_result: obj
10187
+ )
10188
+
10189
+ return response
10190
+ else
10191
+ 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'
10192
+ end
10193
+ elsif Utils.match_status_code(http_response.status, ['400'])
10194
+ if Utils.match_content_type(content_type, 'application/json')
10195
+ http_response = @sdk_configuration.hooks.after_success(
10196
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10197
+ hook_ctx: hook_ctx
10198
+ ),
10199
+ response: http_response
10200
+ )
10201
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
10202
+ throw obj
10203
+ else
10204
+ 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'
10205
+ end
10206
+ elsif Utils.match_status_code(http_response.status, ['401'])
10207
+ if Utils.match_content_type(content_type, 'application/json')
10208
+ http_response = @sdk_configuration.hooks.after_success(
10209
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10210
+ hook_ctx: hook_ctx
10211
+ ),
10212
+ response: http_response
10213
+ )
10214
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
10215
+ throw obj
10216
+ else
10217
+ 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'
10218
+ end
10219
+ elsif Utils.match_status_code(http_response.status, ['403'])
10220
+ if Utils.match_content_type(content_type, 'application/json')
10221
+ http_response = @sdk_configuration.hooks.after_success(
10222
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10223
+ hook_ctx: hook_ctx
10224
+ ),
10225
+ response: http_response
10226
+ )
10227
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
10228
+ throw obj
10229
+ else
10230
+ 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'
10231
+ end
10232
+ elsif Utils.match_status_code(http_response.status, ['404'])
10233
+ if Utils.match_content_type(content_type, 'application/json')
10234
+ http_response = @sdk_configuration.hooks.after_success(
10235
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10236
+ hook_ctx: hook_ctx
10237
+ ),
10238
+ response: http_response
10239
+ )
10240
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
10241
+ throw obj
10242
+ else
10243
+ 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'
10244
+ end
10245
+ elsif Utils.match_status_code(http_response.status, ['408'])
10246
+ if Utils.match_content_type(content_type, 'application/json')
10247
+ http_response = @sdk_configuration.hooks.after_success(
10248
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10249
+ hook_ctx: hook_ctx
10250
+ ),
10251
+ response: http_response
10252
+ )
10253
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
10254
+ throw obj
10255
+ else
10256
+ 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'
10257
+ end
10258
+ elsif Utils.match_status_code(http_response.status, ['409'])
10259
+ if Utils.match_content_type(content_type, 'application/json')
10260
+ http_response = @sdk_configuration.hooks.after_success(
10261
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10262
+ hook_ctx: hook_ctx
10263
+ ),
10264
+ response: http_response
10265
+ )
10266
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
10267
+ throw obj
10268
+ else
10269
+ 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'
10270
+ end
10271
+ elsif Utils.match_status_code(http_response.status, ['412'])
10272
+ if Utils.match_content_type(content_type, 'application/json')
10273
+ http_response = @sdk_configuration.hooks.after_success(
10274
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10275
+ hook_ctx: hook_ctx
10276
+ ),
10277
+ response: http_response
10278
+ )
10279
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
10280
+ throw obj
10281
+ else
10282
+ 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'
10283
+ end
10284
+ elsif Utils.match_status_code(http_response.status, ['422'])
10285
+ if Utils.match_content_type(content_type, 'application/json')
10286
+ http_response = @sdk_configuration.hooks.after_success(
10287
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10288
+ hook_ctx: hook_ctx
10289
+ ),
10290
+ response: http_response
10291
+ )
10292
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
10293
+ throw obj
10294
+ else
10295
+ 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'
10296
+ end
10297
+ elsif Utils.match_status_code(http_response.status, ['429'])
10298
+ if Utils.match_content_type(content_type, 'application/json')
10299
+ http_response = @sdk_configuration.hooks.after_success(
10300
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10301
+ hook_ctx: hook_ctx
10302
+ ),
10303
+ response: http_response
10304
+ )
10305
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
10306
+ throw obj
10307
+ else
10308
+ 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'
10309
+ end
10310
+ elsif Utils.match_status_code(http_response.status, ['500'])
10311
+ if Utils.match_content_type(content_type, 'application/json')
10312
+ http_response = @sdk_configuration.hooks.after_success(
10313
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10314
+ hook_ctx: hook_ctx
10315
+ ),
10316
+ response: http_response
10317
+ )
10318
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
10319
+ throw obj
10320
+ else
10321
+ 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'
10322
+ end
10323
+ elsif Utils.match_status_code(http_response.status, ['501'])
10324
+ if Utils.match_content_type(content_type, 'application/json')
10325
+ http_response = @sdk_configuration.hooks.after_success(
10326
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10327
+ hook_ctx: hook_ctx
10328
+ ),
10329
+ response: http_response
10330
+ )
10331
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
10332
+ throw obj
10333
+ else
10334
+ 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'
10335
+ end
10336
+ elsif Utils.match_status_code(http_response.status, ['502'])
10337
+ if Utils.match_content_type(content_type, 'application/json')
10338
+ http_response = @sdk_configuration.hooks.after_success(
10339
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10340
+ hook_ctx: hook_ctx
10341
+ ),
10342
+ response: http_response
10343
+ )
10344
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
10345
+ throw obj
10346
+ else
10347
+ 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'
10348
+ end
10349
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
10350
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
10351
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
10352
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
10353
+ else
10354
+ 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'
10355
+
10356
+ end
10357
+ end
10358
+
10359
+
10360
+ sig { params(request: T.nilable(Models::Operations::HrisListBenefitsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListBenefitsResponse) }
10361
+ def list_benefits(request, retries = nil, timeout_ms = nil)
10362
+ # list_benefits - List benefits
10363
+ url, params = @sdk_configuration.get_server_details
10364
+ base_url = Utils.template_url(url, params)
10365
+ url = "#{base_url}/unified/hris/benefits"
10366
+ headers = Utils.get_headers(request)
10367
+ query_params = Utils.get_query_params(Models::Operations::HrisListBenefitsRequest, request)
10368
+ headers['Accept'] = 'application/json'
10369
+ headers['user-agent'] = @sdk_configuration.user_agent
10370
+ retries ||= @sdk_configuration.retry_config
10371
+ retries ||= Utils::RetryConfig.new(
10372
+ backoff: Utils::BackoffStrategy.new(
10373
+ exponent: 1.5,
10374
+ initial_interval: 500,
10375
+ max_elapsed_time: 3_600_000,
10376
+ max_interval: 60_000
10377
+ ),
10378
+ retry_connection_errors: true,
10379
+ strategy: 'backoff'
10380
+ )
10381
+ retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
10382
+ retry_options[:retry_statuses] = [429, 408]
10383
+
10384
+ security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
10385
+
10386
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
10387
+ timeout ||= @sdk_configuration.timeout
10388
+
10389
+ connection = @sdk_configuration.client.dup
10390
+ connection.request :retry, retry_options
10391
+
10392
+ hook_ctx = SDKHooks::HookContext.new(
10393
+ base_url: base_url,
10394
+ oauth2_scopes: [],
10395
+ operation_id: 'hris_list_benefits',
10396
+ security_source: @sdk_configuration.security_source
10397
+ )
10398
+
10399
+ error = T.let(nil, T.nilable(StandardError))
10400
+ http_response = T.let(nil, T.nilable(Faraday::Response))
10401
+
10402
+
10403
+ begin
10404
+ http_response = connection.get(url) do |req|
10405
+ req.headers.merge!(headers)
10406
+ req.options.timeout = timeout unless timeout.nil?
10407
+ req.params = query_params
10408
+ Utils.configure_request_security(req, security)
10409
+
10410
+ @sdk_configuration.hooks.before_request(
10411
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
10412
+ hook_ctx: hook_ctx
10413
+ ),
10414
+ request: req
10415
+ )
10416
+ end
10417
+ rescue StandardError => e
10418
+ error = e
10419
+ ensure
10420
+ if http_response.nil? || Utils.error_status?(http_response.status)
10421
+ http_response = @sdk_configuration.hooks.after_error(
10422
+ error: error,
10423
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
10424
+ hook_ctx: hook_ctx
10425
+ ),
10426
+ response: http_response
10427
+ )
10428
+ else
10429
+ http_response = @sdk_configuration.hooks.after_success(
10430
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10431
+ hook_ctx: hook_ctx
10432
+ ),
10433
+ response: http_response
10434
+ )
10435
+ end
10436
+
10437
+ if http_response.nil?
10438
+ raise error if !error.nil?
10439
+ raise 'no response'
10440
+ end
10441
+ end
10442
+
10443
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
10444
+ if Utils.match_status_code(http_response.status, ['200'])
10445
+ if Utils.match_content_type(content_type, 'application/json')
10446
+ http_response = @sdk_configuration.hooks.after_success(
10447
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10448
+ hook_ctx: hook_ctx
10449
+ ),
10450
+ response: http_response
10451
+ )
10452
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISBenefitsPaginated)
10453
+ response = Models::Operations::HrisListBenefitsResponse.new(
10454
+ status_code: http_response.status,
10455
+ content_type: content_type,
10456
+ raw_response: http_response,
10457
+ hris_benefits_paginated: obj
10458
+ )
10459
+
10460
+ return response
10461
+ else
10462
+ 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'
10463
+ end
10464
+ elsif Utils.match_status_code(http_response.status, ['400'])
10465
+ if Utils.match_content_type(content_type, 'application/json')
10466
+ http_response = @sdk_configuration.hooks.after_success(
10467
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10468
+ hook_ctx: hook_ctx
10469
+ ),
10470
+ response: http_response
10471
+ )
10472
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
10473
+ throw obj
10474
+ else
10475
+ 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'
10476
+ end
10477
+ elsif Utils.match_status_code(http_response.status, ['401'])
10478
+ if Utils.match_content_type(content_type, 'application/json')
10479
+ http_response = @sdk_configuration.hooks.after_success(
10480
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10481
+ hook_ctx: hook_ctx
10482
+ ),
10483
+ response: http_response
10484
+ )
10485
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
10486
+ throw obj
10487
+ else
10488
+ 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'
10489
+ end
10490
+ elsif Utils.match_status_code(http_response.status, ['403'])
10491
+ if Utils.match_content_type(content_type, 'application/json')
10492
+ http_response = @sdk_configuration.hooks.after_success(
10493
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10494
+ hook_ctx: hook_ctx
10495
+ ),
10496
+ response: http_response
10497
+ )
10498
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
10499
+ throw obj
10500
+ else
10501
+ 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'
10502
+ end
10503
+ elsif Utils.match_status_code(http_response.status, ['404'])
10504
+ if Utils.match_content_type(content_type, 'application/json')
10505
+ http_response = @sdk_configuration.hooks.after_success(
10506
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10507
+ hook_ctx: hook_ctx
10508
+ ),
10509
+ response: http_response
10510
+ )
10511
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
10512
+ throw obj
10513
+ else
10514
+ 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'
10515
+ end
10516
+ elsif Utils.match_status_code(http_response.status, ['408'])
10517
+ if Utils.match_content_type(content_type, 'application/json')
10518
+ http_response = @sdk_configuration.hooks.after_success(
10519
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10520
+ hook_ctx: hook_ctx
10521
+ ),
10522
+ response: http_response
10523
+ )
10524
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
10525
+ throw obj
10526
+ else
10527
+ 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'
10528
+ end
10529
+ elsif Utils.match_status_code(http_response.status, ['409'])
10530
+ if Utils.match_content_type(content_type, 'application/json')
10531
+ http_response = @sdk_configuration.hooks.after_success(
10532
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10533
+ hook_ctx: hook_ctx
10534
+ ),
10535
+ response: http_response
10536
+ )
10537
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
10538
+ throw obj
10539
+ else
10540
+ 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'
10541
+ end
10542
+ elsif Utils.match_status_code(http_response.status, ['412'])
10543
+ if Utils.match_content_type(content_type, 'application/json')
10544
+ http_response = @sdk_configuration.hooks.after_success(
10545
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10546
+ hook_ctx: hook_ctx
10547
+ ),
10548
+ response: http_response
10549
+ )
10550
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
10551
+ throw obj
10552
+ else
10553
+ 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'
10554
+ end
10555
+ elsif Utils.match_status_code(http_response.status, ['422'])
10556
+ if Utils.match_content_type(content_type, 'application/json')
10557
+ http_response = @sdk_configuration.hooks.after_success(
10558
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10559
+ hook_ctx: hook_ctx
10560
+ ),
10561
+ response: http_response
10562
+ )
10563
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
10564
+ throw obj
10565
+ else
10566
+ 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'
10567
+ end
10568
+ elsif Utils.match_status_code(http_response.status, ['429'])
10569
+ if Utils.match_content_type(content_type, 'application/json')
10570
+ http_response = @sdk_configuration.hooks.after_success(
10571
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10572
+ hook_ctx: hook_ctx
10573
+ ),
10574
+ response: http_response
10575
+ )
10576
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
10577
+ throw obj
10578
+ else
10579
+ 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'
10580
+ end
10581
+ elsif Utils.match_status_code(http_response.status, ['500'])
10582
+ if Utils.match_content_type(content_type, 'application/json')
10583
+ http_response = @sdk_configuration.hooks.after_success(
10584
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10585
+ hook_ctx: hook_ctx
10586
+ ),
10587
+ response: http_response
10588
+ )
10589
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
10590
+ throw obj
10591
+ else
10592
+ 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'
10593
+ end
10594
+ elsif Utils.match_status_code(http_response.status, ['501'])
10595
+ if Utils.match_content_type(content_type, 'application/json')
10596
+ http_response = @sdk_configuration.hooks.after_success(
10597
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10598
+ hook_ctx: hook_ctx
10599
+ ),
10600
+ response: http_response
10601
+ )
10602
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
10603
+ throw obj
10604
+ else
10605
+ 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'
10606
+ end
10607
+ elsif Utils.match_status_code(http_response.status, ['502'])
10608
+ if Utils.match_content_type(content_type, 'application/json')
10609
+ http_response = @sdk_configuration.hooks.after_success(
10610
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10611
+ hook_ctx: hook_ctx
10612
+ ),
10613
+ response: http_response
10614
+ )
10615
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
10616
+ throw obj
10617
+ else
10618
+ 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'
10619
+ end
10620
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
10621
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
10622
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
10623
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
10624
+ else
10625
+ 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'
10626
+
10627
+ end
10628
+ end
10629
+
10630
+
10631
+ sig { params(request: T.nilable(Models::Operations::HrisListCompaniesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListCompaniesResponse) }
10632
+ def list_companies(request, retries = nil, timeout_ms = nil)
10633
+ # list_companies - List Companies
10634
+ url, params = @sdk_configuration.get_server_details
10635
+ base_url = Utils.template_url(url, params)
10636
+ url = "#{base_url}/unified/hris/companies"
10637
+ headers = Utils.get_headers(request)
10638
+ query_params = Utils.get_query_params(Models::Operations::HrisListCompaniesRequest, request)
10639
+ headers['Accept'] = 'application/json'
10640
+ headers['user-agent'] = @sdk_configuration.user_agent
10641
+ retries ||= @sdk_configuration.retry_config
10642
+ retries ||= Utils::RetryConfig.new(
10643
+ backoff: Utils::BackoffStrategy.new(
10644
+ exponent: 1.5,
10645
+ initial_interval: 500,
10646
+ max_elapsed_time: 3_600_000,
10647
+ max_interval: 60_000
10648
+ ),
10649
+ retry_connection_errors: true,
10650
+ strategy: 'backoff'
10651
+ )
10652
+ retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
10653
+ retry_options[:retry_statuses] = [429, 408]
10654
+
10655
+ security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
10656
+
10657
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
10658
+ timeout ||= @sdk_configuration.timeout
10659
+
10660
+ connection = @sdk_configuration.client.dup
10661
+ connection.request :retry, retry_options
10662
+
10663
+ hook_ctx = SDKHooks::HookContext.new(
10664
+ base_url: base_url,
10665
+ oauth2_scopes: [],
10666
+ operation_id: 'hris_list_companies',
10667
+ security_source: @sdk_configuration.security_source
10668
+ )
10669
+
10670
+ error = T.let(nil, T.nilable(StandardError))
10671
+ http_response = T.let(nil, T.nilable(Faraday::Response))
10672
+
10673
+
10674
+ begin
10675
+ http_response = connection.get(url) do |req|
10676
+ req.headers.merge!(headers)
10677
+ req.options.timeout = timeout unless timeout.nil?
10678
+ req.params = query_params
10679
+ Utils.configure_request_security(req, security)
10680
+
10681
+ @sdk_configuration.hooks.before_request(
10682
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
10683
+ hook_ctx: hook_ctx
10684
+ ),
10685
+ request: req
10686
+ )
10687
+ end
10688
+ rescue StandardError => e
10689
+ error = e
10690
+ ensure
10691
+ if http_response.nil? || Utils.error_status?(http_response.status)
10692
+ http_response = @sdk_configuration.hooks.after_error(
10693
+ error: error,
10694
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
10695
+ hook_ctx: hook_ctx
10696
+ ),
10697
+ response: http_response
10698
+ )
10699
+ else
10700
+ http_response = @sdk_configuration.hooks.after_success(
10701
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10702
+ hook_ctx: hook_ctx
10703
+ ),
10704
+ response: http_response
10705
+ )
10706
+ end
10707
+
10708
+ if http_response.nil?
10709
+ raise error if !error.nil?
10710
+ raise 'no response'
10711
+ end
10712
+ end
10713
+
10714
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
10715
+ if Utils.match_status_code(http_response.status, ['200'])
10716
+ if Utils.match_content_type(content_type, 'application/json')
10717
+ http_response = @sdk_configuration.hooks.after_success(
10718
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10719
+ hook_ctx: hook_ctx
10720
+ ),
10721
+ response: http_response
10722
+ )
10723
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CompaniesPaginated)
10724
+ response = Models::Operations::HrisListCompaniesResponse.new(
10725
+ status_code: http_response.status,
10726
+ content_type: content_type,
10727
+ raw_response: http_response,
10728
+ companies_paginated: obj
10729
+ )
10730
+
10731
+ return response
10732
+ else
10733
+ 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'
10734
+ end
10735
+ elsif Utils.match_status_code(http_response.status, ['400'])
10736
+ if Utils.match_content_type(content_type, 'application/json')
10737
+ http_response = @sdk_configuration.hooks.after_success(
10738
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10739
+ hook_ctx: hook_ctx
10740
+ ),
10741
+ response: http_response
10742
+ )
10743
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
10744
+ throw obj
10745
+ else
10746
+ 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'
10747
+ end
10748
+ elsif Utils.match_status_code(http_response.status, ['401'])
10749
+ if Utils.match_content_type(content_type, 'application/json')
10750
+ http_response = @sdk_configuration.hooks.after_success(
10751
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10752
+ hook_ctx: hook_ctx
10753
+ ),
10754
+ response: http_response
10755
+ )
10756
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
10757
+ throw obj
10758
+ else
10759
+ 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'
10760
+ end
10761
+ elsif Utils.match_status_code(http_response.status, ['403'])
10762
+ if Utils.match_content_type(content_type, 'application/json')
10763
+ http_response = @sdk_configuration.hooks.after_success(
10764
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10765
+ hook_ctx: hook_ctx
10766
+ ),
10767
+ response: http_response
10768
+ )
10769
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
10770
+ throw obj
10771
+ else
10772
+ 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'
10773
+ end
10774
+ elsif Utils.match_status_code(http_response.status, ['404'])
10775
+ if Utils.match_content_type(content_type, 'application/json')
10776
+ http_response = @sdk_configuration.hooks.after_success(
10777
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10778
+ hook_ctx: hook_ctx
10779
+ ),
10780
+ response: http_response
10781
+ )
10782
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
10783
+ throw obj
10784
+ else
10785
+ 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'
10786
+ end
10787
+ elsif Utils.match_status_code(http_response.status, ['408'])
10788
+ if Utils.match_content_type(content_type, 'application/json')
10789
+ http_response = @sdk_configuration.hooks.after_success(
10790
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10791
+ hook_ctx: hook_ctx
10792
+ ),
10793
+ response: http_response
10794
+ )
10795
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
10796
+ throw obj
10797
+ else
10798
+ 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'
10799
+ end
10800
+ elsif Utils.match_status_code(http_response.status, ['409'])
10801
+ if Utils.match_content_type(content_type, 'application/json')
10802
+ http_response = @sdk_configuration.hooks.after_success(
10803
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10804
+ hook_ctx: hook_ctx
10805
+ ),
10806
+ response: http_response
10807
+ )
10808
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
10809
+ throw obj
10810
+ else
10811
+ 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'
10812
+ end
10813
+ elsif Utils.match_status_code(http_response.status, ['412'])
10814
+ if Utils.match_content_type(content_type, 'application/json')
10815
+ http_response = @sdk_configuration.hooks.after_success(
10816
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10817
+ hook_ctx: hook_ctx
10818
+ ),
10819
+ response: http_response
10820
+ )
10821
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
10822
+ throw obj
10823
+ else
10824
+ 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'
10825
+ end
10826
+ elsif Utils.match_status_code(http_response.status, ['422'])
10827
+ if Utils.match_content_type(content_type, 'application/json')
10828
+ http_response = @sdk_configuration.hooks.after_success(
10829
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10830
+ hook_ctx: hook_ctx
10831
+ ),
10832
+ response: http_response
10833
+ )
10834
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
10835
+ throw obj
10836
+ else
10837
+ 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'
10838
+ end
10839
+ elsif Utils.match_status_code(http_response.status, ['429'])
10840
+ if Utils.match_content_type(content_type, 'application/json')
10841
+ http_response = @sdk_configuration.hooks.after_success(
10842
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10843
+ hook_ctx: hook_ctx
10844
+ ),
10845
+ response: http_response
10846
+ )
10847
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
10848
+ throw obj
10849
+ else
10850
+ 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'
10851
+ end
10852
+ elsif Utils.match_status_code(http_response.status, ['500'])
10853
+ if Utils.match_content_type(content_type, 'application/json')
10854
+ http_response = @sdk_configuration.hooks.after_success(
10855
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10856
+ hook_ctx: hook_ctx
10857
+ ),
10858
+ response: http_response
10859
+ )
10860
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
10861
+ throw obj
10862
+ else
10863
+ 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'
10864
+ end
10865
+ elsif Utils.match_status_code(http_response.status, ['501'])
10866
+ if Utils.match_content_type(content_type, 'application/json')
10867
+ http_response = @sdk_configuration.hooks.after_success(
10868
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10869
+ hook_ctx: hook_ctx
10870
+ ),
10871
+ response: http_response
10872
+ )
10873
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
10874
+ throw obj
10875
+ else
10876
+ 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'
10877
+ end
10878
+ elsif Utils.match_status_code(http_response.status, ['502'])
10879
+ if Utils.match_content_type(content_type, 'application/json')
10880
+ http_response = @sdk_configuration.hooks.after_success(
10881
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10882
+ hook_ctx: hook_ctx
10883
+ ),
10884
+ response: http_response
10885
+ )
10886
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
10887
+ throw obj
10888
+ else
10889
+ 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'
10890
+ end
10891
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
10892
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
10893
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
10894
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
10895
+ else
10896
+ 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'
10897
+
10898
+ end
10899
+ end
10900
+
10901
+
10902
+ sig { params(request: T.nilable(Models::Operations::HrisListCompaniesGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListCompaniesGroupsResponse) }
10903
+ def list_companies_groups(request, retries = nil, timeout_ms = nil)
10904
+ # list_companies_groups - List Companies Groups
10905
+ url, params = @sdk_configuration.get_server_details
10906
+ base_url = Utils.template_url(url, params)
10907
+ url = "#{base_url}/unified/hris/groups/companies"
10908
+ headers = Utils.get_headers(request)
10909
+ query_params = Utils.get_query_params(Models::Operations::HrisListCompaniesGroupsRequest, request)
10910
+ headers['Accept'] = 'application/json'
10911
+ headers['user-agent'] = @sdk_configuration.user_agent
10912
+ retries ||= @sdk_configuration.retry_config
10913
+ retries ||= Utils::RetryConfig.new(
10914
+ backoff: Utils::BackoffStrategy.new(
10915
+ exponent: 1.5,
10916
+ initial_interval: 500,
10917
+ max_elapsed_time: 3_600_000,
10918
+ max_interval: 60_000
10919
+ ),
10920
+ retry_connection_errors: true,
10921
+ strategy: 'backoff'
10922
+ )
10923
+ retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
10924
+ retry_options[:retry_statuses] = [429, 408]
10925
+
10926
+ security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
10927
+
10928
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
10929
+ timeout ||= @sdk_configuration.timeout
10930
+
10931
+ connection = @sdk_configuration.client.dup
10932
+ connection.request :retry, retry_options
10933
+
10934
+ hook_ctx = SDKHooks::HookContext.new(
10935
+ base_url: base_url,
10936
+ oauth2_scopes: [],
10937
+ operation_id: 'hris_list_companies_groups',
10938
+ security_source: @sdk_configuration.security_source
10939
+ )
10940
+
10941
+ error = T.let(nil, T.nilable(StandardError))
10942
+ http_response = T.let(nil, T.nilable(Faraday::Response))
10943
+
10944
+
10945
+ begin
10946
+ http_response = connection.get(url) do |req|
10947
+ req.headers.merge!(headers)
10948
+ req.options.timeout = timeout unless timeout.nil?
10949
+ req.params = query_params
10950
+ Utils.configure_request_security(req, security)
10951
+
10952
+ @sdk_configuration.hooks.before_request(
10953
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
10954
+ hook_ctx: hook_ctx
10955
+ ),
10956
+ request: req
10957
+ )
10958
+ end
10959
+ rescue StandardError => e
10960
+ error = e
10961
+ ensure
10962
+ if http_response.nil? || Utils.error_status?(http_response.status)
10963
+ http_response = @sdk_configuration.hooks.after_error(
10964
+ error: error,
10965
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
10966
+ hook_ctx: hook_ctx
10967
+ ),
10968
+ response: http_response
10969
+ )
10970
+ else
10971
+ http_response = @sdk_configuration.hooks.after_success(
10972
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10973
+ hook_ctx: hook_ctx
10974
+ ),
10975
+ response: http_response
10976
+ )
10977
+ end
10978
+
10979
+ if http_response.nil?
10980
+ raise error if !error.nil?
10981
+ raise 'no response'
10982
+ end
10983
+ end
10984
+
10985
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
10986
+ if Utils.match_status_code(http_response.status, ['200'])
10987
+ if Utils.match_content_type(content_type, 'application/json')
10988
+ http_response = @sdk_configuration.hooks.after_success(
10989
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
10990
+ hook_ctx: hook_ctx
10991
+ ),
10992
+ response: http_response
10993
+ )
10994
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CompaniesPaginated)
10995
+ response = Models::Operations::HrisListCompaniesGroupsResponse.new(
10996
+ status_code: http_response.status,
10997
+ content_type: content_type,
10998
+ raw_response: http_response,
10999
+ companies_paginated: obj
11000
+ )
11001
+
11002
+ return response
11003
+ else
11004
+ 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'
11005
+ end
11006
+ elsif Utils.match_status_code(http_response.status, ['400'])
11007
+ if Utils.match_content_type(content_type, 'application/json')
11008
+ http_response = @sdk_configuration.hooks.after_success(
11009
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11010
+ hook_ctx: hook_ctx
11011
+ ),
11012
+ response: http_response
11013
+ )
11014
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
11015
+ throw obj
11016
+ else
11017
+ 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'
11018
+ end
11019
+ elsif Utils.match_status_code(http_response.status, ['401'])
11020
+ if Utils.match_content_type(content_type, 'application/json')
11021
+ http_response = @sdk_configuration.hooks.after_success(
11022
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11023
+ hook_ctx: hook_ctx
11024
+ ),
11025
+ response: http_response
11026
+ )
11027
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
11028
+ throw obj
11029
+ else
11030
+ 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'
11031
+ end
11032
+ elsif Utils.match_status_code(http_response.status, ['403'])
11033
+ if Utils.match_content_type(content_type, 'application/json')
11034
+ http_response = @sdk_configuration.hooks.after_success(
11035
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11036
+ hook_ctx: hook_ctx
11037
+ ),
11038
+ response: http_response
11039
+ )
11040
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
11041
+ throw obj
11042
+ else
11043
+ 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'
11044
+ end
11045
+ elsif Utils.match_status_code(http_response.status, ['404'])
11046
+ if Utils.match_content_type(content_type, 'application/json')
11047
+ http_response = @sdk_configuration.hooks.after_success(
11048
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11049
+ hook_ctx: hook_ctx
11050
+ ),
11051
+ response: http_response
11052
+ )
11053
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
11054
+ throw obj
11055
+ else
11056
+ 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'
11057
+ end
11058
+ elsif Utils.match_status_code(http_response.status, ['408'])
11059
+ if Utils.match_content_type(content_type, 'application/json')
11060
+ http_response = @sdk_configuration.hooks.after_success(
11061
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11062
+ hook_ctx: hook_ctx
11063
+ ),
11064
+ response: http_response
11065
+ )
11066
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
11067
+ throw obj
11068
+ else
11069
+ 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'
11070
+ end
11071
+ elsif Utils.match_status_code(http_response.status, ['409'])
11072
+ if Utils.match_content_type(content_type, 'application/json')
11073
+ http_response = @sdk_configuration.hooks.after_success(
11074
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11075
+ hook_ctx: hook_ctx
11076
+ ),
11077
+ response: http_response
11078
+ )
11079
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
11080
+ throw obj
11081
+ else
11082
+ 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'
11083
+ end
11084
+ elsif Utils.match_status_code(http_response.status, ['412'])
11085
+ if Utils.match_content_type(content_type, 'application/json')
11086
+ http_response = @sdk_configuration.hooks.after_success(
11087
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11088
+ hook_ctx: hook_ctx
11089
+ ),
11090
+ response: http_response
11091
+ )
11092
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
11093
+ throw obj
11094
+ else
11095
+ 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'
11096
+ end
11097
+ elsif Utils.match_status_code(http_response.status, ['422'])
11098
+ if Utils.match_content_type(content_type, 'application/json')
11099
+ http_response = @sdk_configuration.hooks.after_success(
11100
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11101
+ hook_ctx: hook_ctx
11102
+ ),
11103
+ response: http_response
11104
+ )
11105
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
11106
+ throw obj
11107
+ else
11108
+ 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'
11109
+ end
11110
+ elsif Utils.match_status_code(http_response.status, ['429'])
11111
+ if Utils.match_content_type(content_type, 'application/json')
11112
+ http_response = @sdk_configuration.hooks.after_success(
11113
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11114
+ hook_ctx: hook_ctx
11115
+ ),
11116
+ response: http_response
11117
+ )
11118
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
11119
+ throw obj
11120
+ else
11121
+ 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'
11122
+ end
11123
+ elsif Utils.match_status_code(http_response.status, ['500'])
11124
+ if Utils.match_content_type(content_type, 'application/json')
11125
+ http_response = @sdk_configuration.hooks.after_success(
11126
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11127
+ hook_ctx: hook_ctx
11128
+ ),
11129
+ response: http_response
11130
+ )
11131
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
11132
+ throw obj
11133
+ else
11134
+ 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'
11135
+ end
11136
+ elsif Utils.match_status_code(http_response.status, ['501'])
11137
+ if Utils.match_content_type(content_type, 'application/json')
11138
+ http_response = @sdk_configuration.hooks.after_success(
11139
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11140
+ hook_ctx: hook_ctx
11141
+ ),
11142
+ response: http_response
11143
+ )
11144
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
11145
+ throw obj
11146
+ else
11147
+ 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'
11148
+ end
11149
+ elsif Utils.match_status_code(http_response.status, ['502'])
11150
+ if Utils.match_content_type(content_type, 'application/json')
11151
+ http_response = @sdk_configuration.hooks.after_success(
11152
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11153
+ hook_ctx: hook_ctx
11154
+ ),
11155
+ response: http_response
11156
+ )
11157
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
11158
+ throw obj
11159
+ else
11160
+ 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'
11161
+ end
11162
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
11163
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
11164
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
11165
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
11166
+ else
11167
+ 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'
11168
+
11169
+ end
11170
+ end
11171
+
11172
+
11173
+ sig { params(request: T.nilable(Models::Operations::HrisListCostCenterGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListCostCenterGroupsResponse) }
11174
+ def list_cost_center_groups(request, retries = nil, timeout_ms = nil)
11175
+ # list_cost_center_groups - List Cost Center Groups
11176
+ url, params = @sdk_configuration.get_server_details
11177
+ base_url = Utils.template_url(url, params)
11178
+ url = "#{base_url}/unified/hris/groups/cost_centers"
11179
+ headers = Utils.get_headers(request)
11180
+ query_params = Utils.get_query_params(Models::Operations::HrisListCostCenterGroupsRequest, request)
11181
+ headers['Accept'] = 'application/json'
11182
+ headers['user-agent'] = @sdk_configuration.user_agent
11183
+ retries ||= @sdk_configuration.retry_config
11184
+ retries ||= Utils::RetryConfig.new(
11185
+ backoff: Utils::BackoffStrategy.new(
11186
+ exponent: 1.5,
11187
+ initial_interval: 500,
11188
+ max_elapsed_time: 3_600_000,
11189
+ max_interval: 60_000
11190
+ ),
11191
+ retry_connection_errors: true,
11192
+ strategy: 'backoff'
11193
+ )
11194
+ retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
11195
+ retry_options[:retry_statuses] = [429, 408]
11196
+
11197
+ security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
11198
+
11199
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
11200
+ timeout ||= @sdk_configuration.timeout
11201
+
11202
+ connection = @sdk_configuration.client.dup
11203
+ connection.request :retry, retry_options
11204
+
11205
+ hook_ctx = SDKHooks::HookContext.new(
11206
+ base_url: base_url,
11207
+ oauth2_scopes: [],
11208
+ operation_id: 'hris_list_cost_center_groups',
11209
+ security_source: @sdk_configuration.security_source
11210
+ )
11211
+
11212
+ error = T.let(nil, T.nilable(StandardError))
11213
+ http_response = T.let(nil, T.nilable(Faraday::Response))
11214
+
11215
+
11216
+ begin
11217
+ http_response = connection.get(url) do |req|
11218
+ req.headers.merge!(headers)
11219
+ req.options.timeout = timeout unless timeout.nil?
11220
+ req.params = query_params
11221
+ Utils.configure_request_security(req, security)
11222
+
11223
+ @sdk_configuration.hooks.before_request(
11224
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
11225
+ hook_ctx: hook_ctx
11226
+ ),
11227
+ request: req
11228
+ )
11229
+ end
11230
+ rescue StandardError => e
11231
+ error = e
11232
+ ensure
11233
+ if http_response.nil? || Utils.error_status?(http_response.status)
11234
+ http_response = @sdk_configuration.hooks.after_error(
11235
+ error: error,
11236
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
11237
+ hook_ctx: hook_ctx
11238
+ ),
11239
+ response: http_response
11240
+ )
11241
+ else
11242
+ http_response = @sdk_configuration.hooks.after_success(
11243
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11244
+ hook_ctx: hook_ctx
11245
+ ),
11246
+ response: http_response
11247
+ )
11248
+ end
11249
+
11250
+ if http_response.nil?
11251
+ raise error if !error.nil?
11252
+ raise 'no response'
11253
+ end
11254
+ end
11255
+
11256
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
11257
+ if Utils.match_status_code(http_response.status, ['200'])
11258
+ if Utils.match_content_type(content_type, 'application/json')
11259
+ http_response = @sdk_configuration.hooks.after_success(
11260
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11261
+ hook_ctx: hook_ctx
11262
+ ),
11263
+ response: http_response
11264
+ )
11265
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISCostCenterPaginated)
9891
11266
  response = Models::Operations::HrisListCostCenterGroupsResponse.new(
9892
11267
  status_code: http_response.status,
9893
11268
  content_type: content_type,
9894
11269
  raw_response: http_response,
9895
- hris_cost_center_paginated: obj
11270
+ hris_cost_center_paginated: obj
11271
+ )
11272
+
11273
+ return response
11274
+ else
11275
+ 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'
11276
+ end
11277
+ elsif Utils.match_status_code(http_response.status, ['400'])
11278
+ if Utils.match_content_type(content_type, 'application/json')
11279
+ http_response = @sdk_configuration.hooks.after_success(
11280
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11281
+ hook_ctx: hook_ctx
11282
+ ),
11283
+ response: http_response
11284
+ )
11285
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
11286
+ throw obj
11287
+ else
11288
+ 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'
11289
+ end
11290
+ elsif Utils.match_status_code(http_response.status, ['401'])
11291
+ if Utils.match_content_type(content_type, 'application/json')
11292
+ http_response = @sdk_configuration.hooks.after_success(
11293
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11294
+ hook_ctx: hook_ctx
11295
+ ),
11296
+ response: http_response
11297
+ )
11298
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
11299
+ throw obj
11300
+ else
11301
+ 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'
11302
+ end
11303
+ elsif Utils.match_status_code(http_response.status, ['403'])
11304
+ if Utils.match_content_type(content_type, 'application/json')
11305
+ http_response = @sdk_configuration.hooks.after_success(
11306
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11307
+ hook_ctx: hook_ctx
11308
+ ),
11309
+ response: http_response
11310
+ )
11311
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
11312
+ throw obj
11313
+ else
11314
+ 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'
11315
+ end
11316
+ elsif Utils.match_status_code(http_response.status, ['404'])
11317
+ if Utils.match_content_type(content_type, 'application/json')
11318
+ http_response = @sdk_configuration.hooks.after_success(
11319
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11320
+ hook_ctx: hook_ctx
11321
+ ),
11322
+ response: http_response
11323
+ )
11324
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
11325
+ throw obj
11326
+ else
11327
+ 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'
11328
+ end
11329
+ elsif Utils.match_status_code(http_response.status, ['408'])
11330
+ if Utils.match_content_type(content_type, 'application/json')
11331
+ http_response = @sdk_configuration.hooks.after_success(
11332
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11333
+ hook_ctx: hook_ctx
11334
+ ),
11335
+ response: http_response
11336
+ )
11337
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
11338
+ throw obj
11339
+ else
11340
+ 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'
11341
+ end
11342
+ elsif Utils.match_status_code(http_response.status, ['409'])
11343
+ if Utils.match_content_type(content_type, 'application/json')
11344
+ http_response = @sdk_configuration.hooks.after_success(
11345
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11346
+ hook_ctx: hook_ctx
11347
+ ),
11348
+ response: http_response
11349
+ )
11350
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
11351
+ throw obj
11352
+ else
11353
+ 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'
11354
+ end
11355
+ elsif Utils.match_status_code(http_response.status, ['412'])
11356
+ if Utils.match_content_type(content_type, 'application/json')
11357
+ http_response = @sdk_configuration.hooks.after_success(
11358
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11359
+ hook_ctx: hook_ctx
11360
+ ),
11361
+ response: http_response
11362
+ )
11363
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
11364
+ throw obj
11365
+ else
11366
+ 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'
11367
+ end
11368
+ elsif Utils.match_status_code(http_response.status, ['422'])
11369
+ if Utils.match_content_type(content_type, 'application/json')
11370
+ http_response = @sdk_configuration.hooks.after_success(
11371
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11372
+ hook_ctx: hook_ctx
11373
+ ),
11374
+ response: http_response
11375
+ )
11376
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
11377
+ throw obj
11378
+ else
11379
+ 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'
11380
+ end
11381
+ elsif Utils.match_status_code(http_response.status, ['429'])
11382
+ if Utils.match_content_type(content_type, 'application/json')
11383
+ http_response = @sdk_configuration.hooks.after_success(
11384
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11385
+ hook_ctx: hook_ctx
11386
+ ),
11387
+ response: http_response
11388
+ )
11389
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
11390
+ throw obj
11391
+ else
11392
+ 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'
11393
+ end
11394
+ elsif Utils.match_status_code(http_response.status, ['500'])
11395
+ if Utils.match_content_type(content_type, 'application/json')
11396
+ http_response = @sdk_configuration.hooks.after_success(
11397
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11398
+ hook_ctx: hook_ctx
11399
+ ),
11400
+ response: http_response
11401
+ )
11402
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
11403
+ throw obj
11404
+ else
11405
+ 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'
11406
+ end
11407
+ elsif Utils.match_status_code(http_response.status, ['501'])
11408
+ if Utils.match_content_type(content_type, 'application/json')
11409
+ http_response = @sdk_configuration.hooks.after_success(
11410
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11411
+ hook_ctx: hook_ctx
11412
+ ),
11413
+ response: http_response
11414
+ )
11415
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
11416
+ throw obj
11417
+ else
11418
+ 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'
11419
+ end
11420
+ elsif Utils.match_status_code(http_response.status, ['502'])
11421
+ if Utils.match_content_type(content_type, 'application/json')
11422
+ http_response = @sdk_configuration.hooks.after_success(
11423
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11424
+ hook_ctx: hook_ctx
11425
+ ),
11426
+ response: http_response
11427
+ )
11428
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
11429
+ throw obj
11430
+ else
11431
+ 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'
11432
+ end
11433
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
11434
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
11435
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
11436
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
11437
+ else
11438
+ 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'
11439
+
11440
+ end
11441
+ end
11442
+
11443
+
11444
+ sig { params(request: T.nilable(Models::Operations::HrisListDepartmentGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListDepartmentGroupsResponse) }
11445
+ def list_department_groups(request, retries = nil, timeout_ms = nil)
11446
+ # list_department_groups - List Department Groups
11447
+ url, params = @sdk_configuration.get_server_details
11448
+ base_url = Utils.template_url(url, params)
11449
+ url = "#{base_url}/unified/hris/groups/departments"
11450
+ headers = Utils.get_headers(request)
11451
+ query_params = Utils.get_query_params(Models::Operations::HrisListDepartmentGroupsRequest, request)
11452
+ headers['Accept'] = 'application/json'
11453
+ headers['user-agent'] = @sdk_configuration.user_agent
11454
+ retries ||= @sdk_configuration.retry_config
11455
+ retries ||= Utils::RetryConfig.new(
11456
+ backoff: Utils::BackoffStrategy.new(
11457
+ exponent: 1.5,
11458
+ initial_interval: 500,
11459
+ max_elapsed_time: 3_600_000,
11460
+ max_interval: 60_000
11461
+ ),
11462
+ retry_connection_errors: true,
11463
+ strategy: 'backoff'
11464
+ )
11465
+ retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
11466
+ retry_options[:retry_statuses] = [429, 408]
11467
+
11468
+ security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
11469
+
11470
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
11471
+ timeout ||= @sdk_configuration.timeout
11472
+
11473
+ connection = @sdk_configuration.client.dup
11474
+ connection.request :retry, retry_options
11475
+
11476
+ hook_ctx = SDKHooks::HookContext.new(
11477
+ base_url: base_url,
11478
+ oauth2_scopes: [],
11479
+ operation_id: 'hris_list_department_groups',
11480
+ security_source: @sdk_configuration.security_source
11481
+ )
11482
+
11483
+ error = T.let(nil, T.nilable(StandardError))
11484
+ http_response = T.let(nil, T.nilable(Faraday::Response))
11485
+
11486
+
11487
+ begin
11488
+ http_response = connection.get(url) do |req|
11489
+ req.headers.merge!(headers)
11490
+ req.options.timeout = timeout unless timeout.nil?
11491
+ req.params = query_params
11492
+ Utils.configure_request_security(req, security)
11493
+
11494
+ @sdk_configuration.hooks.before_request(
11495
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
11496
+ hook_ctx: hook_ctx
11497
+ ),
11498
+ request: req
11499
+ )
11500
+ end
11501
+ rescue StandardError => e
11502
+ error = e
11503
+ ensure
11504
+ if http_response.nil? || Utils.error_status?(http_response.status)
11505
+ http_response = @sdk_configuration.hooks.after_error(
11506
+ error: error,
11507
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
11508
+ hook_ctx: hook_ctx
11509
+ ),
11510
+ response: http_response
11511
+ )
11512
+ else
11513
+ http_response = @sdk_configuration.hooks.after_success(
11514
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11515
+ hook_ctx: hook_ctx
11516
+ ),
11517
+ response: http_response
11518
+ )
11519
+ end
11520
+
11521
+ if http_response.nil?
11522
+ raise error if !error.nil?
11523
+ raise 'no response'
11524
+ end
11525
+ end
11526
+
11527
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
11528
+ if Utils.match_status_code(http_response.status, ['200'])
11529
+ if Utils.match_content_type(content_type, 'application/json')
11530
+ http_response = @sdk_configuration.hooks.after_success(
11531
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11532
+ hook_ctx: hook_ctx
11533
+ ),
11534
+ response: http_response
11535
+ )
11536
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISDepartmentsPaginated)
11537
+ response = Models::Operations::HrisListDepartmentGroupsResponse.new(
11538
+ status_code: http_response.status,
11539
+ content_type: content_type,
11540
+ raw_response: http_response,
11541
+ hris_departments_paginated: obj
11542
+ )
11543
+
11544
+ return response
11545
+ else
11546
+ 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'
11547
+ end
11548
+ elsif Utils.match_status_code(http_response.status, ['400'])
11549
+ if Utils.match_content_type(content_type, 'application/json')
11550
+ http_response = @sdk_configuration.hooks.after_success(
11551
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11552
+ hook_ctx: hook_ctx
11553
+ ),
11554
+ response: http_response
11555
+ )
11556
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
11557
+ throw obj
11558
+ else
11559
+ 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'
11560
+ end
11561
+ elsif Utils.match_status_code(http_response.status, ['401'])
11562
+ if Utils.match_content_type(content_type, 'application/json')
11563
+ http_response = @sdk_configuration.hooks.after_success(
11564
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11565
+ hook_ctx: hook_ctx
11566
+ ),
11567
+ response: http_response
11568
+ )
11569
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
11570
+ throw obj
11571
+ else
11572
+ 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'
11573
+ end
11574
+ elsif Utils.match_status_code(http_response.status, ['403'])
11575
+ if Utils.match_content_type(content_type, 'application/json')
11576
+ http_response = @sdk_configuration.hooks.after_success(
11577
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11578
+ hook_ctx: hook_ctx
11579
+ ),
11580
+ response: http_response
11581
+ )
11582
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
11583
+ throw obj
11584
+ else
11585
+ 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'
11586
+ end
11587
+ elsif Utils.match_status_code(http_response.status, ['404'])
11588
+ if Utils.match_content_type(content_type, 'application/json')
11589
+ http_response = @sdk_configuration.hooks.after_success(
11590
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11591
+ hook_ctx: hook_ctx
11592
+ ),
11593
+ response: http_response
11594
+ )
11595
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
11596
+ throw obj
11597
+ else
11598
+ 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'
11599
+ end
11600
+ elsif Utils.match_status_code(http_response.status, ['408'])
11601
+ if Utils.match_content_type(content_type, 'application/json')
11602
+ http_response = @sdk_configuration.hooks.after_success(
11603
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11604
+ hook_ctx: hook_ctx
11605
+ ),
11606
+ response: http_response
11607
+ )
11608
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
11609
+ throw obj
11610
+ else
11611
+ 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'
11612
+ end
11613
+ elsif Utils.match_status_code(http_response.status, ['409'])
11614
+ if Utils.match_content_type(content_type, 'application/json')
11615
+ http_response = @sdk_configuration.hooks.after_success(
11616
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11617
+ hook_ctx: hook_ctx
11618
+ ),
11619
+ response: http_response
11620
+ )
11621
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
11622
+ throw obj
11623
+ else
11624
+ 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'
11625
+ end
11626
+ elsif Utils.match_status_code(http_response.status, ['412'])
11627
+ if Utils.match_content_type(content_type, 'application/json')
11628
+ http_response = @sdk_configuration.hooks.after_success(
11629
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11630
+ hook_ctx: hook_ctx
11631
+ ),
11632
+ response: http_response
11633
+ )
11634
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
11635
+ throw obj
11636
+ else
11637
+ 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'
11638
+ end
11639
+ elsif Utils.match_status_code(http_response.status, ['422'])
11640
+ if Utils.match_content_type(content_type, 'application/json')
11641
+ http_response = @sdk_configuration.hooks.after_success(
11642
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11643
+ hook_ctx: hook_ctx
11644
+ ),
11645
+ response: http_response
11646
+ )
11647
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
11648
+ throw obj
11649
+ else
11650
+ 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'
11651
+ end
11652
+ elsif Utils.match_status_code(http_response.status, ['429'])
11653
+ if Utils.match_content_type(content_type, 'application/json')
11654
+ http_response = @sdk_configuration.hooks.after_success(
11655
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11656
+ hook_ctx: hook_ctx
11657
+ ),
11658
+ response: http_response
11659
+ )
11660
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
11661
+ throw obj
11662
+ else
11663
+ 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'
11664
+ end
11665
+ elsif Utils.match_status_code(http_response.status, ['500'])
11666
+ if Utils.match_content_type(content_type, 'application/json')
11667
+ http_response = @sdk_configuration.hooks.after_success(
11668
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11669
+ hook_ctx: hook_ctx
11670
+ ),
11671
+ response: http_response
11672
+ )
11673
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
11674
+ throw obj
11675
+ else
11676
+ 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'
11677
+ end
11678
+ elsif Utils.match_status_code(http_response.status, ['501'])
11679
+ if Utils.match_content_type(content_type, 'application/json')
11680
+ http_response = @sdk_configuration.hooks.after_success(
11681
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11682
+ hook_ctx: hook_ctx
11683
+ ),
11684
+ response: http_response
11685
+ )
11686
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
11687
+ throw obj
11688
+ else
11689
+ 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'
11690
+ end
11691
+ elsif Utils.match_status_code(http_response.status, ['502'])
11692
+ if Utils.match_content_type(content_type, 'application/json')
11693
+ http_response = @sdk_configuration.hooks.after_success(
11694
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11695
+ hook_ctx: hook_ctx
11696
+ ),
11697
+ response: http_response
11698
+ )
11699
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
11700
+ throw obj
11701
+ else
11702
+ 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'
11703
+ end
11704
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
11705
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
11706
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
11707
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
11708
+ else
11709
+ 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'
11710
+
11711
+ end
11712
+ end
11713
+
11714
+
11715
+ sig { params(request: T.nilable(Models::Operations::HrisListDivisionGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListDivisionGroupsResponse) }
11716
+ def list_division_groups(request, retries = nil, timeout_ms = nil)
11717
+ # list_division_groups - List Division Groups
11718
+ url, params = @sdk_configuration.get_server_details
11719
+ base_url = Utils.template_url(url, params)
11720
+ url = "#{base_url}/unified/hris/groups/divisions"
11721
+ headers = Utils.get_headers(request)
11722
+ query_params = Utils.get_query_params(Models::Operations::HrisListDivisionGroupsRequest, request)
11723
+ headers['Accept'] = 'application/json'
11724
+ headers['user-agent'] = @sdk_configuration.user_agent
11725
+ retries ||= @sdk_configuration.retry_config
11726
+ retries ||= Utils::RetryConfig.new(
11727
+ backoff: Utils::BackoffStrategy.new(
11728
+ exponent: 1.5,
11729
+ initial_interval: 500,
11730
+ max_elapsed_time: 3_600_000,
11731
+ max_interval: 60_000
11732
+ ),
11733
+ retry_connection_errors: true,
11734
+ strategy: 'backoff'
11735
+ )
11736
+ retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
11737
+ retry_options[:retry_statuses] = [429, 408]
11738
+
11739
+ security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
11740
+
11741
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
11742
+ timeout ||= @sdk_configuration.timeout
11743
+
11744
+ connection = @sdk_configuration.client.dup
11745
+ connection.request :retry, retry_options
11746
+
11747
+ hook_ctx = SDKHooks::HookContext.new(
11748
+ base_url: base_url,
11749
+ oauth2_scopes: [],
11750
+ operation_id: 'hris_list_division_groups',
11751
+ security_source: @sdk_configuration.security_source
11752
+ )
11753
+
11754
+ error = T.let(nil, T.nilable(StandardError))
11755
+ http_response = T.let(nil, T.nilable(Faraday::Response))
11756
+
11757
+
11758
+ begin
11759
+ http_response = connection.get(url) do |req|
11760
+ req.headers.merge!(headers)
11761
+ req.options.timeout = timeout unless timeout.nil?
11762
+ req.params = query_params
11763
+ Utils.configure_request_security(req, security)
11764
+
11765
+ @sdk_configuration.hooks.before_request(
11766
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
11767
+ hook_ctx: hook_ctx
11768
+ ),
11769
+ request: req
11770
+ )
11771
+ end
11772
+ rescue StandardError => e
11773
+ error = e
11774
+ ensure
11775
+ if http_response.nil? || Utils.error_status?(http_response.status)
11776
+ http_response = @sdk_configuration.hooks.after_error(
11777
+ error: error,
11778
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
11779
+ hook_ctx: hook_ctx
11780
+ ),
11781
+ response: http_response
11782
+ )
11783
+ else
11784
+ http_response = @sdk_configuration.hooks.after_success(
11785
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11786
+ hook_ctx: hook_ctx
11787
+ ),
11788
+ response: http_response
11789
+ )
11790
+ end
11791
+
11792
+ if http_response.nil?
11793
+ raise error if !error.nil?
11794
+ raise 'no response'
11795
+ end
11796
+ end
11797
+
11798
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
11799
+ if Utils.match_status_code(http_response.status, ['200'])
11800
+ if Utils.match_content_type(content_type, 'application/json')
11801
+ http_response = @sdk_configuration.hooks.after_success(
11802
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11803
+ hook_ctx: hook_ctx
11804
+ ),
11805
+ response: http_response
11806
+ )
11807
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISDivisionsPaginated)
11808
+ response = Models::Operations::HrisListDivisionGroupsResponse.new(
11809
+ status_code: http_response.status,
11810
+ content_type: content_type,
11811
+ raw_response: http_response,
11812
+ hris_divisions_paginated: obj
11813
+ )
11814
+
11815
+ return response
11816
+ else
11817
+ 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'
11818
+ end
11819
+ elsif Utils.match_status_code(http_response.status, ['400'])
11820
+ if Utils.match_content_type(content_type, 'application/json')
11821
+ http_response = @sdk_configuration.hooks.after_success(
11822
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11823
+ hook_ctx: hook_ctx
11824
+ ),
11825
+ response: http_response
11826
+ )
11827
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadRequestResponse)
11828
+ throw obj
11829
+ else
11830
+ 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'
11831
+ end
11832
+ elsif Utils.match_status_code(http_response.status, ['401'])
11833
+ if Utils.match_content_type(content_type, 'application/json')
11834
+ http_response = @sdk_configuration.hooks.after_success(
11835
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11836
+ hook_ctx: hook_ctx
11837
+ ),
11838
+ response: http_response
11839
+ )
11840
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnauthorizedResponse)
11841
+ throw obj
11842
+ else
11843
+ 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'
11844
+ end
11845
+ elsif Utils.match_status_code(http_response.status, ['403'])
11846
+ if Utils.match_content_type(content_type, 'application/json')
11847
+ http_response = @sdk_configuration.hooks.after_success(
11848
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11849
+ hook_ctx: hook_ctx
11850
+ ),
11851
+ response: http_response
11852
+ )
11853
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ForbiddenResponse)
11854
+ throw obj
11855
+ else
11856
+ 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'
11857
+ end
11858
+ elsif Utils.match_status_code(http_response.status, ['404'])
11859
+ if Utils.match_content_type(content_type, 'application/json')
11860
+ http_response = @sdk_configuration.hooks.after_success(
11861
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11862
+ hook_ctx: hook_ctx
11863
+ ),
11864
+ response: http_response
11865
+ )
11866
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotFoundResponse)
11867
+ throw obj
11868
+ else
11869
+ 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'
11870
+ end
11871
+ elsif Utils.match_status_code(http_response.status, ['408'])
11872
+ if Utils.match_content_type(content_type, 'application/json')
11873
+ http_response = @sdk_configuration.hooks.after_success(
11874
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11875
+ hook_ctx: hook_ctx
11876
+ ),
11877
+ response: http_response
11878
+ )
11879
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::RequestTimedOutResponse)
11880
+ throw obj
11881
+ else
11882
+ 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'
11883
+ end
11884
+ elsif Utils.match_status_code(http_response.status, ['409'])
11885
+ if Utils.match_content_type(content_type, 'application/json')
11886
+ http_response = @sdk_configuration.hooks.after_success(
11887
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11888
+ hook_ctx: hook_ctx
11889
+ ),
11890
+ response: http_response
11891
+ )
11892
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::ConflictResponse)
11893
+ throw obj
11894
+ else
11895
+ 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'
11896
+ end
11897
+ elsif Utils.match_status_code(http_response.status, ['412'])
11898
+ if Utils.match_content_type(content_type, 'application/json')
11899
+ http_response = @sdk_configuration.hooks.after_success(
11900
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11901
+ hook_ctx: hook_ctx
11902
+ ),
11903
+ response: http_response
11904
+ )
11905
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::PreconditionFailedResponse)
11906
+ throw obj
11907
+ else
11908
+ 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'
11909
+ end
11910
+ elsif Utils.match_status_code(http_response.status, ['422'])
11911
+ if Utils.match_content_type(content_type, 'application/json')
11912
+ http_response = @sdk_configuration.hooks.after_success(
11913
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11914
+ hook_ctx: hook_ctx
11915
+ ),
11916
+ response: http_response
11917
+ )
11918
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::UnprocessableEntityResponse)
11919
+ throw obj
11920
+ else
11921
+ 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'
11922
+ end
11923
+ elsif Utils.match_status_code(http_response.status, ['429'])
11924
+ if Utils.match_content_type(content_type, 'application/json')
11925
+ http_response = @sdk_configuration.hooks.after_success(
11926
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11927
+ hook_ctx: hook_ctx
11928
+ ),
11929
+ response: http_response
11930
+ )
11931
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::TooManyRequestsResponse)
11932
+ throw obj
11933
+ else
11934
+ 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'
11935
+ end
11936
+ elsif Utils.match_status_code(http_response.status, ['500'])
11937
+ if Utils.match_content_type(content_type, 'application/json')
11938
+ http_response = @sdk_configuration.hooks.after_success(
11939
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11940
+ hook_ctx: hook_ctx
11941
+ ),
11942
+ response: http_response
11943
+ )
11944
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::InternalServerErrorResponse)
11945
+ throw obj
11946
+ else
11947
+ 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'
11948
+ end
11949
+ elsif Utils.match_status_code(http_response.status, ['501'])
11950
+ if Utils.match_content_type(content_type, 'application/json')
11951
+ http_response = @sdk_configuration.hooks.after_success(
11952
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11953
+ hook_ctx: hook_ctx
11954
+ ),
11955
+ response: http_response
11956
+ )
11957
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::NotImplementedResponse)
11958
+ throw obj
11959
+ else
11960
+ 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'
11961
+ end
11962
+ elsif Utils.match_status_code(http_response.status, ['502'])
11963
+ if Utils.match_content_type(content_type, 'application/json')
11964
+ http_response = @sdk_configuration.hooks.after_success(
11965
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
11966
+ hook_ctx: hook_ctx
11967
+ ),
11968
+ response: http_response
11969
+ )
11970
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Errors::BadGatewayResponse)
11971
+ throw obj
11972
+ else
11973
+ 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'
11974
+ end
11975
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
11976
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
11977
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
11978
+ raise ::StackOne::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
11979
+ else
11980
+ 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'
11981
+
11982
+ end
11983
+ end
11984
+
11985
+
11986
+ sig { params(request: T.nilable(Models::Operations::HrisListEmployeeCategoriesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeCategoriesResponse) }
11987
+ def list_employee_categories(request, retries = nil, timeout_ms = nil)
11988
+ # list_employee_categories - List Employee Document Categories
11989
+ url, params = @sdk_configuration.get_server_details
11990
+ base_url = Utils.template_url(url, params)
11991
+ url = "#{base_url}/unified/hris/documents/employee_categories"
11992
+ headers = Utils.get_headers(request)
11993
+ query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeCategoriesRequest, request)
11994
+ headers['Accept'] = 'application/json'
11995
+ headers['user-agent'] = @sdk_configuration.user_agent
11996
+ retries ||= @sdk_configuration.retry_config
11997
+ retries ||= Utils::RetryConfig.new(
11998
+ backoff: Utils::BackoffStrategy.new(
11999
+ exponent: 1.5,
12000
+ initial_interval: 500,
12001
+ max_elapsed_time: 3_600_000,
12002
+ max_interval: 60_000
12003
+ ),
12004
+ retry_connection_errors: true,
12005
+ strategy: 'backoff'
12006
+ )
12007
+ retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
12008
+ retry_options[:retry_statuses] = [429, 408]
12009
+
12010
+ security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
12011
+
12012
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
12013
+ timeout ||= @sdk_configuration.timeout
12014
+
12015
+ connection = @sdk_configuration.client.dup
12016
+ connection.request :retry, retry_options
12017
+
12018
+ hook_ctx = SDKHooks::HookContext.new(
12019
+ base_url: base_url,
12020
+ oauth2_scopes: [],
12021
+ operation_id: 'hris_list_employee_categories',
12022
+ security_source: @sdk_configuration.security_source
12023
+ )
12024
+
12025
+ error = T.let(nil, T.nilable(StandardError))
12026
+ http_response = T.let(nil, T.nilable(Faraday::Response))
12027
+
12028
+
12029
+ begin
12030
+ http_response = connection.get(url) do |req|
12031
+ req.headers.merge!(headers)
12032
+ req.options.timeout = timeout unless timeout.nil?
12033
+ req.params = query_params
12034
+ Utils.configure_request_security(req, security)
12035
+
12036
+ @sdk_configuration.hooks.before_request(
12037
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
12038
+ hook_ctx: hook_ctx
12039
+ ),
12040
+ request: req
12041
+ )
12042
+ end
12043
+ rescue StandardError => e
12044
+ error = e
12045
+ ensure
12046
+ if http_response.nil? || Utils.error_status?(http_response.status)
12047
+ http_response = @sdk_configuration.hooks.after_error(
12048
+ error: error,
12049
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
12050
+ hook_ctx: hook_ctx
12051
+ ),
12052
+ response: http_response
12053
+ )
12054
+ else
12055
+ http_response = @sdk_configuration.hooks.after_success(
12056
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
12057
+ hook_ctx: hook_ctx
12058
+ ),
12059
+ response: http_response
12060
+ )
12061
+ end
12062
+
12063
+ if http_response.nil?
12064
+ raise error if !error.nil?
12065
+ raise 'no response'
12066
+ end
12067
+ end
12068
+
12069
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
12070
+ if Utils.match_status_code(http_response.status, ['200'])
12071
+ if Utils.match_content_type(content_type, 'application/json')
12072
+ http_response = @sdk_configuration.hooks.after_success(
12073
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
12074
+ hook_ctx: hook_ctx
12075
+ ),
12076
+ response: http_response
12077
+ )
12078
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ReferencePaginated)
12079
+ response = Models::Operations::HrisListEmployeeCategoriesResponse.new(
12080
+ status_code: http_response.status,
12081
+ content_type: content_type,
12082
+ raw_response: http_response,
12083
+ reference_paginated: obj
9896
12084
  )
9897
12085
 
9898
12086
  return response
@@ -10066,14 +12254,14 @@ module StackOne
10066
12254
  end
10067
12255
 
10068
12256
 
10069
- sig { params(request: T.nilable(Models::Operations::HrisListDepartmentGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListDepartmentGroupsResponse) }
10070
- def list_department_groups(request, retries = nil, timeout_ms = nil)
10071
- # list_department_groups - List Department Groups
12257
+ sig { params(request: T.nilable(Models::Operations::HrisListEmployeeCustomFieldDefinitionsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeCustomFieldDefinitionsResponse) }
12258
+ def list_employee_custom_field_definitions(request, retries = nil, timeout_ms = nil)
12259
+ # list_employee_custom_field_definitions - List employee Custom Field Definitions
10072
12260
  url, params = @sdk_configuration.get_server_details
10073
12261
  base_url = Utils.template_url(url, params)
10074
- url = "#{base_url}/unified/hris/groups/departments"
12262
+ url = "#{base_url}/unified/hris/custom_field_definitions/employees"
10075
12263
  headers = Utils.get_headers(request)
10076
- query_params = Utils.get_query_params(Models::Operations::HrisListDepartmentGroupsRequest, request)
12264
+ query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeCustomFieldDefinitionsRequest, request)
10077
12265
  headers['Accept'] = 'application/json'
10078
12266
  headers['user-agent'] = @sdk_configuration.user_agent
10079
12267
  retries ||= @sdk_configuration.retry_config
@@ -10101,7 +12289,7 @@ module StackOne
10101
12289
  hook_ctx = SDKHooks::HookContext.new(
10102
12290
  base_url: base_url,
10103
12291
  oauth2_scopes: [],
10104
- operation_id: 'hris_list_department_groups',
12292
+ operation_id: 'hris_list_employee_custom_field_definitions',
10105
12293
  security_source: @sdk_configuration.security_source
10106
12294
  )
10107
12295
 
@@ -10158,12 +12346,12 @@ module StackOne
10158
12346
  ),
10159
12347
  response: http_response
10160
12348
  )
10161
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISDepartmentsPaginated)
10162
- response = Models::Operations::HrisListDepartmentGroupsResponse.new(
12349
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::CustomFieldDefinitionsPaginated)
12350
+ response = Models::Operations::HrisListEmployeeCustomFieldDefinitionsResponse.new(
10163
12351
  status_code: http_response.status,
10164
12352
  content_type: content_type,
10165
12353
  raw_response: http_response,
10166
- hris_departments_paginated: obj
12354
+ custom_field_definitions_paginated: obj
10167
12355
  )
10168
12356
 
10169
12357
  return response
@@ -10337,14 +12525,19 @@ module StackOne
10337
12525
  end
10338
12526
 
10339
12527
 
10340
- sig { params(request: T.nilable(Models::Operations::HrisListEmployeeCategoriesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeCategoriesResponse) }
10341
- def list_employee_categories(request, retries = nil, timeout_ms = nil)
10342
- # list_employee_categories - List Employee Document Categories
12528
+ sig { params(request: T.nilable(Models::Operations::HrisListEmployeeDocumentsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeDocumentsResponse) }
12529
+ def list_employee_documents(request, retries = nil, timeout_ms = nil)
12530
+ # list_employee_documents - List Employee Documents
10343
12531
  url, params = @sdk_configuration.get_server_details
10344
12532
  base_url = Utils.template_url(url, params)
10345
- url = "#{base_url}/unified/hris/documents/employee_categories"
12533
+ url = Utils.generate_url(
12534
+ Models::Operations::HrisListEmployeeDocumentsRequest,
12535
+ base_url,
12536
+ '/unified/hris/employees/{id}/documents',
12537
+ request
12538
+ )
10346
12539
  headers = Utils.get_headers(request)
10347
- query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeCategoriesRequest, request)
12540
+ query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeDocumentsRequest, request)
10348
12541
  headers['Accept'] = 'application/json'
10349
12542
  headers['user-agent'] = @sdk_configuration.user_agent
10350
12543
  retries ||= @sdk_configuration.retry_config
@@ -10372,7 +12565,7 @@ module StackOne
10372
12565
  hook_ctx = SDKHooks::HookContext.new(
10373
12566
  base_url: base_url,
10374
12567
  oauth2_scopes: [],
10375
- operation_id: 'hris_list_employee_categories',
12568
+ operation_id: 'hris_list_employee_documents',
10376
12569
  security_source: @sdk_configuration.security_source
10377
12570
  )
10378
12571
 
@@ -10429,12 +12622,12 @@ module StackOne
10429
12622
  ),
10430
12623
  response: http_response
10431
12624
  )
10432
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::ReferencePaginated)
10433
- response = Models::Operations::HrisListEmployeeCategoriesResponse.new(
12625
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HrisDocumentsPaginated)
12626
+ response = Models::Operations::HrisListEmployeeDocumentsResponse.new(
10434
12627
  status_code: http_response.status,
10435
12628
  content_type: content_type,
10436
12629
  raw_response: http_response,
10437
- reference_paginated: obj
12630
+ hris_documents_paginated: obj
10438
12631
  )
10439
12632
 
10440
12633
  return response
@@ -10608,14 +12801,19 @@ module StackOne
10608
12801
  end
10609
12802
 
10610
12803
 
10611
- sig { params(request: T.nilable(Models::Operations::HrisListEmployeeCustomFieldDefinitionsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeCustomFieldDefinitionsResponse) }
10612
- def list_employee_custom_field_definitions(request, retries = nil, timeout_ms = nil)
10613
- # list_employee_custom_field_definitions - List employee Custom Field Definitions
12804
+ sig { params(request: T.nilable(Models::Operations::HrisListEmployeeEmploymentsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeEmploymentsResponse) }
12805
+ def list_employee_employments(request, retries = nil, timeout_ms = nil)
12806
+ # list_employee_employments - List Employee Employments
10614
12807
  url, params = @sdk_configuration.get_server_details
10615
12808
  base_url = Utils.template_url(url, params)
10616
- url = "#{base_url}/unified/hris/custom_field_definitions/employees"
12809
+ url = Utils.generate_url(
12810
+ Models::Operations::HrisListEmployeeEmploymentsRequest,
12811
+ base_url,
12812
+ '/unified/hris/employees/{id}/employments',
12813
+ request
12814
+ )
10617
12815
  headers = Utils.get_headers(request)
10618
- query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeCustomFieldDefinitionsRequest, request)
12816
+ query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeEmploymentsRequest, 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: 'hris_list_employee_custom_field_definitions',
12844
+ operation_id: 'hris_list_employee_employments',
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::CustomFieldDefinitionsPaginated)
10704
- response = Models::Operations::HrisListEmployeeCustomFieldDefinitionsResponse.new(
12901
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EmploymentsPaginated)
12902
+ response = Models::Operations::HrisListEmployeeEmploymentsResponse.new(
10705
12903
  status_code: http_response.status,
10706
12904
  content_type: content_type,
10707
12905
  raw_response: http_response,
10708
- custom_field_definitions_paginated: obj
12906
+ employments_paginated: obj
10709
12907
  )
10710
12908
 
10711
12909
  return response
@@ -10878,20 +13076,20 @@ module StackOne
10878
13076
  end
10879
13077
  end
10880
13078
 
10881
-
10882
- sig { params(request: T.nilable(Models::Operations::HrisListEmployeeDocumentsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeDocumentsResponse) }
10883
- def list_employee_documents(request, retries = nil, timeout_ms = nil)
10884
- # list_employee_documents - List Employee Documents
13079
+
13080
+ sig { params(request: T.nilable(Models::Operations::HrisListEmployeeSkillsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeSkillsResponse) }
13081
+ def list_employee_skills(request, retries = nil, timeout_ms = nil)
13082
+ # list_employee_skills - List Employee Skills
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::HrisListEmployeeDocumentsRequest,
13086
+ Models::Operations::HrisListEmployeeSkillsRequest,
10889
13087
  base_url,
10890
- '/unified/hris/employees/{id}/documents',
13088
+ '/unified/hris/employees/{id}/skills',
10891
13089
  request
10892
13090
  )
10893
13091
  headers = Utils.get_headers(request)
10894
- query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeDocumentsRequest, request)
13092
+ query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeSkillsRequest, 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: 'hris_list_employee_documents',
13120
+ operation_id: 'hris_list_employee_skills',
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::HrisDocumentsPaginated)
10980
- response = Models::Operations::HrisListEmployeeDocumentsResponse.new(
13177
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EntitySkillsPaginated)
13178
+ response = Models::Operations::HrisListEmployeeSkillsResponse.new(
10981
13179
  status_code: http_response.status,
10982
13180
  content_type: content_type,
10983
13181
  raw_response: http_response,
10984
- hris_documents_paginated: obj
13182
+ entity_skills_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::HrisListEmployeeEmploymentsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeEmploymentsResponse) }
11159
- def list_employee_employments(request, retries = nil, timeout_ms = nil)
11160
- # list_employee_employments - List Employee Employments
13356
+ sig { params(request: T.nilable(Models::Operations::HrisListEmployeeTasksRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeTasksResponse) }
13357
+ def list_employee_tasks(request, retries = nil, timeout_ms = nil)
13358
+ # list_employee_tasks - List Employee Tasks
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::HrisListEmployeeEmploymentsRequest,
13362
+ Models::Operations::HrisListEmployeeTasksRequest,
11165
13363
  base_url,
11166
- '/unified/hris/employees/{id}/employments',
13364
+ '/unified/hris/employees/{id}/tasks',
11167
13365
  request
11168
13366
  )
11169
13367
  headers = Utils.get_headers(request)
11170
- query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeEmploymentsRequest, request)
13368
+ query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeTasksRequest, 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: 'hris_list_employee_employments',
13396
+ operation_id: 'hris_list_employee_tasks',
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::EmploymentsPaginated)
11256
- response = Models::Operations::HrisListEmployeeEmploymentsResponse.new(
13453
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TasksPaginated)
13454
+ response = Models::Operations::HrisListEmployeeTasksResponse.new(
11257
13455
  status_code: http_response.status,
11258
13456
  content_type: content_type,
11259
13457
  raw_response: http_response,
11260
- employments_paginated: obj
13458
+ tasks_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::HrisListEmployeeSkillsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeSkillsResponse) }
11435
- def list_employee_skills(request, retries = nil, timeout_ms = nil)
11436
- # list_employee_skills - List Employee Skills
13632
+ sig { params(request: T.nilable(Models::Operations::HrisListEmployeeTimeOffBalancesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeTimeOffBalancesResponse) }
13633
+ def list_employee_time_off_balances(request, retries = nil, timeout_ms = nil)
13634
+ # list_employee_time_off_balances - List Employee Time Off Balances
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::HrisListEmployeeSkillsRequest,
13638
+ Models::Operations::HrisListEmployeeTimeOffBalancesRequest,
11441
13639
  base_url,
11442
- '/unified/hris/employees/{id}/skills',
13640
+ '/unified/hris/employees/{id}/time_off_balances',
11443
13641
  request
11444
13642
  )
11445
13643
  headers = Utils.get_headers(request)
11446
- query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeSkillsRequest, request)
13644
+ query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeTimeOffBalancesRequest, 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: 'hris_list_employee_skills',
13672
+ operation_id: 'hris_list_employee_time_off_balances',
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::EntitySkillsPaginated)
11532
- response = Models::Operations::HrisListEmployeeSkillsResponse.new(
13729
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffBalancesPaginated)
13730
+ response = Models::Operations::HrisListEmployeeTimeOffBalancesResponse.new(
11533
13731
  status_code: http_response.status,
11534
13732
  content_type: content_type,
11535
13733
  raw_response: http_response,
11536
- entity_skills_paginated: obj
13734
+ time_off_balances_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::HrisListEmployeeTasksRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeTasksResponse) }
11711
- def list_employee_tasks(request, retries = nil, timeout_ms = nil)
11712
- # list_employee_tasks - List Employee Tasks
13908
+ sig { params(request: T.nilable(Models::Operations::HrisListEmployeeTimeOffPoliciesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeTimeOffPoliciesResponse) }
13909
+ def list_employee_time_off_policies(request, retries = nil, timeout_ms = nil)
13910
+ # list_employee_time_off_policies - List Assigned Time Off Policies
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::HrisListEmployeeTasksRequest,
13914
+ Models::Operations::HrisListEmployeeTimeOffPoliciesRequest,
11717
13915
  base_url,
11718
- '/unified/hris/employees/{id}/tasks',
13916
+ '/unified/hris/employees/{id}/time_off_policies',
11719
13917
  request
11720
13918
  )
11721
13919
  headers = Utils.get_headers(request)
11722
- query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeTasksRequest, request)
13920
+ query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeTimeOffPoliciesRequest, 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: 'hris_list_employee_tasks',
13948
+ operation_id: 'hris_list_employee_time_off_policies',
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::TasksPaginated)
11808
- response = Models::Operations::HrisListEmployeeTasksResponse.new(
14005
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffPoliciesPaginated)
14006
+ response = Models::Operations::HrisListEmployeeTimeOffPoliciesResponse.new(
11809
14007
  status_code: http_response.status,
11810
14008
  content_type: content_type,
11811
14009
  raw_response: http_response,
11812
- tasks_paginated: obj
14010
+ time_off_policies_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::HrisListEmployeeTimeOffBalancesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeTimeOffBalancesResponse) }
11987
- def list_employee_time_off_balances(request, retries = nil, timeout_ms = nil)
11988
- # list_employee_time_off_balances - List Employee Time Off Balances
14184
+ sig { params(request: T.nilable(Models::Operations::HrisListEmployeeTimeOffRequestsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeTimeOffRequestsResponse) }
14185
+ def list_employee_time_off_requests(request, retries = nil, timeout_ms = nil)
14186
+ # list_employee_time_off_requests - List Employee Time Off Requests
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::HrisListEmployeeTimeOffBalancesRequest,
14190
+ Models::Operations::HrisListEmployeeTimeOffRequestsRequest,
11993
14191
  base_url,
11994
- '/unified/hris/employees/{id}/time_off_balances',
14192
+ '/unified/hris/employees/{id}/time_off',
11995
14193
  request
11996
14194
  )
11997
14195
  headers = Utils.get_headers(request)
11998
- query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeTimeOffBalancesRequest, request)
14196
+ query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeTimeOffRequestsRequest, 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: 'hris_list_employee_time_off_balances',
14224
+ operation_id: 'hris_list_employee_time_off_requests',
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::TimeOffBalancesPaginated)
12084
- response = Models::Operations::HrisListEmployeeTimeOffBalancesResponse.new(
14281
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffPaginated)
14282
+ response = Models::Operations::HrisListEmployeeTimeOffRequestsResponse.new(
12085
14283
  status_code: http_response.status,
12086
14284
  content_type: content_type,
12087
14285
  raw_response: http_response,
12088
- time_off_balances_paginated: obj
14286
+ time_off_paginated: obj
12089
14287
  )
12090
14288
 
12091
14289
  return response
@@ -12259,19 +14457,19 @@ module StackOne
12259
14457
  end
12260
14458
 
12261
14459
 
12262
- sig { params(request: T.nilable(Models::Operations::HrisListEmployeeTimeOffPoliciesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeTimeOffPoliciesResponse) }
12263
- def list_employee_time_off_policies(request, retries = nil, timeout_ms = nil)
12264
- # list_employee_time_off_policies - List Assigned Time Off Policies
14460
+ sig { params(request: T.nilable(Models::Operations::HrisListEmployeeWorkEligibilityRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeWorkEligibilityResponse) }
14461
+ def list_employee_work_eligibility(request, retries = nil, timeout_ms = nil)
14462
+ # list_employee_work_eligibility - List Employee Work Eligibility
12265
14463
  url, params = @sdk_configuration.get_server_details
12266
14464
  base_url = Utils.template_url(url, params)
12267
14465
  url = Utils.generate_url(
12268
- Models::Operations::HrisListEmployeeTimeOffPoliciesRequest,
14466
+ Models::Operations::HrisListEmployeeWorkEligibilityRequest,
12269
14467
  base_url,
12270
- '/unified/hris/employees/{id}/time_off_policies',
14468
+ '/unified/hris/employees/{id}/work_eligibility',
12271
14469
  request
12272
14470
  )
12273
14471
  headers = Utils.get_headers(request)
12274
- query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeTimeOffPoliciesRequest, request)
14472
+ query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeWorkEligibilityRequest, request)
12275
14473
  headers['Accept'] = 'application/json'
12276
14474
  headers['user-agent'] = @sdk_configuration.user_agent
12277
14475
  retries ||= @sdk_configuration.retry_config
@@ -12299,7 +14497,7 @@ module StackOne
12299
14497
  hook_ctx = SDKHooks::HookContext.new(
12300
14498
  base_url: base_url,
12301
14499
  oauth2_scopes: [],
12302
- operation_id: 'hris_list_employee_time_off_policies',
14500
+ operation_id: 'hris_list_employee_work_eligibility',
12303
14501
  security_source: @sdk_configuration.security_source
12304
14502
  )
12305
14503
 
@@ -12356,12 +14554,12 @@ module StackOne
12356
14554
  ),
12357
14555
  response: http_response
12358
14556
  )
12359
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffPoliciesPaginated)
12360
- response = Models::Operations::HrisListEmployeeTimeOffPoliciesResponse.new(
14557
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::WorkEligibilityPaginated)
14558
+ response = Models::Operations::HrisListEmployeeWorkEligibilityResponse.new(
12361
14559
  status_code: http_response.status,
12362
14560
  content_type: content_type,
12363
14561
  raw_response: http_response,
12364
- time_off_policies_paginated: obj
14562
+ work_eligibility_paginated: obj
12365
14563
  )
12366
14564
 
12367
14565
  return response
@@ -12535,19 +14733,14 @@ module StackOne
12535
14733
  end
12536
14734
 
12537
14735
 
12538
- sig { params(request: T.nilable(Models::Operations::HrisListEmployeeTimeOffRequestsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeTimeOffRequestsResponse) }
12539
- def list_employee_time_off_requests(request, retries = nil, timeout_ms = nil)
12540
- # list_employee_time_off_requests - List Employee Time Off Requests
14736
+ sig { params(request: T.nilable(Models::Operations::HrisListEmployeesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeesResponse) }
14737
+ def list_employees(request, retries = nil, timeout_ms = nil)
14738
+ # list_employees - List Employees
12541
14739
  url, params = @sdk_configuration.get_server_details
12542
14740
  base_url = Utils.template_url(url, params)
12543
- url = Utils.generate_url(
12544
- Models::Operations::HrisListEmployeeTimeOffRequestsRequest,
12545
- base_url,
12546
- '/unified/hris/employees/{id}/time_off',
12547
- request
12548
- )
14741
+ url = "#{base_url}/unified/hris/employees"
12549
14742
  headers = Utils.get_headers(request)
12550
- query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeTimeOffRequestsRequest, request)
14743
+ query_params = Utils.get_query_params(Models::Operations::HrisListEmployeesRequest, request)
12551
14744
  headers['Accept'] = 'application/json'
12552
14745
  headers['user-agent'] = @sdk_configuration.user_agent
12553
14746
  retries ||= @sdk_configuration.retry_config
@@ -12575,7 +14768,7 @@ module StackOne
12575
14768
  hook_ctx = SDKHooks::HookContext.new(
12576
14769
  base_url: base_url,
12577
14770
  oauth2_scopes: [],
12578
- operation_id: 'hris_list_employee_time_off_requests',
14771
+ operation_id: 'hris_list_employees',
12579
14772
  security_source: @sdk_configuration.security_source
12580
14773
  )
12581
14774
 
@@ -12632,12 +14825,12 @@ module StackOne
12632
14825
  ),
12633
14826
  response: http_response
12634
14827
  )
12635
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TimeOffPaginated)
12636
- response = Models::Operations::HrisListEmployeeTimeOffRequestsResponse.new(
14828
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EmployeesPaginated)
14829
+ response = Models::Operations::HrisListEmployeesResponse.new(
12637
14830
  status_code: http_response.status,
12638
14831
  content_type: content_type,
12639
14832
  raw_response: http_response,
12640
- time_off_paginated: obj
14833
+ employees_paginated: obj
12641
14834
  )
12642
14835
 
12643
14836
  return response
@@ -12811,19 +15004,14 @@ module StackOne
12811
15004
  end
12812
15005
 
12813
15006
 
12814
- sig { params(request: T.nilable(Models::Operations::HrisListEmployeeWorkEligibilityRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeeWorkEligibilityResponse) }
12815
- def list_employee_work_eligibility(request, retries = nil, timeout_ms = nil)
12816
- # list_employee_work_eligibility - List Employee Work Eligibility
15007
+ sig { params(request: T.nilable(Models::Operations::HrisListEmploymentsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmploymentsResponse) }
15008
+ def list_employments(request, retries = nil, timeout_ms = nil)
15009
+ # list_employments - List Employments
12817
15010
  url, params = @sdk_configuration.get_server_details
12818
15011
  base_url = Utils.template_url(url, params)
12819
- url = Utils.generate_url(
12820
- Models::Operations::HrisListEmployeeWorkEligibilityRequest,
12821
- base_url,
12822
- '/unified/hris/employees/{id}/work_eligibility',
12823
- request
12824
- )
15012
+ url = "#{base_url}/unified/hris/employments"
12825
15013
  headers = Utils.get_headers(request)
12826
- query_params = Utils.get_query_params(Models::Operations::HrisListEmployeeWorkEligibilityRequest, request)
15014
+ query_params = Utils.get_query_params(Models::Operations::HrisListEmploymentsRequest, request)
12827
15015
  headers['Accept'] = 'application/json'
12828
15016
  headers['user-agent'] = @sdk_configuration.user_agent
12829
15017
  retries ||= @sdk_configuration.retry_config
@@ -12851,7 +15039,7 @@ module StackOne
12851
15039
  hook_ctx = SDKHooks::HookContext.new(
12852
15040
  base_url: base_url,
12853
15041
  oauth2_scopes: [],
12854
- operation_id: 'hris_list_employee_work_eligibility',
15042
+ operation_id: 'hris_list_employments',
12855
15043
  security_source: @sdk_configuration.security_source
12856
15044
  )
12857
15045
 
@@ -12908,12 +15096,12 @@ module StackOne
12908
15096
  ),
12909
15097
  response: http_response
12910
15098
  )
12911
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::WorkEligibilityPaginated)
12912
- response = Models::Operations::HrisListEmployeeWorkEligibilityResponse.new(
15099
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EmploymentsPaginated)
15100
+ response = Models::Operations::HrisListEmploymentsResponse.new(
12913
15101
  status_code: http_response.status,
12914
15102
  content_type: content_type,
12915
15103
  raw_response: http_response,
12916
- work_eligibility_paginated: obj
15104
+ employments_paginated: obj
12917
15105
  )
12918
15106
 
12919
15107
  return response
@@ -13087,14 +15275,14 @@ module StackOne
13087
15275
  end
13088
15276
 
13089
15277
 
13090
- sig { params(request: T.nilable(Models::Operations::HrisListEmployeesRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmployeesResponse) }
13091
- def list_employees(request, retries = nil, timeout_ms = nil)
13092
- # list_employees - List Employees
15278
+ sig { params(request: T.nilable(Models::Operations::HrisListGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListGroupsResponse) }
15279
+ def list_groups(request, retries = nil, timeout_ms = nil)
15280
+ # list_groups - List Groups
13093
15281
  url, params = @sdk_configuration.get_server_details
13094
15282
  base_url = Utils.template_url(url, params)
13095
- url = "#{base_url}/unified/hris/employees"
15283
+ url = "#{base_url}/unified/hris/groups"
13096
15284
  headers = Utils.get_headers(request)
13097
- query_params = Utils.get_query_params(Models::Operations::HrisListEmployeesRequest, request)
15285
+ query_params = Utils.get_query_params(Models::Operations::HrisListGroupsRequest, request)
13098
15286
  headers['Accept'] = 'application/json'
13099
15287
  headers['user-agent'] = @sdk_configuration.user_agent
13100
15288
  retries ||= @sdk_configuration.retry_config
@@ -13122,7 +15310,7 @@ module StackOne
13122
15310
  hook_ctx = SDKHooks::HookContext.new(
13123
15311
  base_url: base_url,
13124
15312
  oauth2_scopes: [],
13125
- operation_id: 'hris_list_employees',
15313
+ operation_id: 'hris_list_groups',
13126
15314
  security_source: @sdk_configuration.security_source
13127
15315
  )
13128
15316
 
@@ -13179,12 +15367,12 @@ module StackOne
13179
15367
  ),
13180
15368
  response: http_response
13181
15369
  )
13182
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EmployeesPaginated)
13183
- response = Models::Operations::HrisListEmployeesResponse.new(
15370
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISGroupsPaginated)
15371
+ response = Models::Operations::HrisListGroupsResponse.new(
13184
15372
  status_code: http_response.status,
13185
15373
  content_type: content_type,
13186
15374
  raw_response: http_response,
13187
- employees_paginated: obj
15375
+ hris_groups_paginated: obj
13188
15376
  )
13189
15377
 
13190
15378
  return response
@@ -13358,14 +15546,14 @@ module StackOne
13358
15546
  end
13359
15547
 
13360
15548
 
13361
- sig { params(request: T.nilable(Models::Operations::HrisListEmploymentsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListEmploymentsResponse) }
13362
- def list_employments(request, retries = nil, timeout_ms = nil)
13363
- # list_employments - List Employments
15549
+ sig { params(request: T.nilable(Models::Operations::HrisListJobsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListJobsResponse) }
15550
+ def list_jobs(request, retries = nil, timeout_ms = nil)
15551
+ # list_jobs - List Jobs
13364
15552
  url, params = @sdk_configuration.get_server_details
13365
15553
  base_url = Utils.template_url(url, params)
13366
- url = "#{base_url}/unified/hris/employments"
15554
+ url = "#{base_url}/unified/hris/jobs"
13367
15555
  headers = Utils.get_headers(request)
13368
- query_params = Utils.get_query_params(Models::Operations::HrisListEmploymentsRequest, request)
15556
+ query_params = Utils.get_query_params(Models::Operations::HrisListJobsRequest, request)
13369
15557
  headers['Accept'] = 'application/json'
13370
15558
  headers['user-agent'] = @sdk_configuration.user_agent
13371
15559
  retries ||= @sdk_configuration.retry_config
@@ -13393,7 +15581,7 @@ module StackOne
13393
15581
  hook_ctx = SDKHooks::HookContext.new(
13394
15582
  base_url: base_url,
13395
15583
  oauth2_scopes: [],
13396
- operation_id: 'hris_list_employments',
15584
+ operation_id: 'hris_list_jobs',
13397
15585
  security_source: @sdk_configuration.security_source
13398
15586
  )
13399
15587
 
@@ -13450,12 +15638,12 @@ module StackOne
13450
15638
  ),
13451
15639
  response: http_response
13452
15640
  )
13453
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::EmploymentsPaginated)
13454
- response = Models::Operations::HrisListEmploymentsResponse.new(
15641
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::JobsPaginated)
15642
+ response = Models::Operations::HrisListJobsResponse.new(
13455
15643
  status_code: http_response.status,
13456
15644
  content_type: content_type,
13457
15645
  raw_response: http_response,
13458
- employments_paginated: obj
15646
+ jobs_paginated: obj
13459
15647
  )
13460
15648
 
13461
15649
  return response
@@ -13629,14 +15817,14 @@ module StackOne
13629
15817
  end
13630
15818
 
13631
15819
 
13632
- sig { params(request: T.nilable(Models::Operations::HrisListGroupsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListGroupsResponse) }
13633
- def list_groups(request, retries = nil, timeout_ms = nil)
13634
- # list_groups - List Groups
15820
+ sig { params(request: T.nilable(Models::Operations::HrisListLocationsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListLocationsResponse) }
15821
+ def list_locations(request, retries = nil, timeout_ms = nil)
15822
+ # list_locations - List Work Locations
13635
15823
  url, params = @sdk_configuration.get_server_details
13636
15824
  base_url = Utils.template_url(url, params)
13637
- url = "#{base_url}/unified/hris/groups"
15825
+ url = "#{base_url}/unified/hris/locations"
13638
15826
  headers = Utils.get_headers(request)
13639
- query_params = Utils.get_query_params(Models::Operations::HrisListGroupsRequest, request)
15827
+ query_params = Utils.get_query_params(Models::Operations::HrisListLocationsRequest, request)
13640
15828
  headers['Accept'] = 'application/json'
13641
15829
  headers['user-agent'] = @sdk_configuration.user_agent
13642
15830
  retries ||= @sdk_configuration.retry_config
@@ -13664,7 +15852,7 @@ module StackOne
13664
15852
  hook_ctx = SDKHooks::HookContext.new(
13665
15853
  base_url: base_url,
13666
15854
  oauth2_scopes: [],
13667
- operation_id: 'hris_list_groups',
15855
+ operation_id: 'hris_list_locations',
13668
15856
  security_source: @sdk_configuration.security_source
13669
15857
  )
13670
15858
 
@@ -13721,12 +15909,12 @@ module StackOne
13721
15909
  ),
13722
15910
  response: http_response
13723
15911
  )
13724
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISGroupsPaginated)
13725
- response = Models::Operations::HrisListGroupsResponse.new(
15912
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISLocationsPaginated)
15913
+ response = Models::Operations::HrisListLocationsResponse.new(
13726
15914
  status_code: http_response.status,
13727
15915
  content_type: content_type,
13728
15916
  raw_response: http_response,
13729
- hris_groups_paginated: obj
15917
+ hris_locations_paginated: obj
13730
15918
  )
13731
15919
 
13732
15920
  return response
@@ -13900,14 +16088,14 @@ module StackOne
13900
16088
  end
13901
16089
 
13902
16090
 
13903
- sig { params(request: T.nilable(Models::Operations::HrisListJobsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListJobsResponse) }
13904
- def list_jobs(request, retries = nil, timeout_ms = nil)
13905
- # list_jobs - List Jobs
16091
+ sig { params(request: T.nilable(Models::Operations::HrisListPositionsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListPositionsResponse) }
16092
+ def list_positions(request, retries = nil, timeout_ms = nil)
16093
+ # list_positions - List Positions
13906
16094
  url, params = @sdk_configuration.get_server_details
13907
16095
  base_url = Utils.template_url(url, params)
13908
- url = "#{base_url}/unified/hris/jobs"
16096
+ url = "#{base_url}/unified/hris/positions"
13909
16097
  headers = Utils.get_headers(request)
13910
- query_params = Utils.get_query_params(Models::Operations::HrisListJobsRequest, request)
16098
+ query_params = Utils.get_query_params(Models::Operations::HrisListPositionsRequest, request)
13911
16099
  headers['Accept'] = 'application/json'
13912
16100
  headers['user-agent'] = @sdk_configuration.user_agent
13913
16101
  retries ||= @sdk_configuration.retry_config
@@ -13935,7 +16123,7 @@ module StackOne
13935
16123
  hook_ctx = SDKHooks::HookContext.new(
13936
16124
  base_url: base_url,
13937
16125
  oauth2_scopes: [],
13938
- operation_id: 'hris_list_jobs',
16126
+ operation_id: 'hris_list_positions',
13939
16127
  security_source: @sdk_configuration.security_source
13940
16128
  )
13941
16129
 
@@ -13992,12 +16180,12 @@ module StackOne
13992
16180
  ),
13993
16181
  response: http_response
13994
16182
  )
13995
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::JobsPaginated)
13996
- response = Models::Operations::HrisListJobsResponse.new(
16183
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::PositionsPaginated)
16184
+ response = Models::Operations::HrisListPositionsResponse.new(
13997
16185
  status_code: http_response.status,
13998
16186
  content_type: content_type,
13999
16187
  raw_response: http_response,
14000
- jobs_paginated: obj
16188
+ positions_paginated: obj
14001
16189
  )
14002
16190
 
14003
16191
  return response
@@ -14171,14 +16359,14 @@ module StackOne
14171
16359
  end
14172
16360
 
14173
16361
 
14174
- sig { params(request: T.nilable(Models::Operations::HrisListLocationsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListLocationsResponse) }
14175
- def list_locations(request, retries = nil, timeout_ms = nil)
14176
- # list_locations - List Work Locations
16362
+ sig { params(request: T.nilable(Models::Operations::HrisListShiftsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListShiftsResponse) }
16363
+ def list_shifts(request, retries = nil, timeout_ms = nil)
16364
+ # list_shifts - List Shifts
14177
16365
  url, params = @sdk_configuration.get_server_details
14178
16366
  base_url = Utils.template_url(url, params)
14179
- url = "#{base_url}/unified/hris/locations"
16367
+ url = "#{base_url}/unified/hris/shifts"
14180
16368
  headers = Utils.get_headers(request)
14181
- query_params = Utils.get_query_params(Models::Operations::HrisListLocationsRequest, request)
16369
+ query_params = Utils.get_query_params(Models::Operations::HrisListShiftsRequest, request)
14182
16370
  headers['Accept'] = 'application/json'
14183
16371
  headers['user-agent'] = @sdk_configuration.user_agent
14184
16372
  retries ||= @sdk_configuration.retry_config
@@ -14206,7 +16394,7 @@ module StackOne
14206
16394
  hook_ctx = SDKHooks::HookContext.new(
14207
16395
  base_url: base_url,
14208
16396
  oauth2_scopes: [],
14209
- operation_id: 'hris_list_locations',
16397
+ operation_id: 'hris_list_shifts',
14210
16398
  security_source: @sdk_configuration.security_source
14211
16399
  )
14212
16400
 
@@ -14263,12 +16451,12 @@ module StackOne
14263
16451
  ),
14264
16452
  response: http_response
14265
16453
  )
14266
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HRISLocationsPaginated)
14267
- response = Models::Operations::HrisListLocationsResponse.new(
16454
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::HrisShiftsPaginated)
16455
+ response = Models::Operations::HrisListShiftsResponse.new(
14268
16456
  status_code: http_response.status,
14269
16457
  content_type: content_type,
14270
16458
  raw_response: http_response,
14271
- hris_locations_paginated: obj
16459
+ hris_shifts_paginated: obj
14272
16460
  )
14273
16461
 
14274
16462
  return response
@@ -14442,14 +16630,14 @@ module StackOne
14442
16630
  end
14443
16631
 
14444
16632
 
14445
- sig { params(request: T.nilable(Models::Operations::HrisListPositionsRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListPositionsResponse) }
14446
- def list_positions(request, retries = nil, timeout_ms = nil)
14447
- # list_positions - List Positions
16633
+ sig { params(request: T.nilable(Models::Operations::HrisListTasksRequest), retries: T.nilable(Utils::RetryConfig), timeout_ms: T.nilable(Integer)).returns(Models::Operations::HrisListTasksResponse) }
16634
+ def list_tasks(request, retries = nil, timeout_ms = nil)
16635
+ # list_tasks - List Tasks
14448
16636
  url, params = @sdk_configuration.get_server_details
14449
16637
  base_url = Utils.template_url(url, params)
14450
- url = "#{base_url}/unified/hris/positions"
16638
+ url = "#{base_url}/unified/hris/tasks"
14451
16639
  headers = Utils.get_headers(request)
14452
- query_params = Utils.get_query_params(Models::Operations::HrisListPositionsRequest, request)
16640
+ query_params = Utils.get_query_params(Models::Operations::HrisListTasksRequest, request)
14453
16641
  headers['Accept'] = 'application/json'
14454
16642
  headers['user-agent'] = @sdk_configuration.user_agent
14455
16643
  retries ||= @sdk_configuration.retry_config
@@ -14477,7 +16665,7 @@ module StackOne
14477
16665
  hook_ctx = SDKHooks::HookContext.new(
14478
16666
  base_url: base_url,
14479
16667
  oauth2_scopes: [],
14480
- operation_id: 'hris_list_positions',
16668
+ operation_id: 'hris_list_tasks',
14481
16669
  security_source: @sdk_configuration.security_source
14482
16670
  )
14483
16671
 
@@ -14534,12 +16722,12 @@ module StackOne
14534
16722
  ),
14535
16723
  response: http_response
14536
16724
  )
14537
- obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::PositionsPaginated)
14538
- response = Models::Operations::HrisListPositionsResponse.new(
16725
+ obj = Crystalline.unmarshal_json(JSON.parse(http_response.env.response_body), Models::Shared::TasksPaginated)
16726
+ response = Models::Operations::HrisListTasksResponse.new(
14539
16727
  status_code: http_response.status,
14540
16728
  content_type: content_type,
14541
16729
  raw_response: http_response,
14542
- positions_paginated: obj
16730
+ tasks_paginated: obj
14543
16731
  )
14544
16732
 
14545
16733
  return response