stackone_hris_client 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +31 -5
  4. data/docs/Account.md +1 -1
  5. data/docs/AccountMeta.md +22 -0
  6. data/docs/AccountsApi.md +70 -2
  7. data/docs/CompaniesApi.md +1 -1
  8. data/docs/ConnectSessionsApi.md +1 -1
  9. data/docs/CreateEmployeeResult.md +22 -0
  10. data/docs/Employee.md +56 -54
  11. data/docs/EmployeeApiModel.md +80 -0
  12. data/docs/EmployeeApiModelAvatar.md +20 -0
  13. data/docs/EmployeeApiModelEmploymentStatus.md +20 -0
  14. data/docs/EmployeeApiModelEmploymentType.md +20 -0
  15. data/docs/EmployeeApiModelEthnicity.md +20 -0
  16. data/docs/EmployeeApiModelGender.md +20 -0
  17. data/docs/EmployeeApiModelHomeLocation.md +38 -0
  18. data/docs/EmployeeApiModelMaritalStatus.md +20 -0
  19. data/docs/EmployeeApiModelWorkLocation.md +38 -0
  20. data/docs/EmployeeCustomFieldTypeEnum.md +20 -0
  21. data/docs/EmployeeCustomFields.md +30 -0
  22. data/docs/EmployeeCustomFieldsType.md +20 -0
  23. data/docs/EmployeeResult.md +1 -1
  24. data/docs/EmployeesApi.md +219 -5
  25. data/docs/EmployeesPaginated.md +1 -1
  26. data/docs/Employment.md +17 -15
  27. data/docs/EmploymentEmploymentContractType.md +20 -0
  28. data/docs/EmploymentEmploymentType.md +20 -0
  29. data/docs/EmploymentPayFrequency.md +20 -0
  30. data/docs/EmploymentPayPeriod.md +20 -0
  31. data/docs/EmploymentScheduleTypeEnum.md +20 -0
  32. data/docs/EmploymentsApi.md +3 -3
  33. data/docs/HrisCreateEmployeeRequestDto.md +80 -0
  34. data/docs/Location.md +20 -20
  35. data/docs/LocationCountry.md +20 -0
  36. data/docs/LocationLocationType.md +20 -0
  37. data/docs/LocationsApi.md +1 -1
  38. data/gem-config.yml +2 -2
  39. data/generate_gem.sh +0 -0
  40. data/lib/stackone_hris_client/api/accounts_api.rb +61 -0
  41. data/lib/stackone_hris_client/api/employees_api.rb +231 -0
  42. data/lib/stackone_hris_client/models/account.rb +0 -5
  43. data/lib/stackone_hris_client/models/account_meta.rb +284 -0
  44. data/lib/stackone_hris_client/models/country_code_enum.rb +0 -6
  45. data/lib/stackone_hris_client/models/create_employee_result.rb +250 -0
  46. data/lib/stackone_hris_client/models/employee.rb +110 -126
  47. data/lib/stackone_hris_client/models/employee_api_model.rb +523 -0
  48. data/lib/stackone_hris_client/models/employee_api_model_avatar.rb +234 -0
  49. data/lib/stackone_hris_client/models/employee_api_model_employment_status.rb +272 -0
  50. data/lib/stackone_hris_client/models/employee_api_model_employment_type.rb +272 -0
  51. data/lib/stackone_hris_client/models/employee_api_model_ethnicity.rb +272 -0
  52. data/lib/stackone_hris_client/models/employee_api_model_gender.rb +272 -0
  53. data/lib/stackone_hris_client/models/employee_api_model_home_location.rb +324 -0
  54. data/lib/stackone_hris_client/models/employee_api_model_marital_status.rb +272 -0
  55. data/lib/stackone_hris_client/models/employee_api_model_work_location.rb +324 -0
  56. data/lib/stackone_hris_client/models/employee_custom_field_type_enum.rb +264 -0
  57. data/lib/stackone_hris_client/models/employee_custom_fields.rb +279 -0
  58. data/lib/stackone_hris_client/models/employee_custom_fields_type.rb +272 -0
  59. data/lib/stackone_hris_client/models/employment.rb +21 -6
  60. data/lib/stackone_hris_client/models/employment_employment_contract_type.rb +272 -0
  61. data/lib/stackone_hris_client/models/employment_employment_type.rb +272 -0
  62. data/lib/stackone_hris_client/models/employment_pay_frequency.rb +272 -0
  63. data/lib/stackone_hris_client/models/employment_pay_period.rb +272 -0
  64. data/lib/stackone_hris_client/models/employment_schedule_type_enum.rb +264 -0
  65. data/lib/stackone_hris_client/models/employment_status_enum.rb +0 -6
  66. data/lib/stackone_hris_client/models/employment_type_enum.rb +0 -6
  67. data/lib/stackone_hris_client/models/ethnicity_enum.rb +0 -6
  68. data/lib/stackone_hris_client/models/gender_enum.rb +0 -6
  69. data/lib/stackone_hris_client/models/hris_create_employee_request_dto.rb +523 -0
  70. data/lib/stackone_hris_client/models/location.rb +11 -7
  71. data/lib/stackone_hris_client/models/location_country.rb +272 -0
  72. data/lib/stackone_hris_client/models/location_location_type.rb +272 -0
  73. data/lib/stackone_hris_client/models/location_type_enum.rb +0 -6
  74. data/lib/stackone_hris_client/models/marital_status_enum.rb +0 -6
  75. data/lib/stackone_hris_client/models/pay_frequency_enum.rb +0 -6
  76. data/lib/stackone_hris_client/models/pay_period_enum.rb +0 -6
  77. data/lib/stackone_hris_client/version.rb +1 -1
  78. data/lib/stackone_hris_client.rb +22 -0
  79. data/spec/api/accounts_api_spec.rb +30 -8
  80. data/spec/api/companies_api_spec.rb +13 -13
  81. data/spec/api/connect_sessions_api_spec.rb +8 -8
  82. data/spec/api/employees_api_spec.rb +60 -18
  83. data/spec/api/employments_api_spec.rb +13 -13
  84. data/spec/api/locations_api_spec.rb +9 -9
  85. data/spec/models/account_meta_spec.rb +50 -0
  86. data/spec/models/account_spec.rb +18 -12
  87. data/spec/models/companies_paginated_spec.rb +4 -4
  88. data/spec/models/company_result_spec.rb +3 -3
  89. data/spec/models/company_spec.rb +4 -4
  90. data/spec/models/connect_session_authenticate_spec.rb +5 -5
  91. data/spec/models/connect_session_create_spec.rb +17 -11
  92. data/spec/models/connect_session_spec.rb +14 -14
  93. data/spec/models/connect_session_token_spec.rb +15 -15
  94. data/spec/models/country_code_enum_spec.rb +4 -4
  95. data/spec/models/create_employee_result_spec.rb +46 -0
  96. data/spec/models/employee.rb +220 -0
  97. data/spec/models/employee_api_model_avatar_spec.rb +40 -0
  98. data/spec/models/employee_api_model_employment_status_spec.rb +44 -0
  99. data/spec/models/employee_api_model_employment_type_spec.rb +44 -0
  100. data/spec/models/employee_api_model_ethnicity_spec.rb +44 -0
  101. data/spec/models/employee_api_model_gender_spec.rb +44 -0
  102. data/spec/models/employee_api_model_home_location_spec.rb +94 -0
  103. data/spec/models/employee_api_model_marital_status_spec.rb +44 -0
  104. data/spec/models/employee_api_model_spec.rb +220 -0
  105. data/spec/models/employee_api_model_work_location_spec.rb +94 -0
  106. data/spec/models/employee_custom_field_type_enum_spec.rb +44 -0
  107. data/spec/models/employee_custom_fields_spec.rb +70 -0
  108. data/spec/models/employee_custom_fields_type_spec.rb +44 -0
  109. data/spec/models/employee_result_spec.rb +6 -6
  110. data/spec/models/employees_paginated_spec.rb +7 -7
  111. data/spec/models/employment_employment_contract_type_spec.rb +44 -0
  112. data/spec/models/employment_employment_type_spec.rb +44 -0
  113. data/spec/models/employment_pay_frequency_spec.rb +44 -0
  114. data/spec/models/employment_pay_period_spec.rb +44 -0
  115. data/spec/models/employment_result_spec.rb +3 -3
  116. data/spec/models/employment_schedule_type_enum_spec.rb +44 -0
  117. data/spec/models/employment_spec.rb +16 -10
  118. data/spec/models/employment_status_enum_spec.rb +4 -4
  119. data/spec/models/employment_type_enum_spec.rb +4 -4
  120. data/spec/models/employments_paginated_spec.rb +4 -4
  121. data/spec/models/ethnicity_enum_spec.rb +4 -4
  122. data/spec/models/gender_enum_spec.rb +4 -4
  123. data/spec/models/hris_create_employee_request_dto_spec.rb +220 -0
  124. data/spec/models/image_spec.rb +3 -3
  125. data/spec/models/location_country_spec.rb +44 -0
  126. data/spec/models/location_location_type_spec.rb +44 -0
  127. data/spec/models/location_result_spec.rb +3 -3
  128. data/spec/models/location_spec.rb +12 -12
  129. data/spec/models/location_type_enum_spec.rb +3 -3
  130. data/spec/models/locations_paginated_spec.rb +4 -4
  131. data/spec/models/marital_status_enum_spec.rb +4 -4
  132. data/spec/models/pay_frequency_enum_spec.rb +4 -4
  133. data/spec/models/pay_period_enum_spec.rb +3 -3
  134. metadata +92 -4
  135. data/spec/models/employee_spec.rb +0 -124
