stackone_hris_client 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +31 -5
- data/docs/Account.md +1 -1
- data/docs/AccountMeta.md +22 -0
- data/docs/AccountsApi.md +70 -2
- data/docs/CompaniesApi.md +1 -1
- data/docs/ConnectSessionsApi.md +1 -1
- data/docs/CreateEmployeeResult.md +22 -0
- data/docs/Employee.md +56 -54
- 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 +219 -5
- 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 +3 -3
- 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 +1 -1
- data/gem-config.yml +2 -2
- data/generate_gem.sh +0 -0
- data/lib/stackone_hris_client/api/accounts_api.rb +61 -0
- data/lib/stackone_hris_client/api/employees_api.rb +231 -0
- data/lib/stackone_hris_client/models/account.rb +0 -5
- data/lib/stackone_hris_client/models/account_meta.rb +284 -0
- data/lib/stackone_hris_client/models/country_code_enum.rb +0 -6
- data/lib/stackone_hris_client/models/create_employee_result.rb +250 -0
- data/lib/stackone_hris_client/models/employee.rb +110 -126
- 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/employment.rb +21 -6
- 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_schedule_type_enum.rb +264 -0
- data/lib/stackone_hris_client/models/employment_status_enum.rb +0 -6
- data/lib/stackone_hris_client/models/employment_type_enum.rb +0 -6
- data/lib/stackone_hris_client/models/ethnicity_enum.rb +0 -6
- data/lib/stackone_hris_client/models/gender_enum.rb +0 -6
- data/lib/stackone_hris_client/models/hris_create_employee_request_dto.rb +523 -0
- data/lib/stackone_hris_client/models/location.rb +11 -7
- 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_type_enum.rb +0 -6
- data/lib/stackone_hris_client/models/marital_status_enum.rb +0 -6
- data/lib/stackone_hris_client/models/pay_frequency_enum.rb +0 -6
- data/lib/stackone_hris_client/models/pay_period_enum.rb +0 -6
- data/lib/stackone_hris_client/version.rb +1 -1
- data/lib/stackone_hris_client.rb +22 -0
- 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/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
- metadata +92 -4
- data/spec/models/employee_spec.rb +0 -124
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# StackOneHRIS::EmployeeApiModelMaritalStatus
|
|
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::EmployeeApiModelMaritalStatus.new(
|
|
16
|
+
value: null,
|
|
17
|
+
source_value: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# StackOneHRIS::EmployeeApiModelWorkLocation
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
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
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'stackone_hris_client'
|
|
23
|
+
|
|
24
|
+
instance = StackOneHRIS::EmployeeApiModelWorkLocation.new(
|
|
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
|
+
country: null,
|
|
35
|
+
location_type: null
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# StackOneHRIS::EmployeeCustomFieldTypeEnum
|
|
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::EmployeeCustomFieldTypeEnum.new(
|
|
16
|
+
value: null,
|
|
17
|
+
source_value: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# StackOneHRIS::EmployeeCustomFields
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | The unique identifier for the custom field, which defaults to the name property if the ID is not accessible. | [optional] |
|
|
8
|
+
| **name** | **String** | The name of the custom field. | [optional] |
|
|
9
|
+
| **description** | **String** | The description of the custom field. | [optional] |
|
|
10
|
+
| **type** | [**EmployeeCustomFieldsType**](EmployeeCustomFieldsType.md) | | [optional] |
|
|
11
|
+
| **value** | **Object** | The value associated with the custom field. | [optional] |
|
|
12
|
+
| **value_id** | **String** | The unique identifier for the value of the custom field. | [optional] |
|
|
13
|
+
| **options** | **Array<String>** | An array of possible options for the custom field. | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'stackone_hris_client'
|
|
19
|
+
|
|
20
|
+
instance = StackOneHRIS::EmployeeCustomFields.new(
|
|
21
|
+
id: custom_field_123,
|
|
22
|
+
name: Training Completion Status,
|
|
23
|
+
description: The completion status of the employee's training.,
|
|
24
|
+
type: null,
|
|
25
|
+
value: Completed,
|
|
26
|
+
value_id: value_456,
|
|
27
|
+
options: ["Not Started","In Progress","Completed","Overdue"]
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# StackOneHRIS::EmployeeCustomFieldsType
|
|
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::EmployeeCustomFieldsType.new(
|
|
16
|
+
value: null,
|
|
17
|
+
source_value: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/EmployeeResult.md
CHANGED
data/docs/EmployeesApi.md
CHANGED
|
@@ -4,10 +4,224 @@ All URIs are relative to *https://api.stackone.com*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
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 |
|
|
7
10
|
| [**hris_employees_get**](EmployeesApi.md#hris_employees_get) | **GET** /unified/hris/employees/{id} | Get Employee |
|
|
8
11
|
| [**hris_employees_list**](EmployeesApi.md#hris_employees_list) | **GET** /unified/hris/employees | List Employees |
|
|
9
12
|
|
|
10
13
|
|
|
14
|
+
## employee_create
|
|
15
|
+
|
|
16
|
+
> <CreateEmployeeResult> employee_create(x_account_id, hris_create_employee_request_dto)
|
|
17
|
+
|
|
18
|
+
Creates an employee
|
|
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
|
|
88
|
+
|
|
89
|
+
### Examples
|
|
90
|
+
|
|
91
|
+
```ruby
|
|
92
|
+
require 'time'
|
|
93
|
+
require 'stackone_hris_client'
|
|
94
|
+
# setup authorization
|
|
95
|
+
StackOneHRIS.configure do |config|
|
|
96
|
+
# Configure HTTP basic authorization: basic
|
|
97
|
+
config.api_key_token = 'YOUR API KEY'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
api_instance = StackOneHRIS::EmployeesApi.new
|
|
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
|
+
|
|
11
225
|
## hris_employees_get
|
|
12
226
|
|
|
13
227
|
> <EmployeeResult> hris_employees_get(id, x_account_id, opts)
|
|
@@ -26,16 +240,16 @@ StackOneHRIS.configure do |config|
|
|
|
26
240
|
end
|
|
27
241
|
|
|
28
242
|
api_instance = StackOneHRIS::EmployeesApi.new
|
|
29
|
-
id = 'id_example' # String |
|
|
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_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_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
|
|
@@ -116,10 +330,10 @@ 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_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_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
|
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
|
@@ -26,13 +26,13 @@ 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
|
}
|
|
@@ -114,7 +114,7 @@ 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
|
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# StackOneHRIS::HrisCreateEmployeeRequestDto
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | The employee ID | [optional] |
|
|
8
|
+
| **first_name** | **String** | The employee first name | [optional] |
|
|
9
|
+
| **last_name** | **String** | The employee last name | [optional] |
|
|
10
|
+
| **name** | **String** | The employee name | [optional] |
|
|
11
|
+
| **display_name** | **String** | The employee display name | [optional] |
|
|
12
|
+
| **avatar_url** | **String** | The employee avatar Url | [optional] |
|
|
13
|
+
| **personal_email** | **String** | The employee personal email | [optional] |
|
|
14
|
+
| **personal_phone_number** | **String** | The employee personal phone number | [optional] |
|
|
15
|
+
| **work_email** | **String** | The employee work email | [optional] |
|
|
16
|
+
| **work_phone_number** | **String** | The employee work phone number | [optional] |
|
|
17
|
+
| **job_title** | **String** | The employee job title | [optional] |
|
|
18
|
+
| **department** | **String** | The employee department | [optional] |
|
|
19
|
+
| **manager_id** | **String** | The employee manager ID | [optional] |
|
|
20
|
+
| **gender** | [**EmployeeApiModelGender**](EmployeeApiModelGender.md) | | [optional] |
|
|
21
|
+
| **ethnicity** | [**EmployeeApiModelEthnicity**](EmployeeApiModelEthnicity.md) | | [optional] |
|
|
22
|
+
| **date_of_birth** | **String** | The employee date_of_birth | [optional] |
|
|
23
|
+
| **birthday** | **String** | The employee birthday | [optional] |
|
|
24
|
+
| **marital_status** | [**EmployeeApiModelMaritalStatus**](EmployeeApiModelMaritalStatus.md) | | [optional] |
|
|
25
|
+
| **avatar** | [**EmployeeApiModelAvatar**](EmployeeApiModelAvatar.md) | | [optional] |
|
|
26
|
+
| **hire_date** | **String** | The employee hire date | [optional] |
|
|
27
|
+
| **start_date** | **String** | The employee start date | [optional] |
|
|
28
|
+
| **tenure** | **String** | The employee tenure | [optional] |
|
|
29
|
+
| **work_anniversary** | **String** | The employee work anniversary | [optional] |
|
|
30
|
+
| **employment_type** | [**EmployeeApiModelEmploymentType**](EmployeeApiModelEmploymentType.md) | | [optional] |
|
|
31
|
+
| **employment_contract_type** | [**EmploymentEmploymentContractType**](EmploymentEmploymentContractType.md) | | [optional] |
|
|
32
|
+
| **employment_status** | [**EmployeeApiModelEmploymentStatus**](EmployeeApiModelEmploymentStatus.md) | | [optional] |
|
|
33
|
+
| **termination_date** | **String** | The employee termination date | [optional] |
|
|
34
|
+
| **home_location** | [**EmployeeApiModelHomeLocation**](EmployeeApiModelHomeLocation.md) | | [optional] |
|
|
35
|
+
| **work_location** | [**EmployeeApiModelWorkLocation**](EmployeeApiModelWorkLocation.md) | | [optional] |
|
|
36
|
+
| **company_name** | **String** | The employee company name | [optional] |
|
|
37
|
+
| **employments** | [**Array<Employment>**](Employment.md) | The employee employments | [optional] |
|
|
38
|
+
| **custom_fields** | [**Array<EmployeeCustomFields>**](EmployeeCustomFields.md) | The employee custom fields | [optional] |
|
|
39
|
+
|
|
40
|
+
## Example
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
require 'stackone_hris_client'
|
|
44
|
+
|
|
45
|
+
instance = StackOneHRIS::HrisCreateEmployeeRequestDto.new(
|
|
46
|
+
id: 1687-3,
|
|
47
|
+
first_name: Issac,
|
|
48
|
+
last_name: Newton,
|
|
49
|
+
name: Issac Newton,
|
|
50
|
+
display_name: Sir Issac Newton,
|
|
51
|
+
avatar_url: https://example.com/avatar.png,
|
|
52
|
+
personal_email: isaac.newton@example.com,
|
|
53
|
+
personal_phone_number: +1234567890,
|
|
54
|
+
work_email: newton@example.com,
|
|
55
|
+
work_phone_number: +1234567890,
|
|
56
|
+
job_title: Physicist,
|
|
57
|
+
department: Physics,
|
|
58
|
+
manager_id: 67890,
|
|
59
|
+
gender: null,
|
|
60
|
+
ethnicity: null,
|
|
61
|
+
date_of_birth: 1990-01-01,
|
|
62
|
+
birthday: 2023-06-14T00:00:00Z,
|
|
63
|
+
marital_status: null,
|
|
64
|
+
avatar: null,
|
|
65
|
+
hire_date: 2022-01-01,
|
|
66
|
+
start_date: 2022-01-01,
|
|
67
|
+
tenure: 2,
|
|
68
|
+
work_anniversary: 2022-06-14T00:00:00Z,
|
|
69
|
+
employment_type: null,
|
|
70
|
+
employment_contract_type: null,
|
|
71
|
+
employment_status: null,
|
|
72
|
+
termination_date: 2023-06-14T00:00:00Z,
|
|
73
|
+
home_location: null,
|
|
74
|
+
work_location: null,
|
|
75
|
+
company_name: Example Corp,
|
|
76
|
+
employments: null,
|
|
77
|
+
custom_fields: null
|
|
78
|
+
)
|
|
79
|
+
```
|
|
80
|
+
|