stackone_client 0.2.43 → 0.2.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stack_one/crm.rb +71 -0
- data/lib/stack_one/hris.rb +176 -0
- data/lib/stack_one/lms.rb +41 -0
- data/lib/stack_one/models/operations/create_request.rb +30 -0
- data/lib/stack_one/models/operations/create_response.rb +33 -0
- data/lib/stack_one/models/operations/crm_get_contact_custom_field_definition_queryparam_filter.rb +24 -0
- data/lib/stack_one/models/operations/crm_get_contact_custom_field_definition_request.rb +60 -0
- data/lib/stack_one/models/operations/crm_get_contact_custom_field_definition_response.rb +33 -0
- data/lib/stack_one/models/operations/crm_list_contact_custom_field_definitions_queryparam_filter.rb +24 -0
- data/lib/stack_one/models/operations/crm_list_contact_custom_field_definitions_request.rb +57 -0
- data/lib/stack_one/models/operations/crm_list_contact_custom_field_definitions_response.rb +33 -0
- data/lib/stack_one/models/operations/hris_create_employee_employment_request.rb +30 -0
- data/lib/stack_one/models/operations/hris_create_employee_employment_response.rb +33 -0
- data/lib/stack_one/models/operations/hris_get_cost_center_group_request.rb +36 -0
- data/lib/stack_one/models/operations/hris_get_cost_center_group_response.rb +33 -0
- data/lib/stack_one/models/operations/hris_list_cost_center_groups_queryparam_filter.rb +24 -0
- data/lib/stack_one/models/operations/hris_list_cost_center_groups_request.rb +52 -0
- data/lib/stack_one/models/operations/hris_list_cost_center_groups_response.rb +33 -0
- data/lib/stack_one/models/operations/hris_update_employee_employment_request.rb +33 -0
- data/lib/stack_one/models/operations/hris_update_employee_employment_response.rb +33 -0
- data/lib/stack_one/models/operations/lms_delete_content_request.rb +27 -0
- data/lib/stack_one/models/operations/lms_delete_content_response.rb +33 -0
- data/lib/stack_one/models/operations/lms_list_assignments_queryparam_filter.rb +6 -3
- data/lib/stack_one/models/operations/lms_list_assignments_request.rb +3 -9
- data/lib/stack_one/models/operations/lms_list_user_assignments_queryparam_filter.rb +6 -3
- data/lib/stack_one/models/operations/lms_list_user_assignments_request.rb +3 -9
- data/lib/stack_one/models/operations.rb +19 -0
- data/lib/stack_one/models/shared/assignment.rb +23 -2
- data/lib/stack_one/models/shared/atsdocumentapimodel_value.rb +1 -0
- data/lib/stack_one/models/shared/content_launch_method.rb +27 -0
- data/lib/stack_one/models/shared/content_value.rb +1 -0
- data/lib/stack_one/models/shared/createemploymentapimodel.rb +5 -8
- data/lib/stack_one/models/shared/createevent.rb +27 -0
- data/lib/stack_one/models/shared/createeventresponse.rb +33 -0
- data/lib/stack_one/models/shared/crmcreatecontactrequestdto.rb +5 -2
- data/lib/stack_one/models/shared/deleteresult.rb +30 -0
- data/lib/stack_one/models/shared/employee_schemas_country.rb +2 -2
- data/lib/stack_one/models/shared/employee_schemas_national_identity_number_type_value.rb +128 -0
- data/lib/stack_one/models/shared/employee_schemas_national_identity_number_value.rb +250 -6
- data/lib/stack_one/models/shared/employee_schemas_work_location_country.rb +27 -0
- data/lib/stack_one/models/shared/employee_type.rb +2 -2
- data/lib/stack_one/models/shared/employment.rb +5 -2
- data/lib/stack_one/models/shared/hriscostcenter.rb +48 -0
- data/lib/stack_one/models/shared/hriscostcenter_type.rb +27 -0
- data/lib/stack_one/models/shared/hriscostcenter_value.rb +23 -0
- data/lib/stack_one/models/shared/hriscostcenterpaginated.rb +33 -0
- data/lib/stack_one/models/shared/hriscostcenterresult.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_national_identity_number.rb +5 -2
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_country.rb +2 -2
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_national_identity_number_type_value.rb +128 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_national_identity_number_value.rb +250 -6
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_schemas_work_location_country.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_type.rb +2 -2
- data/lib/stack_one/models/shared/hriscreateemployeerequestdto_work_location.rb +2 -2
- data/lib/stack_one/models/shared/hriscreateemploymentrequestdto.rb +60 -0
- data/lib/stack_one/models/shared/hriscreateemploymentrequestdto_employment_contract_type.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemploymentrequestdto_employment_type.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemploymentrequestdto_pay_frequency.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemploymentrequestdto_pay_period.rb +27 -0
- data/lib/stack_one/models/shared/hriscreateemploymentrequestdto_schemas_pay_frequency_value.rb +31 -0
- data/lib/stack_one/models/shared/hriscreateemploymentrequestdto_schemas_pay_period_value.rb +29 -0
- data/lib/stack_one/models/shared/hriscreateemploymentrequestdto_schemas_value.rb +33 -0
- data/lib/stack_one/models/shared/hriscreateemploymentrequestdto_value.rb +20 -0
- data/lib/stack_one/models/shared/hriscreatetimeoffrequestdto_schemas_value.rb +5 -0
- data/lib/stack_one/models/shared/hriscreateworkeligibilityrequestdto_schemas_document_value.rb +1 -0
- data/lib/stack_one/models/shared/hrisdepartment.rb +6 -3
- data/lib/stack_one/models/shared/hrisdocumentapimodel_schemas_value.rb +1 -0
- data/lib/stack_one/models/shared/hrisdocumentsuploadrequestdto_schemas_file_format_value.rb +1 -0
- data/lib/stack_one/models/shared/hrisgroup.rb +6 -3
- data/lib/stack_one/models/shared/hrisgroup_value.rb +1 -0
- data/lib/stack_one/models/shared/iamgroup_value.rb +1 -0
- data/lib/stack_one/models/shared/iamuser_schemas_value.rb +1 -0
- data/lib/stack_one/models/shared/learningobjecttypeenum.rb +27 -0
- data/lib/stack_one/models/shared/learningobjecttypeenum_value.rb +19 -0
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto.rb +6 -3
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_content_type.rb +2 -2
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_schemas_value.rb +19 -0
- data/lib/stack_one/models/shared/lmscreatecontentrequestdto_value.rb +2 -3
- data/lib/stack_one/models/shared/lmsupsertcontentrequestdto.rb +6 -3
- data/lib/stack_one/models/shared/lmsupsertcontentrequestdto_content_launch_method.rb +27 -0
- data/lib/stack_one/models/shared/lmsupsertcontentrequestdto_content_type.rb +2 -2
- data/lib/stack_one/models/shared/lmsupsertcontentrequestdto_schemas_value.rb +19 -0
- data/lib/stack_one/models/shared/lmsupsertcontentrequestdto_value.rb +2 -3
- data/lib/stack_one/models/shared/national_identity_number.rb +5 -2
- data/lib/stack_one/models/shared/timeoff_schemas_value.rb +5 -0
- data/lib/stack_one/models/shared/unifieduploadrequestdto_schemas_value.rb +1 -0
- data/lib/stack_one/models/shared/work_location.rb +2 -2
- data/lib/stack_one/models/shared/workeligibility_schemas_document_value.rb +1 -0
- data/lib/stack_one/models/shared.rb +39 -12
- data/lib/stack_one/sdkconfiguration.rb +3 -3
- data/lib/stack_one/stackone.rb +2 -1
- data/lib/stack_one/webhooks.rb +73 -0
- data/lib/stackone_client.rb +1 -0
- metadata +49 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b651c91bad281ccd73b75409e185ccad966c5173d60d4d963295d804d290400b
|
4
|
+
data.tar.gz: 03fcdebd60c6c467860778a2c701bfd8be2ea50bb64f2333ffa0e1885b988856
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3be265678aa75398c2317c6ce979096edbc82009a7731186179d3f0bd2d40f05a8598b5bb457b259bf98d2c19e6ea698344c82c0afb61ee1dee0bd7c3547810f
|
7
|
+
data.tar.gz: 56a87a2adaf173c1cc39691f3de10fc59c02380f1e24c637c15b0f270667515ccc716e273766ba18826df5758f5b1fa3218657085dd5cf096bb69b643fceb37f
|
data/lib/stack_one/crm.rb
CHANGED
@@ -141,6 +141,44 @@ module StackOne
|
|
141
141
|
end
|
142
142
|
|
143
143
|
|
144
|
+
sig { params(request: T.nilable(::StackOne::Operations::CrmGetContactCustomFieldDefinitionRequest)).returns(::StackOne::Operations::CrmGetContactCustomFieldDefinitionResponse) }
|
145
|
+
def get_contact_custom_field_definition(request)
|
146
|
+
# get_contact_custom_field_definition - Get Contact Custom Field Definition
|
147
|
+
url, params = @sdk_configuration.get_server_details
|
148
|
+
base_url = Utils.template_url(url, params)
|
149
|
+
url = Utils.generate_url(
|
150
|
+
::StackOne::Operations::CrmGetContactCustomFieldDefinitionRequest,
|
151
|
+
base_url,
|
152
|
+
'/unified/crm/custom_field_definitions/contacts/{id}',
|
153
|
+
request
|
154
|
+
)
|
155
|
+
headers = Utils.get_headers(request)
|
156
|
+
query_params = Utils.get_query_params(::StackOne::Operations::CrmGetContactCustomFieldDefinitionRequest, request)
|
157
|
+
headers['Accept'] = 'application/json'
|
158
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
159
|
+
|
160
|
+
r = @sdk_configuration.client.get(url) do |req|
|
161
|
+
req.headers = headers
|
162
|
+
req.params = query_params
|
163
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
164
|
+
end
|
165
|
+
|
166
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
167
|
+
|
168
|
+
res = ::StackOne::Operations::CrmGetContactCustomFieldDefinitionResponse.new(
|
169
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
170
|
+
)
|
171
|
+
if r.status == 200
|
172
|
+
if Utils.match_content_type(content_type, 'application/json')
|
173
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::CustomFieldDefinitionResultApiModel)
|
174
|
+
res.custom_field_definition_result_api_model = out
|
175
|
+
end
|
176
|
+
elsif [400, 403, 412, 429, 500, 501].include?(r.status)
|
177
|
+
end
|
178
|
+
res
|
179
|
+
end
|
180
|
+
|
181
|
+
|
144
182
|
sig { params(request: T.nilable(::StackOne::Operations::CrmGetListRequest)).returns(::StackOne::Operations::CrmGetListResponse) }
|
145
183
|
def get_list(request)
|
146
184
|
# get_list - Get List
|
@@ -212,6 +250,39 @@ module StackOne
|
|
212
250
|
end
|
213
251
|
|
214
252
|
|
253
|
+
sig { params(request: T.nilable(::StackOne::Operations::CrmListContactCustomFieldDefinitionsRequest)).returns(::StackOne::Operations::CrmListContactCustomFieldDefinitionsResponse) }
|
254
|
+
def list_contact_custom_field_definitions(request)
|
255
|
+
# list_contact_custom_field_definitions - List Contact Custom Field Definitions
|
256
|
+
url, params = @sdk_configuration.get_server_details
|
257
|
+
base_url = Utils.template_url(url, params)
|
258
|
+
url = "#{base_url}/unified/crm/custom_field_definitions/contacts"
|
259
|
+
headers = Utils.get_headers(request)
|
260
|
+
query_params = Utils.get_query_params(::StackOne::Operations::CrmListContactCustomFieldDefinitionsRequest, request)
|
261
|
+
headers['Accept'] = 'application/json'
|
262
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
263
|
+
|
264
|
+
r = @sdk_configuration.client.get(url) do |req|
|
265
|
+
req.headers = headers
|
266
|
+
req.params = query_params
|
267
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
268
|
+
end
|
269
|
+
|
270
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
271
|
+
|
272
|
+
res = ::StackOne::Operations::CrmListContactCustomFieldDefinitionsResponse.new(
|
273
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
274
|
+
)
|
275
|
+
if r.status == 200
|
276
|
+
if Utils.match_content_type(content_type, 'application/json')
|
277
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::CustomFieldDefinitionsPaginated)
|
278
|
+
res.custom_field_definitions_paginated = out
|
279
|
+
end
|
280
|
+
elsif [400, 403, 412, 429, 500, 501].include?(r.status)
|
281
|
+
end
|
282
|
+
res
|
283
|
+
end
|
284
|
+
|
285
|
+
|
215
286
|
sig { params(request: T.nilable(::StackOne::Operations::CrmListContactsRequest)).returns(::StackOne::Operations::CrmListContactsResponse) }
|
216
287
|
def list_contacts(request)
|
217
288
|
# list_contacts - List Contacts
|
data/lib/stack_one/hris.rb
CHANGED
@@ -117,6 +117,58 @@ module StackOne
|
|
117
117
|
end
|
118
118
|
|
119
119
|
|
120
|
+
sig { params(hris_create_employment_request_dto: ::StackOne::Shared::HrisCreateEmploymentRequestDto, id: ::String, x_account_id: ::String).returns(::StackOne::Operations::HrisCreateEmployeeEmploymentResponse) }
|
121
|
+
def create_employee_employment(hris_create_employment_request_dto, id, x_account_id)
|
122
|
+
# create_employee_employment - Create Employee Employment
|
123
|
+
request = ::StackOne::Operations::HrisCreateEmployeeEmploymentRequest.new(
|
124
|
+
|
125
|
+
hris_create_employment_request_dto: hris_create_employment_request_dto,
|
126
|
+
id: id,
|
127
|
+
x_account_id: x_account_id
|
128
|
+
)
|
129
|
+
url, params = @sdk_configuration.get_server_details
|
130
|
+
base_url = Utils.template_url(url, params)
|
131
|
+
url = Utils.generate_url(
|
132
|
+
::StackOne::Operations::HrisCreateEmployeeEmploymentRequest,
|
133
|
+
base_url,
|
134
|
+
'/unified/hris/employees/{id}/employments',
|
135
|
+
request
|
136
|
+
)
|
137
|
+
headers = Utils.get_headers(request)
|
138
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :hris_create_employment_request_dto, :json)
|
139
|
+
headers['content-type'] = req_content_type
|
140
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
141
|
+
headers['Accept'] = 'application/json'
|
142
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
143
|
+
|
144
|
+
r = @sdk_configuration.client.post(url) do |req|
|
145
|
+
req.headers = headers
|
146
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
147
|
+
if form
|
148
|
+
req.body = Utils.encode_form(form)
|
149
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
150
|
+
req.body = URI.encode_www_form(data)
|
151
|
+
else
|
152
|
+
req.body = data
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
157
|
+
|
158
|
+
res = ::StackOne::Operations::HrisCreateEmployeeEmploymentResponse.new(
|
159
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
160
|
+
)
|
161
|
+
if r.status == 201
|
162
|
+
if Utils.match_content_type(content_type, 'application/json')
|
163
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::EmploymentResult)
|
164
|
+
res.employment_result = out
|
165
|
+
end
|
166
|
+
elsif [400, 403, 412, 429, 500, 501].include?(r.status)
|
167
|
+
end
|
168
|
+
res
|
169
|
+
end
|
170
|
+
|
171
|
+
|
120
172
|
sig { params(hris_create_time_off_request_dto: ::StackOne::Shared::HrisCreateTimeOffRequestDto, id: ::String, x_account_id: ::String).returns(::StackOne::Operations::HrisCreateEmployeeTimeOffRequestResponse) }
|
121
173
|
def create_employee_time_off_request(hris_create_time_off_request_dto, id, x_account_id)
|
122
174
|
# create_employee_time_off_request - Create Employee Time Off Request
|
@@ -386,6 +438,44 @@ module StackOne
|
|
386
438
|
end
|
387
439
|
|
388
440
|
|
441
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisGetCostCenterGroupRequest)).returns(::StackOne::Operations::HrisGetCostCenterGroupResponse) }
|
442
|
+
def get_cost_center_group(request)
|
443
|
+
# get_cost_center_group - Get Cost Center Group
|
444
|
+
url, params = @sdk_configuration.get_server_details
|
445
|
+
base_url = Utils.template_url(url, params)
|
446
|
+
url = Utils.generate_url(
|
447
|
+
::StackOne::Operations::HrisGetCostCenterGroupRequest,
|
448
|
+
base_url,
|
449
|
+
'/unified/hris/groups/cost_centers/{id}',
|
450
|
+
request
|
451
|
+
)
|
452
|
+
headers = Utils.get_headers(request)
|
453
|
+
query_params = Utils.get_query_params(::StackOne::Operations::HrisGetCostCenterGroupRequest, request)
|
454
|
+
headers['Accept'] = 'application/json'
|
455
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
456
|
+
|
457
|
+
r = @sdk_configuration.client.get(url) do |req|
|
458
|
+
req.headers = headers
|
459
|
+
req.params = query_params
|
460
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
461
|
+
end
|
462
|
+
|
463
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
464
|
+
|
465
|
+
res = ::StackOne::Operations::HrisGetCostCenterGroupResponse.new(
|
466
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
467
|
+
)
|
468
|
+
if r.status == 200
|
469
|
+
if Utils.match_content_type(content_type, 'application/json')
|
470
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::HRISCostCenterResult)
|
471
|
+
res.hris_cost_center_result = out
|
472
|
+
end
|
473
|
+
elsif [400, 403, 412, 429, 500, 501].include?(r.status)
|
474
|
+
end
|
475
|
+
res
|
476
|
+
end
|
477
|
+
|
478
|
+
|
389
479
|
sig { params(request: T.nilable(::StackOne::Operations::HrisGetDepartmentGroupRequest)).returns(::StackOne::Operations::HrisGetDepartmentGroupResponse) }
|
390
480
|
def get_department_group(request)
|
391
481
|
# get_department_group - Get Department Group
|
@@ -908,6 +998,39 @@ module StackOne
|
|
908
998
|
end
|
909
999
|
|
910
1000
|
|
1001
|
+
sig { params(request: T.nilable(::StackOne::Operations::HrisListCostCenterGroupsRequest)).returns(::StackOne::Operations::HrisListCostCenterGroupsResponse) }
|
1002
|
+
def list_cost_center_groups(request)
|
1003
|
+
# list_cost_center_groups - List Cost Center Groups
|
1004
|
+
url, params = @sdk_configuration.get_server_details
|
1005
|
+
base_url = Utils.template_url(url, params)
|
1006
|
+
url = "#{base_url}/unified/hris/groups/cost_centers"
|
1007
|
+
headers = Utils.get_headers(request)
|
1008
|
+
query_params = Utils.get_query_params(::StackOne::Operations::HrisListCostCenterGroupsRequest, request)
|
1009
|
+
headers['Accept'] = 'application/json'
|
1010
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
1011
|
+
|
1012
|
+
r = @sdk_configuration.client.get(url) do |req|
|
1013
|
+
req.headers = headers
|
1014
|
+
req.params = query_params
|
1015
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
1016
|
+
end
|
1017
|
+
|
1018
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
1019
|
+
|
1020
|
+
res = ::StackOne::Operations::HrisListCostCenterGroupsResponse.new(
|
1021
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
1022
|
+
)
|
1023
|
+
if r.status == 200
|
1024
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1025
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::HRISCostCenterPaginated)
|
1026
|
+
res.hris_cost_center_paginated = out
|
1027
|
+
end
|
1028
|
+
elsif [400, 403, 412, 429, 500, 501].include?(r.status)
|
1029
|
+
end
|
1030
|
+
res
|
1031
|
+
end
|
1032
|
+
|
1033
|
+
|
911
1034
|
sig { params(request: T.nilable(::StackOne::Operations::HrisListDepartmentGroupsRequest)).returns(::StackOne::Operations::HrisListDepartmentGroupsResponse) }
|
912
1035
|
def list_department_groups(request)
|
913
1036
|
# list_department_groups - List Department Groups
|
@@ -1376,6 +1499,59 @@ module StackOne
|
|
1376
1499
|
end
|
1377
1500
|
|
1378
1501
|
|
1502
|
+
sig { params(hris_create_employment_request_dto: ::StackOne::Shared::HrisCreateEmploymentRequestDto, id: ::String, sub_resource_id: ::String, x_account_id: ::String).returns(::StackOne::Operations::HrisUpdateEmployeeEmploymentResponse) }
|
1503
|
+
def update_employee_employment(hris_create_employment_request_dto, id, sub_resource_id, x_account_id)
|
1504
|
+
# update_employee_employment - Update Employee Employment
|
1505
|
+
request = ::StackOne::Operations::HrisUpdateEmployeeEmploymentRequest.new(
|
1506
|
+
|
1507
|
+
hris_create_employment_request_dto: hris_create_employment_request_dto,
|
1508
|
+
id: id,
|
1509
|
+
sub_resource_id: sub_resource_id,
|
1510
|
+
x_account_id: x_account_id
|
1511
|
+
)
|
1512
|
+
url, params = @sdk_configuration.get_server_details
|
1513
|
+
base_url = Utils.template_url(url, params)
|
1514
|
+
url = Utils.generate_url(
|
1515
|
+
::StackOne::Operations::HrisUpdateEmployeeEmploymentRequest,
|
1516
|
+
base_url,
|
1517
|
+
'/unified/hris/employees/{id}/employments/{subResourceId}',
|
1518
|
+
request
|
1519
|
+
)
|
1520
|
+
headers = Utils.get_headers(request)
|
1521
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :hris_create_employment_request_dto, :json)
|
1522
|
+
headers['content-type'] = req_content_type
|
1523
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
1524
|
+
headers['Accept'] = 'application/json'
|
1525
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
1526
|
+
|
1527
|
+
r = @sdk_configuration.client.patch(url) do |req|
|
1528
|
+
req.headers = headers
|
1529
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
1530
|
+
if form
|
1531
|
+
req.body = Utils.encode_form(form)
|
1532
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
1533
|
+
req.body = URI.encode_www_form(data)
|
1534
|
+
else
|
1535
|
+
req.body = data
|
1536
|
+
end
|
1537
|
+
end
|
1538
|
+
|
1539
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
1540
|
+
|
1541
|
+
res = ::StackOne::Operations::HrisUpdateEmployeeEmploymentResponse.new(
|
1542
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
1543
|
+
)
|
1544
|
+
if r.status == 200
|
1545
|
+
if Utils.match_content_type(content_type, 'application/json')
|
1546
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::EmploymentResult)
|
1547
|
+
res.employment_result = out
|
1548
|
+
end
|
1549
|
+
elsif [400, 403, 412, 429, 500, 501].include?(r.status)
|
1550
|
+
end
|
1551
|
+
res
|
1552
|
+
end
|
1553
|
+
|
1554
|
+
|
1379
1555
|
sig { params(hris_create_work_eligibility_request_dto: ::StackOne::Shared::HrisCreateWorkEligibilityRequestDto, id: ::String, sub_resource_id: ::String, x_account_id: ::String).returns(::StackOne::Operations::HrisUpdateEmployeeWorkEligibilityRequestResponse) }
|
1380
1556
|
def update_employee_work_eligibility_request(hris_create_work_eligibility_request_dto, id, sub_resource_id, x_account_id)
|
1381
1557
|
# update_employee_work_eligibility_request - Update Employee Work Eligibility Request
|
data/lib/stack_one/lms.rb
CHANGED
@@ -163,6 +163,47 @@ module StackOne
|
|
163
163
|
end
|
164
164
|
|
165
165
|
|
166
|
+
sig { params(id: ::String, x_account_id: ::String).returns(::StackOne::Operations::LmsDeleteContentResponse) }
|
167
|
+
def delete_content(id, x_account_id)
|
168
|
+
# delete_content - Delete Content
|
169
|
+
request = ::StackOne::Operations::LmsDeleteContentRequest.new(
|
170
|
+
|
171
|
+
id: id,
|
172
|
+
x_account_id: x_account_id
|
173
|
+
)
|
174
|
+
url, params = @sdk_configuration.get_server_details
|
175
|
+
base_url = Utils.template_url(url, params)
|
176
|
+
url = Utils.generate_url(
|
177
|
+
::StackOne::Operations::LmsDeleteContentRequest,
|
178
|
+
base_url,
|
179
|
+
'/unified/lms/content/{id}',
|
180
|
+
request
|
181
|
+
)
|
182
|
+
headers = Utils.get_headers(request)
|
183
|
+
headers['Accept'] = 'application/json'
|
184
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
185
|
+
|
186
|
+
r = @sdk_configuration.client.delete(url) do |req|
|
187
|
+
req.headers = headers
|
188
|
+
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
189
|
+
end
|
190
|
+
|
191
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
192
|
+
|
193
|
+
res = ::StackOne::Operations::LmsDeleteContentResponse.new(
|
194
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
195
|
+
)
|
196
|
+
if r.status == 200
|
197
|
+
if Utils.match_content_type(content_type, 'application/json')
|
198
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::StackOne::Shared::DeleteResult)
|
199
|
+
res.delete_result = out
|
200
|
+
end
|
201
|
+
elsif [400, 403, 412, 429, 500, 501].include?(r.status)
|
202
|
+
end
|
203
|
+
res
|
204
|
+
end
|
205
|
+
|
206
|
+
|
166
207
|
sig { params(request: T.nilable(::StackOne::Operations::LmsGetAssignmentRequest)).returns(::StackOne::Operations::LmsGetAssignmentResponse) }
|
167
208
|
def get_assignment(request)
|
168
209
|
# get_assignment - Get Assignment
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class CreateRequest < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :id, ::Float, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
|
16
|
+
|
17
|
+
field :request_body, T::Array[::StackOne::Shared::CreateEvent], { 'request': { 'media_type': 'application/json' } }
|
18
|
+
# The account identifier
|
19
|
+
field :x_account_id, ::String, { 'header': { 'field_name': 'x-account-id', 'style': 'simple', 'explode': false } }
|
20
|
+
|
21
|
+
|
22
|
+
sig { params(id: ::Float, request_body: T::Array[::StackOne::Shared::CreateEvent], x_account_id: ::String).void }
|
23
|
+
def initialize(id: nil, request_body: nil, x_account_id: nil)
|
24
|
+
@id = id
|
25
|
+
@request_body = request_body
|
26
|
+
@x_account_id = x_account_id
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class CreateResponse < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# HTTP response content type for this operation
|
15
|
+
field :content_type, ::String
|
16
|
+
# Raw HTTP response; suitable for custom response parsing
|
17
|
+
field :raw_response, ::Faraday::Response
|
18
|
+
# HTTP response status code for this operation
|
19
|
+
field :status_code, ::Integer
|
20
|
+
# Multiple status returned. Check the response body for details.
|
21
|
+
field :create_event_responses, T.nilable(T::Array[::StackOne::Shared::CreateEventResponse])
|
22
|
+
|
23
|
+
|
24
|
+
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, create_event_responses: T.nilable(T::Array[::StackOne::Shared::CreateEventResponse])).void }
|
25
|
+
def initialize(content_type: nil, raw_response: nil, status_code: nil, create_event_responses: nil)
|
26
|
+
@content_type = content_type
|
27
|
+
@raw_response = raw_response
|
28
|
+
@status_code = status_code
|
29
|
+
@create_event_responses = create_event_responses
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/stack_one/models/operations/crm_get_contact_custom_field_definition_queryparam_filter.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
# Filter parameters that allow greater customisation of the list response
|
11
|
+
class CrmGetContactCustomFieldDefinitionQueryParamFilter < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# Use a string with a date to only select results updated after that given date
|
15
|
+
field :updated_after, T.nilable(::String), { 'query_param': { 'field_name': 'updated_after' } }
|
16
|
+
|
17
|
+
|
18
|
+
sig { params(updated_after: T.nilable(::String)).void }
|
19
|
+
def initialize(updated_after: nil)
|
20
|
+
@updated_after = updated_after
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class CrmGetContactCustomFieldDefinitionRequest < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
|
16
|
+
# The account identifier
|
17
|
+
field :x_account_id, ::String, { 'header': { 'field_name': 'x-account-id', 'style': 'simple', 'explode': false } }
|
18
|
+
# The comma separated list of fields that will be returned in the response (if empty, all fields are returned)
|
19
|
+
field :fields_, T.nilable(::String), { 'query_param': { 'field_name': 'fields', 'style': 'form', 'explode': true } }
|
20
|
+
# Filter parameters that allow greater customisation of the list response
|
21
|
+
field :filter, T.nilable(::StackOne::Operations::CrmGetContactCustomFieldDefinitionQueryParamFilter), { 'query_param': { 'field_name': 'filter', 'style': 'deepObject', 'explode': true } }
|
22
|
+
# The unified cursor
|
23
|
+
field :next_, T.nilable(::String), { 'query_param': { 'field_name': 'next', 'style': 'form', 'explode': true } }
|
24
|
+
# The page number of the results to fetch
|
25
|
+
#
|
26
|
+
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
27
|
+
field :page, T.nilable(::String), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } }
|
28
|
+
# The number of results per page
|
29
|
+
field :page_size, T.nilable(::String), { 'query_param': { 'field_name': 'page_size', 'style': 'form', 'explode': true } }
|
30
|
+
# Query parameters that can be used to pass through parameters to the underlying provider request by surrounding them with 'proxy' key
|
31
|
+
field :proxy, T.nilable(T::Hash[Symbol, ::Object]), { 'query_param': { 'field_name': 'proxy', 'style': 'deepObject', 'explode': true } }
|
32
|
+
# Indicates that the raw request result is returned
|
33
|
+
field :raw, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'raw', 'style': 'form', 'explode': true } }
|
34
|
+
# The sync token to select the only updated results
|
35
|
+
#
|
36
|
+
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
37
|
+
field :sync_token, T.nilable(::String), { 'query_param': { 'field_name': 'sync_token', 'style': 'form', 'explode': true } }
|
38
|
+
# Use a string with a date to only select results updated after that given date
|
39
|
+
#
|
40
|
+
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
41
|
+
field :updated_after, T.nilable(::String), { 'query_param': { 'field_name': 'updated_after', 'style': 'form', 'explode': true } }
|
42
|
+
|
43
|
+
|
44
|
+
sig { params(id: ::String, x_account_id: ::String, fields_: T.nilable(::String), filter: T.nilable(::StackOne::Operations::CrmGetContactCustomFieldDefinitionQueryParamFilter), next_: T.nilable(::String), page: T.nilable(::String), page_size: T.nilable(::String), proxy: T.nilable(T::Hash[Symbol, ::Object]), raw: T.nilable(T::Boolean), sync_token: T.nilable(::String), updated_after: T.nilable(::String)).void }
|
45
|
+
def initialize(id: nil, x_account_id: nil, fields_: nil, filter: nil, next_: nil, page: nil, page_size: nil, proxy: nil, raw: nil, sync_token: nil, updated_after: nil)
|
46
|
+
@id = id
|
47
|
+
@x_account_id = x_account_id
|
48
|
+
@fields_ = fields_
|
49
|
+
@filter = filter
|
50
|
+
@next_ = next_
|
51
|
+
@page = page
|
52
|
+
@page_size = page_size
|
53
|
+
@proxy = proxy
|
54
|
+
@raw = raw
|
55
|
+
@sync_token = sync_token
|
56
|
+
@updated_after = updated_after
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class CrmGetContactCustomFieldDefinitionResponse < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# HTTP response content type for this operation
|
15
|
+
field :content_type, ::String
|
16
|
+
# Raw HTTP response; suitable for custom response parsing
|
17
|
+
field :raw_response, ::Faraday::Response
|
18
|
+
# HTTP response status code for this operation
|
19
|
+
field :status_code, ::Integer
|
20
|
+
# The contact custom field definition was retrieved.
|
21
|
+
field :custom_field_definition_result_api_model, T.nilable(::StackOne::Shared::CustomFieldDefinitionResultApiModel)
|
22
|
+
|
23
|
+
|
24
|
+
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, custom_field_definition_result_api_model: T.nilable(::StackOne::Shared::CustomFieldDefinitionResultApiModel)).void }
|
25
|
+
def initialize(content_type: nil, raw_response: nil, status_code: nil, custom_field_definition_result_api_model: nil)
|
26
|
+
@content_type = content_type
|
27
|
+
@raw_response = raw_response
|
28
|
+
@status_code = status_code
|
29
|
+
@custom_field_definition_result_api_model = custom_field_definition_result_api_model
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/stack_one/models/operations/crm_list_contact_custom_field_definitions_queryparam_filter.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
# Filter parameters that allow greater customisation of the list response
|
11
|
+
class CrmListContactCustomFieldDefinitionsQueryParamFilter < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# Use a string with a date to only select results updated after that given date
|
15
|
+
field :updated_after, T.nilable(::String), { 'query_param': { 'field_name': 'updated_after' } }
|
16
|
+
|
17
|
+
|
18
|
+
sig { params(updated_after: T.nilable(::String)).void }
|
19
|
+
def initialize(updated_after: nil)
|
20
|
+
@updated_after = updated_after
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class CrmListContactCustomFieldDefinitionsRequest < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# The account identifier
|
15
|
+
field :x_account_id, ::String, { 'header': { 'field_name': 'x-account-id', 'style': 'simple', 'explode': false } }
|
16
|
+
# The comma separated list of fields that will be returned in the response (if empty, all fields are returned)
|
17
|
+
field :fields_, T.nilable(::String), { 'query_param': { 'field_name': 'fields', 'style': 'form', 'explode': true } }
|
18
|
+
# Filter parameters that allow greater customisation of the list response
|
19
|
+
field :filter, T.nilable(::StackOne::Operations::CrmListContactCustomFieldDefinitionsQueryParamFilter), { 'query_param': { 'field_name': 'filter', 'style': 'deepObject', 'explode': true } }
|
20
|
+
# The unified cursor
|
21
|
+
field :next_, T.nilable(::String), { 'query_param': { 'field_name': 'next', 'style': 'form', 'explode': true } }
|
22
|
+
# The page number of the results to fetch
|
23
|
+
#
|
24
|
+
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
25
|
+
field :page, T.nilable(::String), { 'query_param': { 'field_name': 'page', 'style': 'form', 'explode': true } }
|
26
|
+
# The number of results per page
|
27
|
+
field :page_size, T.nilable(::String), { 'query_param': { 'field_name': 'page_size', 'style': 'form', 'explode': true } }
|
28
|
+
# Query parameters that can be used to pass through parameters to the underlying provider request by surrounding them with 'proxy' key
|
29
|
+
field :proxy, T.nilable(T::Hash[Symbol, ::Object]), { 'query_param': { 'field_name': 'proxy', 'style': 'deepObject', 'explode': true } }
|
30
|
+
# Indicates that the raw request result is returned
|
31
|
+
field :raw, T.nilable(T::Boolean), { 'query_param': { 'field_name': 'raw', 'style': 'form', 'explode': true } }
|
32
|
+
# The sync token to select the only updated results
|
33
|
+
#
|
34
|
+
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
35
|
+
field :sync_token, T.nilable(::String), { 'query_param': { 'field_name': 'sync_token', 'style': 'form', 'explode': true } }
|
36
|
+
# Use a string with a date to only select results updated after that given date
|
37
|
+
#
|
38
|
+
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
39
|
+
field :updated_after, T.nilable(::String), { 'query_param': { 'field_name': 'updated_after', 'style': 'form', 'explode': true } }
|
40
|
+
|
41
|
+
|
42
|
+
sig { params(x_account_id: ::String, fields_: T.nilable(::String), filter: T.nilable(::StackOne::Operations::CrmListContactCustomFieldDefinitionsQueryParamFilter), next_: T.nilable(::String), page: T.nilable(::String), page_size: T.nilable(::String), proxy: T.nilable(T::Hash[Symbol, ::Object]), raw: T.nilable(T::Boolean), sync_token: T.nilable(::String), updated_after: T.nilable(::String)).void }
|
43
|
+
def initialize(x_account_id: nil, fields_: nil, filter: nil, next_: nil, page: nil, page_size: nil, proxy: nil, raw: nil, sync_token: nil, updated_after: nil)
|
44
|
+
@x_account_id = x_account_id
|
45
|
+
@fields_ = fields_
|
46
|
+
@filter = filter
|
47
|
+
@next_ = next_
|
48
|
+
@page = page
|
49
|
+
@page_size = page_size
|
50
|
+
@proxy = proxy
|
51
|
+
@raw = raw
|
52
|
+
@sync_token = sync_token
|
53
|
+
@updated_after = updated_after
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module StackOne
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class CrmListContactCustomFieldDefinitionsResponse < ::StackOne::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# HTTP response content type for this operation
|
15
|
+
field :content_type, ::String
|
16
|
+
# Raw HTTP response; suitable for custom response parsing
|
17
|
+
field :raw_response, ::Faraday::Response
|
18
|
+
# HTTP response status code for this operation
|
19
|
+
field :status_code, ::Integer
|
20
|
+
# The list of contacts custom field definitions was retrieved.
|
21
|
+
field :custom_field_definitions_paginated, T.nilable(::StackOne::Shared::CustomFieldDefinitionsPaginated)
|
22
|
+
|
23
|
+
|
24
|
+
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, custom_field_definitions_paginated: T.nilable(::StackOne::Shared::CustomFieldDefinitionsPaginated)).void }
|
25
|
+
def initialize(content_type: nil, raw_response: nil, status_code: nil, custom_field_definitions_paginated: nil)
|
26
|
+
@content_type = content_type
|
27
|
+
@raw_response = raw_response
|
28
|
+
@status_code = status_code
|
29
|
+
@custom_field_definitions_paginated = custom_field_definitions_paginated
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|