data/docs/Location.md CHANGED
@@ -4,17 +4,17 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | | [optional] |
8
- | **employee_id** | **String** | | |
9
- | **name** | **String** | | [optional] |
10
- | **phone_number** | **String** | | [optional] |
11
- | **street_1** | **String** | | [optional] |
12
- | **street_2** | **String** | | [optional] |
13
- | **city** | **String** | | [optional] |
14
- | **state** | **String** | | [optional] |
15
- | **zip_code** | **String** | | [optional] |
16
- | **country** | [**CountryCodeEnum**](CountryCodeEnum.md) | | [optional] |
17
- | **location_type** | [**LocationTypeEnum**](LocationTypeEnum.md) | | [optional] |
7
+ | **id** | **String** | The unique ID of the location | [optional] |
8
+ | **employee_id** | **String** | The employee ID | [optional] |
9
+ | **name** | **String** | The name of the location | [optional] |
10
+ | **phone_number** | **String** | The phone number of the location | [optional] |
11
+ | **street_1** | **String** | The first line of the address | [optional] |
12
+ | **street_2** | **String** | The second line of the address | [optional] |
13
+ | **city** | **String** | The city where the location is situated | [optional] |
14
+ | **state** | **String** | The state where the location is situated | [optional] |
15
+ | **zip_code** | **String** | The ZIP code/Postal code of the location | [optional] |
16
+ | **country** | [**LocationCountry**](LocationCountry.md) | | [optional] |
17
+ | **location_type** | [**LocationLocationType**](LocationLocationType.md) | | [optional] |
18
18
 
