stackone_hris_client 1.5.2 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +49 -30
- data/docs/Account.md +3 -1
- data/docs/AccountMeta.md +22 -0
- data/docs/AccountsApi.md +82 -14
- data/docs/CompaniesApi.md +25 -25
- data/docs/ConnectSession.md +1 -1
- data/docs/ConnectSessionCreate.md +1 -1
- data/docs/ConnectSessionToken.md +1 -1
- data/docs/ConnectSessionsApi.md +9 -9
- data/docs/CreateEmployeeResult.md +22 -0
- data/docs/Employee.md +56 -52
- data/docs/EmployeeApiModel.md +80 -0
- data/docs/EmployeeApiModelAvatar.md +20 -0
- data/docs/EmployeeApiModelEmploymentStatus.md +20 -0
- data/docs/EmployeeApiModelEmploymentType.md +20 -0
- data/docs/EmployeeApiModelEthnicity.md +20 -0
- data/docs/EmployeeApiModelGender.md +20 -0
- data/docs/EmployeeApiModelHomeLocation.md +38 -0
- data/docs/EmployeeApiModelMaritalStatus.md +20 -0
- data/docs/EmployeeApiModelWorkLocation.md +38 -0
- data/docs/EmployeeCustomFieldTypeEnum.md +20 -0
- data/docs/EmployeeCustomFields.md +30 -0
- data/docs/EmployeeCustomFieldsType.md +20 -0
- data/docs/EmployeeResult.md +1 -1
- data/docs/EmployeesApi.md +242 -28
- data/docs/EmployeesPaginated.md +1 -1
- data/docs/Employment.md +17 -15
- data/docs/EmploymentEmploymentContractType.md +20 -0
- data/docs/EmploymentEmploymentType.md +20 -0
- data/docs/EmploymentPayFrequency.md +20 -0
- data/docs/EmploymentPayPeriod.md +20 -0
- data/docs/EmploymentScheduleTypeEnum.md +20 -0
- data/docs/EmploymentsApi.md +27 -27
- data/docs/HrisCreateEmployeeRequestDto.md +80 -0
- data/docs/Location.md +20 -20
- data/docs/LocationCountry.md +20 -0
- data/docs/LocationLocationType.md +20 -0
- data/docs/LocationsApi.md +9 -9
- data/gem-config.yml +2 -2
- data/generate_gem.sh +0 -0
- data/lib/stackone_hris_client/api/accounts_api.rb +68 -7
- data/lib/stackone_hris_client/api/companies_api.rb +20 -20
- data/lib/stackone_hris_client/api/connect_sessions_api.rb +5 -5
- data/lib/stackone_hris_client/api/employees_api.rb +251 -20
- data/lib/stackone_hris_client/api/employments_api.rb +20 -20
- data/lib/stackone_hris_client/api/locations_api.rb +5 -5
- data/lib/stackone_hris_client/api_client.rb +1 -1
- data/lib/stackone_hris_client/api_error.rb +1 -1
- data/lib/stackone_hris_client/configuration.rb +2 -2
- data/lib/stackone_hris_client/models/account.rb +16 -7
- data/lib/stackone_hris_client/models/account_meta.rb +284 -0
- data/lib/stackone_hris_client/models/companies_paginated.rb +1 -1
- data/lib/stackone_hris_client/models/company.rb +1 -1
- data/lib/stackone_hris_client/models/company_result.rb +1 -1
- data/lib/stackone_hris_client/models/connect_session.rb +1 -1
- data/lib/stackone_hris_client/models/connect_session_authenticate.rb +1 -1
- data/lib/stackone_hris_client/models/connect_session_create.rb +1 -1
- data/lib/stackone_hris_client/models/connect_session_token.rb +1 -1
- data/lib/stackone_hris_client/models/country_code_enum.rb +1 -7
- data/lib/stackone_hris_client/models/create_employee_result.rb +250 -0
- data/lib/stackone_hris_client/models/employee.rb +117 -124
- data/lib/stackone_hris_client/models/employee_api_model.rb +523 -0
- data/lib/stackone_hris_client/models/employee_api_model_avatar.rb +234 -0
- data/lib/stackone_hris_client/models/employee_api_model_employment_status.rb +272 -0
- data/lib/stackone_hris_client/models/employee_api_model_employment_type.rb +272 -0
- data/lib/stackone_hris_client/models/employee_api_model_ethnicity.rb +272 -0
- data/lib/stackone_hris_client/models/employee_api_model_gender.rb +272 -0
- data/lib/stackone_hris_client/models/employee_api_model_home_location.rb +324 -0
- data/lib/stackone_hris_client/models/employee_api_model_marital_status.rb +272 -0
- data/lib/stackone_hris_client/models/employee_api_model_work_location.rb +324 -0
- data/lib/stackone_hris_client/models/employee_custom_field_type_enum.rb +264 -0
- data/lib/stackone_hris_client/models/employee_custom_fields.rb +279 -0
- data/lib/stackone_hris_client/models/employee_custom_fields_type.rb +272 -0
- data/lib/stackone_hris_client/models/employee_result.rb +1 -1
- data/lib/stackone_hris_client/models/employees_paginated.rb +1 -1
- data/lib/stackone_hris_client/models/employment.rb +22 -7
- data/lib/stackone_hris_client/models/employment_employment_contract_type.rb +272 -0
- data/lib/stackone_hris_client/models/employment_employment_type.rb +272 -0
- data/lib/stackone_hris_client/models/employment_pay_frequency.rb +272 -0
- data/lib/stackone_hris_client/models/employment_pay_period.rb +272 -0
- data/lib/stackone_hris_client/models/employment_result.rb +1 -1
- data/lib/stackone_hris_client/models/employment_schedule_type_enum.rb +264 -0
- data/lib/stackone_hris_client/models/employment_status_enum.rb +1 -7
- data/lib/stackone_hris_client/models/employment_type_enum.rb +1 -7
- data/lib/stackone_hris_client/models/employments_paginated.rb +1 -1
- data/lib/stackone_hris_client/models/ethnicity_enum.rb +1 -7
- data/lib/stackone_hris_client/models/gender_enum.rb +1 -7
- data/lib/stackone_hris_client/models/hris_create_employee_request_dto.rb +523 -0
- data/lib/stackone_hris_client/models/image.rb +1 -1
- data/lib/stackone_hris_client/models/location.rb +12 -8
- data/lib/stackone_hris_client/models/location_country.rb +272 -0
- data/lib/stackone_hris_client/models/location_location_type.rb +272 -0
- data/lib/stackone_hris_client/models/location_result.rb +1 -1
- data/lib/stackone_hris_client/models/location_type_enum.rb +1 -7
- data/lib/stackone_hris_client/models/locations_paginated.rb +1 -1
- data/lib/stackone_hris_client/models/marital_status_enum.rb +1 -7
- data/lib/stackone_hris_client/models/pay_frequency_enum.rb +1 -7
- data/lib/stackone_hris_client/models/pay_period_enum.rb +1 -7
- data/lib/stackone_hris_client/version.rb +2 -2
- data/lib/stackone_hris_client.rb +23 -1
- data/spec/api/accounts_api_spec.rb +30 -8
- data/spec/api/companies_api_spec.rb +13 -13
- data/spec/api/connect_sessions_api_spec.rb +8 -8
- data/spec/api/employees_api_spec.rb +60 -18
- data/spec/api/employments_api_spec.rb +13 -13
- data/spec/api/locations_api_spec.rb +9 -9
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/account_meta_spec.rb +50 -0
- data/spec/models/account_spec.rb +18 -12
- data/spec/models/companies_paginated_spec.rb +4 -4
- data/spec/models/company_result_spec.rb +3 -3
- data/spec/models/company_spec.rb +4 -4
- data/spec/models/connect_session_authenticate_spec.rb +5 -5
- data/spec/models/connect_session_create_spec.rb +17 -11
- data/spec/models/connect_session_spec.rb +14 -14
- data/spec/models/connect_session_token_spec.rb +15 -15
- data/spec/models/country_code_enum_spec.rb +4 -4
- data/spec/models/create_employee_result_spec.rb +46 -0
- data/spec/models/employee.rb +220 -0
- data/spec/models/employee_api_model_avatar_spec.rb +40 -0
- data/spec/models/employee_api_model_employment_status_spec.rb +44 -0
- data/spec/models/employee_api_model_employment_type_spec.rb +44 -0
- data/spec/models/employee_api_model_ethnicity_spec.rb +44 -0
- data/spec/models/employee_api_model_gender_spec.rb +44 -0
- data/spec/models/employee_api_model_home_location_spec.rb +94 -0
- data/spec/models/employee_api_model_marital_status_spec.rb +44 -0
- data/spec/models/employee_api_model_spec.rb +220 -0
- data/spec/models/employee_api_model_work_location_spec.rb +94 -0
- data/spec/models/employee_custom_field_type_enum_spec.rb +44 -0
- data/spec/models/employee_custom_fields_spec.rb +70 -0
- data/spec/models/employee_custom_fields_type_spec.rb +44 -0
- data/spec/models/employee_result_spec.rb +6 -6
- data/spec/models/employees_paginated_spec.rb +7 -7
- data/spec/models/employment_employment_contract_type_spec.rb +44 -0
- data/spec/models/employment_employment_type_spec.rb +44 -0
- data/spec/models/employment_pay_frequency_spec.rb +44 -0
- data/spec/models/employment_pay_period_spec.rb +44 -0
- data/spec/models/employment_result_spec.rb +3 -3
- data/spec/models/employment_schedule_type_enum_spec.rb +44 -0
- data/spec/models/employment_spec.rb +16 -10
- data/spec/models/employment_status_enum_spec.rb +4 -4
- data/spec/models/employment_type_enum_spec.rb +4 -4
- data/spec/models/employments_paginated_spec.rb +4 -4
- data/spec/models/ethnicity_enum_spec.rb +4 -4
- data/spec/models/gender_enum_spec.rb +4 -4
- data/spec/models/hris_create_employee_request_dto_spec.rb +220 -0
- data/spec/models/image_spec.rb +3 -3
- data/spec/models/location_country_spec.rb +44 -0
- data/spec/models/location_location_type_spec.rb +44 -0
- data/spec/models/location_result_spec.rb +3 -3
- data/spec/models/location_spec.rb +12 -12
- data/spec/models/location_type_enum_spec.rb +3 -3
- data/spec/models/locations_paginated_spec.rb +4 -4
- data/spec/models/marital_status_enum_spec.rb +4 -4
- data/spec/models/pay_frequency_enum_spec.rb +4 -4
- data/spec/models/pay_period_enum_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -1
- data/stackone_hris_client.gemspec +1 -1
- metadata +92 -4
- data/spec/models/employee_spec.rb +0 -124
data/docs/EmployeesApi.md
CHANGED
@@ -4,15 +4,87 @@ All URIs are relative to *https://api.stackone.com*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
-
| [**
|
8
|
-
| [**
|
7
|
+
| [**employee_create**](EmployeesApi.md#employee_create) | **POST** /unified/hris/employees | Creates an employee |
|
8
|
+
| [**employee_replace**](EmployeesApi.md#employee_replace) | **PUT** /unified/hris/employees/{id} | Replaces an employee |
|
9
|
+
| [**employee_update**](EmployeesApi.md#employee_update) | **PATCH** /unified/hris/employees/{id} | Updates an employee |
|
10
|
+
| [**hris_employees_get**](EmployeesApi.md#hris_employees_get) | **GET** /unified/hris/employees/{id} | Get Employee |
|
11
|
+
| [**hris_employees_list**](EmployeesApi.md#hris_employees_list) | **GET** /unified/hris/employees | List Employees |
|
9
12
|
|
10
13
|
|
11
|
-
##
|
14
|
+
## employee_create
|
12
15
|
|
13
|
-
> <
|
16
|
+
> <CreateEmployeeResult> employee_create(x_account_id, hris_create_employee_request_dto)
|
14
17
|
|
18
|
+
Creates an employee
|
15
19
|
|
20
|
+
### Examples
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'time'
|
24
|
+
require 'stackone_hris_client'
|
25
|
+
# setup authorization
|
26
|
+
StackOneHRIS.configure do |config|
|
27
|
+
# Configure HTTP basic authorization: basic
|
28
|
+
config.api_key_token = 'YOUR API KEY'
|
29
|
+
end
|
30
|
+
|
31
|
+
api_instance = StackOneHRIS::EmployeesApi.new
|
32
|
+
x_account_id = 'x_account_id_example' # String | The account identifier
|
33
|
+
hris_create_employee_request_dto = StackOneHRIS::HrisCreateEmployeeRequestDto.new # HrisCreateEmployeeRequestDto |
|
34
|
+
|
35
|
+
begin
|
36
|
+
# Creates an employee
|
37
|
+
result = api_instance.employee_create(x_account_id, hris_create_employee_request_dto)
|
38
|
+
p result
|
39
|
+
rescue StackOneHRIS::ApiError => e
|
40
|
+
puts "Error when calling EmployeesApi->employee_create: #{e}"
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
#### Using the employee_create_with_http_info variant
|
45
|
+
|
46
|
+
This returns an Array which contains the response data, status code and headers.
|
47
|
+
|
48
|
+
> <Array(<CreateEmployeeResult>, Integer, Hash)> employee_create_with_http_info(x_account_id, hris_create_employee_request_dto)
|
49
|
+
|
50
|
+
```ruby
|
51
|
+
begin
|
52
|
+
# Creates an employee
|
53
|
+
data, status_code, headers = api_instance.employee_create_with_http_info(x_account_id, hris_create_employee_request_dto)
|
54
|
+
p status_code # => 2xx
|
55
|
+
p headers # => { ... }
|
56
|
+
p data # => <CreateEmployeeResult>
|
57
|
+
rescue StackOneHRIS::ApiError => e
|
58
|
+
puts "Error when calling EmployeesApi->employee_create_with_http_info: #{e}"
|
59
|
+
end
|
60
|
+
```
|
61
|
+
|
62
|
+
### Parameters
|
63
|
+
|
64
|
+
| Name | Type | Description | Notes |
|
65
|
+
| ---- | ---- | ----------- | ----- |
|
66
|
+
| **x_account_id** | **String** | The account identifier | |
|
67
|
+
| **hris_create_employee_request_dto** | [**HrisCreateEmployeeRequestDto**](HrisCreateEmployeeRequestDto.md) | | |
|
68
|
+
|
69
|
+
### Return type
|
70
|
+
|
71
|
+
[**CreateEmployeeResult**](CreateEmployeeResult.md)
|
72
|
+
|
73
|
+
### Authorization
|
74
|
+
|
75
|
+
[basic](../README.md#basic)
|
76
|
+
|
77
|
+
### HTTP request headers
|
78
|
+
|
79
|
+
- **Content-Type**: application/json
|
80
|
+
- **Accept**: application/json
|
81
|
+
|
82
|
+
|
83
|
+
## employee_replace
|
84
|
+
|
85
|
+
> <CreateEmployeeResult> employee_replace(id, x_account_id, hris_create_employee_request_dto)
|
86
|
+
|
87
|
+
Replaces an employee
|
16
88
|
|
17
89
|
### Examples
|
18
90
|
|
@@ -26,42 +98,184 @@ StackOneHRIS.configure do |config|
|
|
26
98
|
end
|
27
99
|
|
28
100
|
api_instance = StackOneHRIS::EmployeesApi.new
|
29
|
-
id = 'id_example' # String |
|
101
|
+
id = 'id_example' # String |
|
102
|
+
x_account_id = 'x_account_id_example' # String | The account identifier
|
103
|
+
hris_create_employee_request_dto = StackOneHRIS::HrisCreateEmployeeRequestDto.new # HrisCreateEmployeeRequestDto |
|
104
|
+
|
105
|
+
begin
|
106
|
+
# Replaces an employee
|
107
|
+
result = api_instance.employee_replace(id, x_account_id, hris_create_employee_request_dto)
|
108
|
+
p result
|
109
|
+
rescue StackOneHRIS::ApiError => e
|
110
|
+
puts "Error when calling EmployeesApi->employee_replace: #{e}"
|
111
|
+
end
|
112
|
+
```
|
113
|
+
|
114
|
+
#### Using the employee_replace_with_http_info variant
|
115
|
+
|
116
|
+
This returns an Array which contains the response data, status code and headers.
|
117
|
+
|
118
|
+
> <Array(<CreateEmployeeResult>, Integer, Hash)> employee_replace_with_http_info(id, x_account_id, hris_create_employee_request_dto)
|
119
|
+
|
120
|
+
```ruby
|
121
|
+
begin
|
122
|
+
# Replaces an employee
|
123
|
+
data, status_code, headers = api_instance.employee_replace_with_http_info(id, x_account_id, hris_create_employee_request_dto)
|
124
|
+
p status_code # => 2xx
|
125
|
+
p headers # => { ... }
|
126
|
+
p data # => <CreateEmployeeResult>
|
127
|
+
rescue StackOneHRIS::ApiError => e
|
128
|
+
puts "Error when calling EmployeesApi->employee_replace_with_http_info: #{e}"
|
129
|
+
end
|
130
|
+
```
|
131
|
+
|
132
|
+
### Parameters
|
133
|
+
|
134
|
+
| Name | Type | Description | Notes |
|
135
|
+
| ---- | ---- | ----------- | ----- |
|
136
|
+
| **id** | **String** | | |
|
137
|
+
| **x_account_id** | **String** | The account identifier | |
|
138
|
+
| **hris_create_employee_request_dto** | [**HrisCreateEmployeeRequestDto**](HrisCreateEmployeeRequestDto.md) | | |
|
139
|
+
|
140
|
+
### Return type
|
141
|
+
|
142
|
+
[**CreateEmployeeResult**](CreateEmployeeResult.md)
|
143
|
+
|
144
|
+
### Authorization
|
145
|
+
|
146
|
+
[basic](../README.md#basic)
|
147
|
+
|
148
|
+
### HTTP request headers
|
149
|
+
|
150
|
+
- **Content-Type**: application/json
|
151
|
+
- **Accept**: application/json
|
152
|
+
|
153
|
+
|
154
|
+
## employee_update
|
155
|
+
|
156
|
+
> <CreateEmployeeResult> employee_update(id, x_account_id, hris_create_employee_request_dto)
|
157
|
+
|
158
|
+
Updates an employee
|
159
|
+
|
160
|
+
### Examples
|
161
|
+
|
162
|
+
```ruby
|
163
|
+
require 'time'
|
164
|
+
require 'stackone_hris_client'
|
165
|
+
# setup authorization
|
166
|
+
StackOneHRIS.configure do |config|
|
167
|
+
# Configure HTTP basic authorization: basic
|
168
|
+
config.api_key_token = 'YOUR API KEY'
|
169
|
+
end
|
170
|
+
|
171
|
+
api_instance = StackOneHRIS::EmployeesApi.new
|
172
|
+
id = 'id_example' # String |
|
173
|
+
x_account_id = 'x_account_id_example' # String | The account identifier
|
174
|
+
hris_create_employee_request_dto = StackOneHRIS::HrisCreateEmployeeRequestDto.new # HrisCreateEmployeeRequestDto |
|
175
|
+
|
176
|
+
begin
|
177
|
+
# Updates an employee
|
178
|
+
result = api_instance.employee_update(id, x_account_id, hris_create_employee_request_dto)
|
179
|
+
p result
|
180
|
+
rescue StackOneHRIS::ApiError => e
|
181
|
+
puts "Error when calling EmployeesApi->employee_update: #{e}"
|
182
|
+
end
|
183
|
+
```
|
184
|
+
|
185
|
+
#### Using the employee_update_with_http_info variant
|
186
|
+
|
187
|
+
This returns an Array which contains the response data, status code and headers.
|
188
|
+
|
189
|
+
> <Array(<CreateEmployeeResult>, Integer, Hash)> employee_update_with_http_info(id, x_account_id, hris_create_employee_request_dto)
|
190
|
+
|
191
|
+
```ruby
|
192
|
+
begin
|
193
|
+
# Updates an employee
|
194
|
+
data, status_code, headers = api_instance.employee_update_with_http_info(id, x_account_id, hris_create_employee_request_dto)
|
195
|
+
p status_code # => 2xx
|
196
|
+
p headers # => { ... }
|
197
|
+
p data # => <CreateEmployeeResult>
|
198
|
+
rescue StackOneHRIS::ApiError => e
|
199
|
+
puts "Error when calling EmployeesApi->employee_update_with_http_info: #{e}"
|
200
|
+
end
|
201
|
+
```
|
202
|
+
|
203
|
+
### Parameters
|
204
|
+
|
205
|
+
| Name | Type | Description | Notes |
|
206
|
+
| ---- | ---- | ----------- | ----- |
|
207
|
+
| **id** | **String** | | |
|
208
|
+
| **x_account_id** | **String** | The account identifier | |
|
209
|
+
| **hris_create_employee_request_dto** | [**HrisCreateEmployeeRequestDto**](HrisCreateEmployeeRequestDto.md) | | |
|
210
|
+
|
211
|
+
### Return type
|
212
|
+
|
213
|
+
[**CreateEmployeeResult**](CreateEmployeeResult.md)
|
214
|
+
|
215
|
+
### Authorization
|
216
|
+
|
217
|
+
[basic](../README.md#basic)
|
218
|
+
|
219
|
+
### HTTP request headers
|
220
|
+
|
221
|
+
- **Content-Type**: application/json
|
222
|
+
- **Accept**: application/json
|
223
|
+
|
224
|
+
|
225
|
+
## hris_employees_get
|
226
|
+
|
227
|
+
> <EmployeeResult> hris_employees_get(id, x_account_id, opts)
|
228
|
+
|
229
|
+
Get Employee
|
230
|
+
|
231
|
+
### Examples
|
232
|
+
|
233
|
+
```ruby
|
234
|
+
require 'time'
|
235
|
+
require 'stackone_hris_client'
|
236
|
+
# setup authorization
|
237
|
+
StackOneHRIS.configure do |config|
|
238
|
+
# Configure HTTP basic authorization: basic
|
239
|
+
config.api_key_token = 'YOUR API KEY'
|
240
|
+
end
|
241
|
+
|
242
|
+
api_instance = StackOneHRIS::EmployeesApi.new
|
243
|
+
id = 'id_example' # String |
|
30
244
|
x_account_id = 'x_account_id_example' # String | The account identifier
|
31
245
|
opts = {
|
32
246
|
page: 'page_example', # String | The page number of the results to fetch
|
33
247
|
page_size: 'page_size_example', # String | The number of results per page
|
34
248
|
raw: true, # Boolean | Indicates that the raw request result is returned
|
35
|
-
fields: 'id,first_name,last_name,name,display_name,gender,ethnicity,date_of_birth,birthday,marital_status,avatar,personal_email,personal_phone_number,work_email,work_phone_number,job_title,department,manager_id,hire_date,start_date,tenure,work_anniversary,employment_type,employment_status,termination_date,company_name', # String | The comma separated list of fields to return in the response (if empty, all fields are returned)
|
249
|
+
fields: 'id,first_name,last_name,name,display_name,gender,ethnicity,date_of_birth,birthday,marital_status,avatar_url,avatar,personal_email,personal_phone_number,work_email,work_phone_number,job_title,department,manager_id,hire_date,start_date,tenure,work_anniversary,employment_type,employment_contract_type,employment_status,termination_date,company_name,home_location,work_location,employments', # String | The comma separated list of fields to return in the response (if empty, all fields are returned)
|
36
250
|
sync_token: 'sync_token_example', # String | The sync token to select the only updated results
|
37
251
|
updated_after: 'updated_after_example', # String | Use a string with a date to only select results updated after that given date
|
38
|
-
expand: 'work_location,home_location,
|
252
|
+
expand: 'company,employments,work_location,home_location,custom_fields' # String | The comma separated list of fields that will be expanded in the response
|
39
253
|
}
|
40
254
|
|
41
255
|
begin
|
42
|
-
#
|
43
|
-
result = api_instance.
|
256
|
+
# Get Employee
|
257
|
+
result = api_instance.hris_employees_get(id, x_account_id, opts)
|
44
258
|
p result
|
45
259
|
rescue StackOneHRIS::ApiError => e
|
46
|
-
puts "Error when calling EmployeesApi->
|
260
|
+
puts "Error when calling EmployeesApi->hris_employees_get: #{e}"
|
47
261
|
end
|
48
262
|
```
|
49
263
|
|
50
|
-
#### Using the
|
264
|
+
#### Using the hris_employees_get_with_http_info variant
|
51
265
|
|
52
266
|
This returns an Array which contains the response data, status code and headers.
|
53
267
|
|
54
|
-
> <Array(<EmployeeResult>, Integer, Hash)>
|
268
|
+
> <Array(<EmployeeResult>, Integer, Hash)> hris_employees_get_with_http_info(id, x_account_id, opts)
|
55
269
|
|
56
270
|
```ruby
|
57
271
|
begin
|
58
|
-
#
|
59
|
-
data, status_code, headers = api_instance.
|
272
|
+
# Get Employee
|
273
|
+
data, status_code, headers = api_instance.hris_employees_get_with_http_info(id, x_account_id, opts)
|
60
274
|
p status_code # => 2xx
|
61
275
|
p headers # => { ... }
|
62
276
|
p data # => <EmployeeResult>
|
63
277
|
rescue StackOneHRIS::ApiError => e
|
64
|
-
puts "Error when calling EmployeesApi->
|
278
|
+
puts "Error when calling EmployeesApi->hris_employees_get_with_http_info: #{e}"
|
65
279
|
end
|
66
280
|
```
|
67
281
|
|
@@ -93,11 +307,11 @@ end
|
|
93
307
|
- **Accept**: application/json
|
94
308
|
|
95
309
|
|
96
|
-
##
|
97
|
-
|
98
|
-
> <EmployeesPaginated> employees_list(x_account_id, opts)
|
310
|
+
## hris_employees_list
|
99
311
|
|
312
|
+
> <EmployeesPaginated> hris_employees_list(x_account_id, opts)
|
100
313
|
|
314
|
+
List Employees
|
101
315
|
|
102
316
|
### Examples
|
103
317
|
|
@@ -116,36 +330,36 @@ opts = {
|
|
116
330
|
page: 'page_example', # String | The page number of the results to fetch
|
117
331
|
page_size: 'page_size_example', # String | The number of results per page
|
118
332
|
raw: true, # Boolean | Indicates that the raw request result is returned
|
119
|
-
fields: 'id,first_name,last_name,name,display_name,gender,ethnicity,date_of_birth,birthday,marital_status,avatar,personal_email,personal_phone_number,work_email,work_phone_number,job_title,department,manager_id,hire_date,start_date,tenure,work_anniversary,employment_type,employment_status,termination_date,company_name', # String | The comma separated list of fields to return in the response (if empty, all fields are returned)
|
333
|
+
fields: 'id,first_name,last_name,name,display_name,gender,ethnicity,date_of_birth,birthday,marital_status,avatar_url,avatar,personal_email,personal_phone_number,work_email,work_phone_number,job_title,department,manager_id,hire_date,start_date,tenure,work_anniversary,employment_type,employment_contract_type,employment_status,termination_date,company_name,home_location,work_location,employments', # String | The comma separated list of fields to return in the response (if empty, all fields are returned)
|
120
334
|
sync_token: 'sync_token_example', # String | The sync token to select the only updated results
|
121
335
|
updated_after: 'updated_after_example', # String | Use a string with a date to only select results updated after that given date
|
122
|
-
expand: 'work_location,home_location,
|
336
|
+
expand: 'company,employments,work_location,home_location,custom_fields' # String | The comma separated list of fields that will be expanded in the response
|
123
337
|
}
|
124
338
|
|
125
339
|
begin
|
126
|
-
#
|
127
|
-
result = api_instance.
|
340
|
+
# List Employees
|
341
|
+
result = api_instance.hris_employees_list(x_account_id, opts)
|
128
342
|
p result
|
129
343
|
rescue StackOneHRIS::ApiError => e
|
130
|
-
puts "Error when calling EmployeesApi->
|
344
|
+
puts "Error when calling EmployeesApi->hris_employees_list: #{e}"
|
131
345
|
end
|
132
346
|
```
|
133
347
|
|
134
|
-
#### Using the
|
348
|
+
#### Using the hris_employees_list_with_http_info variant
|
135
349
|
|
136
350
|
This returns an Array which contains the response data, status code and headers.
|
137
351
|
|
138
|
-
> <Array(<EmployeesPaginated>, Integer, Hash)>
|
352
|
+
> <Array(<EmployeesPaginated>, Integer, Hash)> hris_employees_list_with_http_info(x_account_id, opts)
|
139
353
|
|
140
354
|
```ruby
|
141
355
|
begin
|
142
|
-
#
|
143
|
-
data, status_code, headers = api_instance.
|
356
|
+
# List Employees
|
357
|
+
data, status_code, headers = api_instance.hris_employees_list_with_http_info(x_account_id, opts)
|
144
358
|
p status_code # => 2xx
|
145
359
|
p headers # => { ... }
|
146
360
|
p data # => <EmployeesPaginated>
|
147
361
|
rescue StackOneHRIS::ApiError => e
|
148
|
-
puts "Error when calling EmployeesApi->
|
362
|
+
puts "Error when calling EmployeesApi->hris_employees_list_with_http_info: #{e}"
|
149
363
|
end
|
150
364
|
```
|
151
365
|
|
data/docs/EmployeesPaginated.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **next_page** | **String** | | |
|
8
|
-
| **data** | [**Array<
|
8
|
+
| **data** | [**Array<EmployeeApiModel>**](EmployeeApiModel.md) | | |
|
9
9
|
| **raw** | **String** | | [optional] |
|
10
10
|
|
11
11
|
## Example
|
data/docs/Employment.md
CHANGED
@@ -4,15 +4,16 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **id** | **String** |
|
8
|
-
| **employee_id** | **String** |
|
9
|
-
| **job_title** | **String** |
|
10
|
-
| **pay_rate** | **String** |
|
11
|
-
| **pay_period** | [**
|
12
|
-
| **pay_frequency** | [**
|
13
|
-
| **pay_currency** | **String** |
|
14
|
-
| **effective_date** | **Time** |
|
15
|
-
| **employment_type** | [**
|
7
|
+
| **id** | **String** | The unique ID of the employment | [optional] |
|
8
|
+
| **employee_id** | **String** | The employee ID associated with this employment | |
|
9
|
+
| **job_title** | **String** | The job title of the employee | [optional] |
|
10
|
+
| **pay_rate** | **String** | The pay rate for the employee | [optional] |
|
11
|
+
| **pay_period** | [**EmploymentPayPeriod**](EmploymentPayPeriod.md) | | [optional] |
|
12
|
+
| **pay_frequency** | [**EmploymentPayFrequency**](EmploymentPayFrequency.md) | | [optional] |
|
13
|
+
| **pay_currency** | **String** | The currency used for pay | [optional] |
|
14
|
+
| **effective_date** | **Time** | The effective date of the employment contract | [optional] |
|
15
|
+
| **employment_type** | [**EmploymentEmploymentType**](EmploymentEmploymentType.md) | | [optional] |
|
16
|
+
| **employment_contract_type** | [**EmploymentEmploymentContractType**](EmploymentEmploymentContractType.md) | | [optional] |
|
16
17
|
|
17
18
|
## Example
|
18
19
|
|
@@ -20,15 +21,16 @@
|
|
20
21
|
require 'stackone_hris_client'
|
21
22
|
|
22
23
|
instance = StackOneHRIS::Employment.new(
|
23
|
-
id:
|
24
|
-
employee_id:
|
25
|
-
job_title:
|
26
|
-
pay_rate:
|
24
|
+
id: 123456,
|
25
|
+
employee_id: 1687-3,
|
26
|
+
job_title: Software Engineer,
|
27
|
+
pay_rate: 40.00,
|
27
28
|
pay_period: null,
|
28
29
|
pay_frequency: null,
|
29
|
-
pay_currency:
|
30
|
+
pay_currency: USD,
|
30
31
|
effective_date: null,
|
31
|
-
employment_type: null
|
32
|
+
employment_type: null,
|
33
|
+
employment_contract_type: null
|
32
34
|
)
|
33
35
|
```
|
34
36
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# StackOneHRIS::EmploymentEmploymentContractType
|
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::EmploymentEmploymentContractType.new(
|
16
|
+
value: null,
|
17
|
+
source_value: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# StackOneHRIS::EmploymentEmploymentType
|
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::EmploymentEmploymentType.new(
|
16
|
+
value: null,
|
17
|
+
source_value: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# StackOneHRIS::EmploymentPayFrequency
|
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::EmploymentPayFrequency.new(
|
16
|
+
value: null,
|
17
|
+
source_value: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# StackOneHRIS::EmploymentPayPeriod
|
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::EmploymentPayPeriod.new(
|
16
|
+
value: null,
|
17
|
+
source_value: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# StackOneHRIS::EmploymentScheduleTypeEnum
|
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::EmploymentScheduleTypeEnum.new(
|
16
|
+
value: null,
|
17
|
+
source_value: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/EmploymentsApi.md
CHANGED
@@ -4,15 +4,15 @@ All URIs are relative to *https://api.stackone.com*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
-
| [**
|
8
|
-
| [**
|
7
|
+
| [**hris_employments_get**](EmploymentsApi.md#hris_employments_get) | **GET** /unified/hris/employments/{id} | Get Employment |
|
8
|
+
| [**hris_employments_list**](EmploymentsApi.md#hris_employments_list) | **GET** /unified/hris/employments | List Employments |
|
9
9
|
|
10
10
|
|
11
|
-
##
|
12
|
-
|
13
|
-
> <EmploymentResult> employments_get(id, x_account_id, opts)
|
11
|
+
## hris_employments_get
|
14
12
|
|
13
|
+
> <EmploymentResult> hris_employments_get(id, x_account_id, opts)
|
15
14
|
|
15
|
+
Get Employment
|
16
16
|
|
17
17
|
### Examples
|
18
18
|
|
@@ -26,41 +26,41 @@ StackOneHRIS.configure do |config|
|
|
26
26
|
end
|
27
27
|
|
28
28
|
api_instance = StackOneHRIS::EmploymentsApi.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
|
33
33
|
page_size: 'page_size_example', # String | The number of results per page
|
34
34
|
raw: true, # Boolean | Indicates that the raw request result is returned
|
35
|
-
fields: 'id,employee_id,job_title,pay_rate,pay_period,pay_frequency,pay_currency,effective_date,employment_type', # String | The comma separated list of fields to return in the response (if empty, all fields are returned)
|
35
|
+
fields: 'id,employee_id,job_title,pay_rate,pay_period,pay_frequency,pay_currency,effective_date,employment_type,employment_contract_type', # String | The comma separated list of fields to return in the response (if empty, all fields are returned)
|
36
36
|
sync_token: 'sync_token_example', # String | The sync token to select the only updated results
|
37
37
|
updated_after: 'updated_after_example' # String | Use a string with a date to only select results updated after that given date
|
38
38
|
}
|
39
39
|
|
40
40
|
begin
|
41
|
-
#
|
42
|
-
result = api_instance.
|
41
|
+
# Get Employment
|
42
|
+
result = api_instance.hris_employments_get(id, x_account_id, opts)
|
43
43
|
p result
|
44
44
|
rescue StackOneHRIS::ApiError => e
|
45
|
-
puts "Error when calling EmploymentsApi->
|
45
|
+
puts "Error when calling EmploymentsApi->hris_employments_get: #{e}"
|
46
46
|
end
|
47
47
|
```
|
48
48
|
|
49
|
-
#### Using the
|
49
|
+
#### Using the hris_employments_get_with_http_info variant
|
50
50
|
|
51
51
|
This returns an Array which contains the response data, status code and headers.
|
52
52
|
|
53
|
-
> <Array(<EmploymentResult>, Integer, Hash)>
|
53
|
+
> <Array(<EmploymentResult>, Integer, Hash)> hris_employments_get_with_http_info(id, x_account_id, opts)
|
54
54
|
|
55
55
|
```ruby
|
56
56
|
begin
|
57
|
-
#
|
58
|
-
data, status_code, headers = api_instance.
|
57
|
+
# Get Employment
|
58
|
+
data, status_code, headers = api_instance.hris_employments_get_with_http_info(id, x_account_id, opts)
|
59
59
|
p status_code # => 2xx
|
60
60
|
p headers # => { ... }
|
61
61
|
p data # => <EmploymentResult>
|
62
62
|
rescue StackOneHRIS::ApiError => e
|
63
|
-
puts "Error when calling EmploymentsApi->
|
63
|
+
puts "Error when calling EmploymentsApi->hris_employments_get_with_http_info: #{e}"
|
64
64
|
end
|
65
65
|
```
|
66
66
|
|
@@ -91,11 +91,11 @@ end
|
|
91
91
|
- **Accept**: application/json
|
92
92
|
|
93
93
|
|
94
|
-
##
|
95
|
-
|
96
|
-
> <EmploymentsPaginated> employments_list(x_account_id, opts)
|
94
|
+
## hris_employments_list
|
97
95
|
|
96
|
+
> <EmploymentsPaginated> hris_employments_list(x_account_id, opts)
|
98
97
|
|
98
|
+
List Employments
|
99
99
|
|
100
100
|
### Examples
|
101
101
|
|
@@ -114,35 +114,35 @@ opts = {
|
|
114
114
|
page: 'page_example', # String | The page number of the results to fetch
|
115
115
|
page_size: 'page_size_example', # String | The number of results per page
|
116
116
|
raw: true, # Boolean | Indicates that the raw request result is returned
|
117
|
-
fields: 'id,employee_id,job_title,pay_rate,pay_period,pay_frequency,pay_currency,effective_date,employment_type', # String | The comma separated list of fields to return in the response (if empty, all fields are returned)
|
117
|
+
fields: 'id,employee_id,job_title,pay_rate,pay_period,pay_frequency,pay_currency,effective_date,employment_type,employment_contract_type', # String | The comma separated list of fields to return in the response (if empty, all fields are returned)
|
118
118
|
sync_token: 'sync_token_example', # String | The sync token to select the only updated results
|
119
119
|
updated_after: 'updated_after_example' # String | Use a string with a date to only select results updated after that given date
|
120
120
|
}
|
121
121
|
|
122
122
|
begin
|
123
|
-
#
|
124
|
-
result = api_instance.
|
123
|
+
# List Employments
|
124
|
+
result = api_instance.hris_employments_list(x_account_id, opts)
|
125
125
|
p result
|
126
126
|
rescue StackOneHRIS::ApiError => e
|
127
|
-
puts "Error when calling EmploymentsApi->
|
127
|
+
puts "Error when calling EmploymentsApi->hris_employments_list: #{e}"
|
128
128
|
end
|
129
129
|
```
|
130
130
|
|
131
|
-
#### Using the
|
131
|
+
#### Using the hris_employments_list_with_http_info variant
|
132
132
|
|
133
133
|
This returns an Array which contains the response data, status code and headers.
|
134
134
|
|
135
|
-
> <Array(<EmploymentsPaginated>, Integer, Hash)>
|
135
|
+
> <Array(<EmploymentsPaginated>, Integer, Hash)> hris_employments_list_with_http_info(x_account_id, opts)
|
136
136
|
|
137
137
|
```ruby
|
138
138
|
begin
|
139
|
-
#
|
140
|
-
data, status_code, headers = api_instance.
|
139
|
+
# List Employments
|
140
|
+
data, status_code, headers = api_instance.hris_employments_list_with_http_info(x_account_id, opts)
|
141
141
|
p status_code # => 2xx
|
142
142
|
p headers # => { ... }
|
143
143
|
p data # => <EmploymentsPaginated>
|
144
144
|
rescue StackOneHRIS::ApiError => e
|
145
|
-
puts "Error when calling EmploymentsApi->
|
145
|
+
puts "Error when calling EmploymentsApi->hris_employments_list_with_http_info: #{e}"
|
146
146
|
end
|
147
147
|
```
|
148
148
|
|