19
19
  ## Example
20
20
 
@@ -22,15 +22,15 @@
22
22
  require 'stackone_hris_client'
23
23
 
24
24
  instance = StackOneHRIS::Location.new(
25
- id: null,
26
- employee_id: null,
27
- name: null,
28
- phone_number: null,
29
- street_1: null,
30
- street_2: null,
31
- city: null,
32
- state: null,
33
- zip_code: null,
25
+ id: 123456,
26
+ employee_id: 1687-3,
27
+ name: Woolsthorpe Manor,
28
+ phone_number: +44 1476 860 364,
29
+ street_1: Water Lane,
30
+ street_2: Woolsthorpe by Colsterworth,
31
+ city: Grantham,
32
+ state: Lincolnshire,
33
+ zip_code: NG33 5NR,
34
34
  country: null,
35
35
  location_type: null
36
36
  )
@@ -0,0 +1,20 @@
1
+ # StackOneHRIS::LocationCountry
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **value** | **String** | | |
8
+ | **source_value** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'stackone_hris_client'
14
+
15
+ instance = StackOneHRIS::LocationCountry.new(
16
+ value: null,
17
+ source_value: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # StackOneHRIS::LocationLocationType
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **value** | **String** | | |
8
+ | **source_value** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'stackone_hris_client'
14
+
15
+ instance = StackOneHRIS::LocationLocationType.new(
16
+ value: null,
17
+ source_value: null
18
+ )
19
+ ```
20
+
data/docs/LocationsApi.md CHANGED
@@ -26,7 +26,7 @@ StackOneHRIS.configure do |config|
26
26
  end
27
27
 
28
28
  api_instance = StackOneHRIS::LocationsApi.new
29
- id = 'id_example' # String |
29
+ id = 'id_example' # String |
30
30
  x_account_id = 'x_account_id_example' # String | The account identifier
31
31
  opts = {
32
32
  page: 'page_example', # String | The page number of the results to fetch
data/gem-config.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  generatorName: ruby
2
- inputSpec: https://api.stackone.com/documentation-hris-yaml
2
+ inputSpec: https://api2.eu1.stackone.com/documentation-hris-yaml
3
3
  additionalProperties:
4
4
  moduleName: "StackOneHRIS"
5
5
  gemAuthor: "StackOne"
@@ -10,5 +10,5 @@ additionalProperties:
10
10
  gemName: "stackone_hris_client"
11
11
  gemRequiredRubyVersion: ">= 2.7"
12
12
  gemSummary: "StackOne HRIS client gem"
13
- gemVersion: "1.6.0"
13
+ gemVersion: "1.7.0"
14
14
  library: "typhoeus"
data/generate_gem.sh CHANGED
File without changes
@@ -201,5 +201,66 @@ module StackOneHRIS
201
201
  end
202
202
  return data, status_code, headers
203
203
  end
204
+
205
+ # Get meta information of the account
206
+ # @param id [String]
207
+ # @param [Hash] opts the optional parameters
208
+ # @return [AccountMeta]
209
+ def accounts_meta_get(id, opts = {})
210
+ data, _status_code, _headers = accounts_meta_get_with_http_info(id, opts)
211
+ data
212
+ end
213
+
214
+ # Get meta information of the account
215
+ # @param id [String]
216
+ # @param [Hash] opts the optional parameters
217
+ # @return [Array<(AccountMeta, Integer, Hash)>] AccountMeta data, response status code and response headers
218
+ def accounts_meta_get_with_http_info(id, opts = {})
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug 'Calling API: AccountsApi.accounts_meta_get ...'
221
+ end
222
+ # verify the required parameter 'id' is set
223
+ if @api_client.config.client_side_validation && id.nil?
224
+ fail ArgumentError, "Missing the required parameter 'id' when calling AccountsApi.accounts_meta_get"
225
+ end
226
+ # resource path
227
+ local_var_path = '/accounts/{id}/meta'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
228
+
229
+ # query parameters
230
+ query_params = opts[:query_params] || {}
231
+
232
+ # header parameters
233
+ header_params = opts[:header_params] || {}
234
+ # HTTP header 'Accept' (if needed)
235
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
236
+
237
+ # form parameters
238
+ form_params = opts[:form_params] || {}
239
+
240
+ # http body (model)
241
+ post_body = opts[:debug_body]
242
+
243
+ # return_type
244
+ return_type = opts[:debug_return_type] || 'AccountMeta'
245
+
246
+ # auth_names
247
+ auth_names = opts[:debug_auth_names] || ['basic']
248
+
249
+ new_options = opts.merge(
250
+ :operation => :"AccountsApi.accounts_meta_get",
251
+ :header_params => header_params,
252
+ :query_params => query_params,
253
+ :form_params => form_params,
254
+ :body => post_body,
255
+ :auth_names => auth_names,
256
+ :return_type => return_type
257
+ )
258
+
259
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
260
+ if @api_client.config.debugging
261
+ @api_client.config.logger.debug "API called: AccountsApi#accounts_meta_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
262
+ end
263
+ return data, status_code, headers
264
+ end
204
265
  end
205
266
  end
@@ -19,6 +19,237 @@ module StackOneHRIS
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Creates an employee
23
+ # @param x_account_id [String] The account identifier
24
+ # @param hris_create_employee_request_dto [HrisCreateEmployeeRequestDto]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [CreateEmployeeResult]
27
+ def employee_create(x_account_id, hris_create_employee_request_dto, opts = {})
28
+ data, _status_code, _headers = employee_create_with_http_info(x_account_id, hris_create_employee_request_dto, opts)
29
+ data
30
+ end
31
+
32
+ # Creates an employee
33
+ # @param x_account_id [String] The account identifier
34
+ # @param hris_create_employee_request_dto [HrisCreateEmployeeRequestDto]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(CreateEmployeeResult, Integer, Hash)>] CreateEmployeeResult data, response status code and response headers
37
+ def employee_create_with_http_info(x_account_id, hris_create_employee_request_dto, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: EmployeesApi.employee_create ...'
40
+ end
41
+ # verify the required parameter 'x_account_id' is set
42
+ if @api_client.config.client_side_validation && x_account_id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'x_account_id' when calling EmployeesApi.employee_create"
44
+ end
45
+ # verify the required parameter 'hris_create_employee_request_dto' is set
46
+ if @api_client.config.client_side_validation && hris_create_employee_request_dto.nil?
47
+ fail ArgumentError, "Missing the required parameter 'hris_create_employee_request_dto' when calling EmployeesApi.employee_create"
48
+ end
49
+ # resource path
50
+ local_var_path = '/unified/hris/employees'
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+
55
+ # header parameters
56
+ header_params = opts[:header_params] || {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
+ # HTTP header 'Content-Type'
60
+ content_type = @api_client.select_header_content_type(['application/json'])
61
+ if !content_type.nil?
62
+ header_params['Content-Type'] = content_type
63
+ end
64
+ header_params[:'x-account-id'] = x_account_id
65
+
66
+ # form parameters
67
+ form_params = opts[:form_params] || {}
68
+
69
+ # http body (model)
70
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(hris_create_employee_request_dto)
71
+
72
+ # return_type
73
+ return_type = opts[:debug_return_type] || 'CreateEmployeeResult'
74
+
75
+ # auth_names
76
+ auth_names = opts[:debug_auth_names] || ['basic']
77
+
78
+ new_options = opts.merge(
79
+ :operation => :"EmployeesApi.employee_create",
80
+ :header_params => header_params,
81
+ :query_params => query_params,
82
+ :form_params => form_params,
83
+ :body => post_body,
84
+ :auth_names => auth_names,
85
+ :return_type => return_type
86
+ )
87
+
88
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
89
+ if @api_client.config.debugging
90
+ @api_client.config.logger.debug "API called: EmployeesApi#employee_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
91
+ end
92
+ return data, status_code, headers
93
+ end
94
+
95
+ # Replaces an employee
96
+ # @param id [String]
97
+ # @param x_account_id [String] The account identifier
98
+ # @param hris_create_employee_request_dto [HrisCreateEmployeeRequestDto]
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [CreateEmployeeResult]
101
+ def employee_replace(id, x_account_id, hris_create_employee_request_dto, opts = {})
102
+ data, _status_code, _headers = employee_replace_with_http_info(id, x_account_id, hris_create_employee_request_dto, opts)
103
+ data
104
+ end
105
+
106
+ # Replaces an employee
107
+ # @param id [String]
108
+ # @param x_account_id [String] The account identifier
109
+ # @param hris_create_employee_request_dto [HrisCreateEmployeeRequestDto]
110
+ # @param [Hash] opts the optional parameters
111
+ # @return [Array<(CreateEmployeeResult, Integer, Hash)>] CreateEmployeeResult data, response status code and response headers
112
+ def employee_replace_with_http_info(id, x_account_id, hris_create_employee_request_dto, opts = {})
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug 'Calling API: EmployeesApi.employee_replace ...'
115
+ end
116
+ # verify the required parameter 'id' is set
117
+ if @api_client.config.client_side_validation && id.nil?
118
+ fail ArgumentError, "Missing the required parameter 'id' when calling EmployeesApi.employee_replace"
119
+ end
120
+ # verify the required parameter 'x_account_id' is set
121
+ if @api_client.config.client_side_validation && x_account_id.nil?
122
+ fail ArgumentError, "Missing the required parameter 'x_account_id' when calling EmployeesApi.employee_replace"
123
+ end
124
+ # verify the required parameter 'hris_create_employee_request_dto' is set
125
+ if @api_client.config.client_side_validation && hris_create_employee_request_dto.nil?
126
+ fail ArgumentError, "Missing the required parameter 'hris_create_employee_request_dto' when calling EmployeesApi.employee_replace"
127
+ end
128
+ # resource path
129
+ local_var_path = '/unified/hris/employees/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
130
+
131
+ # query parameters
132
+ query_params = opts[:query_params] || {}
133
+
134
+ # header parameters
135
+ header_params = opts[:header_params] || {}
136
+ # HTTP header 'Accept' (if needed)
137
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
138
+ # HTTP header 'Content-Type'
139
+ content_type = @api_client.select_header_content_type(['application/json'])
140
+ if !content_type.nil?
141
+ header_params['Content-Type'] = content_type
142
+ end
143
+ header_params[:'x-account-id'] = x_account_id
144
+
145
+ # form parameters
146
+ form_params = opts[:form_params] || {}
147
+
148
+ # http body (model)
149
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(hris_create_employee_request_dto)
150
+
151
+ # return_type
152
+ return_type = opts[:debug_return_type] || 'CreateEmployeeResult'
153
+
154
+ # auth_names
155
+ auth_names = opts[:debug_auth_names] || ['basic']
156
+
157
+ new_options = opts.merge(
158
+ :operation => :"EmployeesApi.employee_replace",
159
+ :header_params => header_params,
160
+ :query_params => query_params,
161
+ :form_params => form_params,
162
+ :body => post_body,
163
+ :auth_names => auth_names,
164
+ :return_type => return_type
165
+ )
166
+
167
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug "API called: EmployeesApi#employee_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
170
+ end
171
+ return data, status_code, headers
172
+ end
173
+
174
+ # Updates an employee
175
+ # @param id [String]
176
+ # @param x_account_id [String] The account identifier
177
+ # @param hris_create_employee_request_dto [HrisCreateEmployeeRequestDto]
178
+ # @param [Hash] opts the optional parameters
179
+ # @return [CreateEmployeeResult]
180
+ def employee_update(id, x_account_id, hris_create_employee_request_dto, opts = {})
181
+ data, _status_code, _headers = employee_update_with_http_info(id, x_account_id, hris_create_employee_request_dto, opts)
182
+ data
183
+ end
184
+
185
+ # Updates an employee
186
+ # @param id [String]
187
+ # @param x_account_id [String] The account identifier
188
+ # @param hris_create_employee_request_dto [HrisCreateEmployeeRequestDto]
189
+ # @param [Hash] opts the optional parameters
190
+ # @return [Array<(CreateEmployeeResult, Integer, Hash)>] CreateEmployeeResult data, response status code and response headers
191
+ def employee_update_with_http_info(id, x_account_id, hris_create_employee_request_dto, opts = {})
192
+ if @api_client.config.debugging
193
+ @api_client.config.logger.debug 'Calling API: EmployeesApi.employee_update ...'
194
+ end
195
+ # verify the required parameter 'id' is set
196
+ if @api_client.config.client_side_validation && id.nil?
197
+ fail ArgumentError, "Missing the required parameter 'id' when calling EmployeesApi.employee_update"
198
+ end
199
+ # verify the required parameter 'x_account_id' is set
200
+ if @api_client.config.client_side_validation && x_account_id.nil?
201
+ fail ArgumentError, "Missing the required parameter 'x_account_id' when calling EmployeesApi.employee_update"
202
+ end
203
+ # verify the required parameter 'hris_create_employee_request_dto' is set
204
+ if @api_client.config.client_side_validation && hris_create_employee_request_dto.nil?
205
+ fail ArgumentError, "Missing the required parameter 'hris_create_employee_request_dto' when calling EmployeesApi.employee_update"
206
+ end
207
+ # resource path
208
+ local_var_path = '/unified/hris/employees/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
209
+
210
+ # query parameters
211
+ query_params = opts[:query_params] || {}
212
+
213
+ # header parameters
214
+ header_params = opts[:header_params] || {}
215
+ # HTTP header 'Accept' (if needed)
216
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
217
+ # HTTP header 'Content-Type'
218
+ content_type = @api_client.select_header_content_type(['application/json'])
219
+ if !content_type.nil?
220
+ header_params['Content-Type'] = content_type
221
+ end
222
+ header_params[:'x-account-id'] = x_account_id
223
+
224
+ # form parameters
225
+ form_params = opts[:form_params] || {}
226
+
227
+ # http body (model)
228
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(hris_create_employee_request_dto)
229
+
230
+ # return_type
231
+ return_type = opts[:debug_return_type] || 'CreateEmployeeResult'
232
+
233
+ # auth_names
234
+ auth_names = opts[:debug_auth_names] || ['basic']
235
+
236
+ new_options = opts.merge(
237
+ :operation => :"EmployeesApi.employee_update",
238
+ :header_params => header_params,
239
+ :query_params => query_params,
240
+ :form_params => form_params,
241
+ :body => post_body,
242
+ :auth_names => auth_names,
243
+ :return_type => return_type
244
+ )
245
+
246
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
247
+ if @api_client.config.debugging
248
+ @api_client.config.logger.debug "API called: EmployeesApi#employee_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
249
+ end
250
+ return data, status_code, headers
251
+ end
252
+
22
253
  # Get Employee
23
254
  # @param id [String]
24
255
  # @param x_account_id [String] The account identifier
@@ -154,10 +154,6 @@ module StackOneHRIS
154
154
  invalid_properties.push('invalid value for "origin_username", origin_username cannot be nil.')
155
155
  end
156
156
 
157
- if @credentials.nil?
158
- invalid_properties.push('invalid value for "credentials", credentials cannot be nil.')
159
- end
160
-
161
157
  if @created_at.nil?
162
158
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
163
159
  end
@@ -178,7 +174,6 @@ module StackOneHRIS
178
174
  return false if @origin_owner_id.nil?
179
175
  return false if @origin_owner_name.nil?
180
176
  return false if @origin_username.nil?
181
- return false if @credentials.nil?
182
177
  return false if @created_at.nil?
183
178
  return false if @updated_at.nil?
184
179
  true