vitable-connect 8.3.1 → 8.4.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/.fern/metadata.json +2 -2
- data/changelog.md +7 -0
- data/lib/VitableConnect/client.rb +1 -1
- data/lib/VitableConnect/employees/client.rb +23 -4
- data/lib/VitableConnect/employees/types/get_employees_request.rb +2 -0
- data/lib/VitableConnect/employees/types/patched_update_employee_request.rb +2 -0
- data/lib/VitableConnect/version.rb +1 -1
- data/reference.md +21 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3f5a8c1dc9f7fb0501a5eb2428a0d5ea69ee98b46c9b20c7e5fc73b0fd48c619
|
|
4
|
+
data.tar.gz: 89e9f440f59b73ffd0a1dd6bf33088ae6ba66876c421507934b576bc16092f60
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b81fe4a4532fd28c82667a0bee520d4816bfa354f85cf5ada705cb53f000b9e8c5e73eeaadcd580250e9fa98f62f322eaf34812ac838ae8236ee8a9e9a03343
|
|
7
|
+
data.tar.gz: 309fc69f5c6b6afe568ef3b1650b6c8db88de32f64ec3a1985c59a4bfa22bbdfda1659bc6074847d43774064645e5e5fb06f56295ddbccf8608f493d00e4ce81
|
data/.fern/metadata.json
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
"offsetSemantics": "page-index",
|
|
8
8
|
"respectAuthSchemeNames": true
|
|
9
9
|
},
|
|
10
|
-
"originGitCommit": "
|
|
10
|
+
"originGitCommit": "61d40f260d63c4439b53339aa147f819b9e9572a",
|
|
11
11
|
"originGitCommitIsDirty": false,
|
|
12
12
|
"invokedBy": "ci",
|
|
13
13
|
"requestedVersion": "AUTO",
|
|
14
14
|
"ciProvider": "gitlab",
|
|
15
|
-
"sdkVersion": "8.
|
|
15
|
+
"sdkVersion": "8.4.0"
|
|
16
16
|
}
|
data/changelog.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## 8.4.0 - 2026-11-10
|
|
2
|
+
### Added
|
|
3
|
+
* **`vitable_organization`** optional parameter on `EmployeesClient#get` and `EmployeesClient#update` — when supplied, the value is sent as the `X-Vitable-Organization` HTTP header to scope the request to a specific organization.
|
|
4
|
+
* **`GetEmployeesRequest#vitable_organization`** and **`PatchedUpdateEmployeeRequest#vitable_organization`** — new optional fields (mapped to the `X-Vitable-Organization` header) on the corresponding request types.
|
|
5
|
+
### Changed
|
|
6
|
+
* **`EmployeesClient#update`** inline documentation expanded to describe 404, 403 (`organization_access_denied`), 422 (`email_taken`, `invalid_account_update`), and 400 (`invalid_employee_update`, `employee_already_terminated`) error responses.
|
|
7
|
+
|
|
1
8
|
## 8.3.1 - 2026-11-06
|
|
2
9
|
* chore: document 409 conflict behavior for employee update endpoint
|
|
3
10
|
* Expand the inline documentation for the `update` method on the
|
|
@@ -11,7 +11,7 @@ module VitableConnect
|
|
|
11
11
|
@raw_client = VitableConnect::Internal::Http::RawClient.new(
|
|
12
12
|
base_url: base_url || VitableConnect::Environment::PRODUCTION,
|
|
13
13
|
headers: {
|
|
14
|
-
"User-Agent" => "vitable-connect/8.
|
|
14
|
+
"User-Agent" => "vitable-connect/8.4.0",
|
|
15
15
|
"X-Fern-Language" => "Ruby",
|
|
16
16
|
Authorization: "Bearer #{api_key}"
|
|
17
17
|
},
|
|
@@ -23,6 +23,7 @@ module VitableConnect
|
|
|
23
23
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
24
24
|
# @option request_options [Integer] :timeout_in_seconds
|
|
25
25
|
# @option params [VitableConnect::Types::EmployeeID] :employee_id
|
|
26
|
+
# @option params [String, nil] :vitable_organization
|
|
26
27
|
#
|
|
27
28
|
# @example
|
|
28
29
|
# client.employees.get(employee_id: "empl_abc123def456")
|
|
@@ -30,10 +31,14 @@ module VitableConnect
|
|
|
30
31
|
# @return [VitableConnect::Types::EmployeeResponse]
|
|
31
32
|
def get(request_options: {}, **params)
|
|
32
33
|
params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
|
|
34
|
+
headers = {}
|
|
35
|
+
headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
|
|
36
|
+
|
|
33
37
|
request = VitableConnect::Internal::JSON::Request.new(
|
|
34
38
|
base_url: request_options[:base_url],
|
|
35
39
|
method: "GET",
|
|
36
40
|
path: "v1/employees/#{URI.encode_uri_component(params[:employee_id].to_s)}",
|
|
41
|
+
headers: headers,
|
|
37
42
|
request_options: request_options
|
|
38
43
|
)
|
|
39
44
|
begin
|
|
@@ -53,9 +58,18 @@ module VitableConnect
|
|
|
53
58
|
# Updates employee personal, contact, address, and employment fields. This endpoint currently supports email,
|
|
54
59
|
# phone, gender, address, employee_class, start_date, and compensation_type. effective_date is required and
|
|
55
60
|
# applies to employee_class and compensation_type when those fields are included in the request. Returns 409
|
|
56
|
-
# employer_has_hris_connection when the request changes employee_class, compensation_type or start_date
|
|
57
|
-
#
|
|
58
|
-
#
|
|
61
|
+
# `employer_has_hris_connection` when the request changes employee_class, compensation_type or start_date while an
|
|
62
|
+
# HRIS connection manages this employer's employees; re-sending the current values with a new effective_date is
|
|
63
|
+
# allowed.
|
|
64
|
+
#
|
|
65
|
+
# Returns 404 if the employee does not exist or is not accessible to the caller, and 403
|
|
66
|
+
# `organization_access_denied` when an API key sends `X-Vitable-Organization` for an organization other than its
|
|
67
|
+
# own.
|
|
68
|
+
#
|
|
69
|
+
# 422 `app_error_code` values: `email_taken` (the email belongs to another person's Vitable account),
|
|
70
|
+
# `invalid_account_update` (another account detail, such as the phone, belongs to another person). 400 is returned
|
|
71
|
+
# for malformed input and for changes the employee record rejects (`invalid_employee_update`,
|
|
72
|
+
# `employee_already_terminated`).
|
|
59
73
|
#
|
|
60
74
|
# @param request_options [Hash]
|
|
61
75
|
# @param params [VitableConnect::Employees::Types::PatchedUpdateEmployeeRequest]
|
|
@@ -65,6 +79,7 @@ module VitableConnect
|
|
|
65
79
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
66
80
|
# @option request_options [Integer] :timeout_in_seconds
|
|
67
81
|
# @option params [VitableConnect::Types::EmployeeID] :employee_id
|
|
82
|
+
# @option params [String, nil] :vitable_organization
|
|
68
83
|
#
|
|
69
84
|
# @example
|
|
70
85
|
# client.employees.update(
|
|
@@ -79,13 +94,17 @@ module VitableConnect
|
|
|
79
94
|
def update(request_options: {}, **params)
|
|
80
95
|
params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
|
|
81
96
|
request_data = VitableConnect::Employees::Types::PatchedUpdateEmployeeRequest.new(params).to_h
|
|
82
|
-
non_body_param_names = %w[employee_id]
|
|
97
|
+
non_body_param_names = %w[employee_id X-Vitable-Organization]
|
|
83
98
|
body = request_data.except(*non_body_param_names)
|
|
84
99
|
|
|
100
|
+
headers = {}
|
|
101
|
+
headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
|
|
102
|
+
|
|
85
103
|
request = VitableConnect::Internal::JSON::Request.new(
|
|
86
104
|
base_url: request_options[:base_url],
|
|
87
105
|
method: "PATCH",
|
|
88
106
|
path: "v1/employees/#{URI.encode_uri_component(params[:employee_id].to_s)}",
|
|
107
|
+
headers: headers,
|
|
89
108
|
body: body,
|
|
90
109
|
request_options: request_options
|
|
91
110
|
)
|
|
@@ -5,6 +5,8 @@ module VitableConnect
|
|
|
5
5
|
module Types
|
|
6
6
|
class GetEmployeesRequest < Internal::Types::Model
|
|
7
7
|
field :employee_id, -> { String }, optional: false, nullable: false
|
|
8
|
+
|
|
9
|
+
field :vitable_organization, -> { String }, optional: true, nullable: false, api_name: "X-Vitable-Organization"
|
|
8
10
|
end
|
|
9
11
|
end
|
|
10
12
|
end
|
|
@@ -6,6 +6,8 @@ module VitableConnect
|
|
|
6
6
|
class PatchedUpdateEmployeeRequest < Internal::Types::Model
|
|
7
7
|
field :employee_id, -> { String }, optional: false, nullable: false
|
|
8
8
|
|
|
9
|
+
field :vitable_organization, -> { String }, optional: true, nullable: false, api_name: "X-Vitable-Organization"
|
|
10
|
+
|
|
9
11
|
field :email, -> { String }, optional: true, nullable: false
|
|
10
12
|
|
|
11
13
|
field :phone, -> { String }, optional: true, nullable: false
|
data/reference.md
CHANGED
|
@@ -125,6 +125,14 @@ client.employees.get(employee_id: "empl_abc123def456")
|
|
|
125
125
|
<dl>
|
|
126
126
|
<dd>
|
|
127
127
|
|
|
128
|
+
**vitable_organization:** `String` — Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`.
|
|
129
|
+
|
|
130
|
+
</dd>
|
|
131
|
+
</dl>
|
|
132
|
+
|
|
133
|
+
<dl>
|
|
134
|
+
<dd>
|
|
135
|
+
|
|
128
136
|
**request_options:** `VitableConnect::Employees::RequestOptions`
|
|
129
137
|
|
|
130
138
|
</dd>
|
|
@@ -149,7 +157,11 @@ client.employees.get(employee_id: "empl_abc123def456")
|
|
|
149
157
|
<dl>
|
|
150
158
|
<dd>
|
|
151
159
|
|
|
152
|
-
Updates employee personal, contact, address, and employment fields. This endpoint currently supports email, phone, gender, address, employee_class, start_date, and compensation_type. effective_date is required and applies to employee_class and compensation_type when those fields are included in the request. Returns 409 employer_has_hris_connection when the request changes employee_class, compensation_type or start_date
|
|
160
|
+
Updates employee personal, contact, address, and employment fields. This endpoint currently supports email, phone, gender, address, employee_class, start_date, and compensation_type. effective_date is required and applies to employee_class and compensation_type when those fields are included in the request. Returns 409 `employer_has_hris_connection` when the request changes employee_class, compensation_type or start_date while an HRIS connection manages this employer's employees; re-sending the current values with a new effective_date is allowed.
|
|
161
|
+
|
|
162
|
+
Returns 404 if the employee does not exist or is not accessible to the caller, and 403 `organization_access_denied` when an API key sends `X-Vitable-Organization` for an organization other than its own.
|
|
163
|
+
|
|
164
|
+
422 `app_error_code` values: `email_taken` (the email belongs to another person's Vitable account), `invalid_account_update` (another account detail, such as the phone, belongs to another person). 400 is returned for malformed input and for changes the employee record rejects (`invalid_employee_update`, `employee_already_terminated`).
|
|
153
165
|
</dd>
|
|
154
166
|
</dl>
|
|
155
167
|
</dd>
|
|
@@ -193,6 +205,14 @@ client.employees.update(
|
|
|
193
205
|
<dl>
|
|
194
206
|
<dd>
|
|
195
207
|
|
|
208
|
+
**vitable_organization:** `String` — Organization to act as for this request (e.g. `org_SGVsbG8gV29ybGQ`). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 `organization_required`. A malformed value returns 400 `invalid_organization_header`, and naming an organization you do not have access to returns 403 `organization_access_denied`.
|
|
209
|
+
|
|
210
|
+
</dd>
|
|
211
|
+
</dl>
|
|
212
|
+
|
|
213
|
+
<dl>
|
|
214
|
+
<dd>
|
|
215
|
+
|
|
196
216
|
**email:** `String` — Email address
|
|
197
217
|
|
|
198
218
|
</dd>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vitable-connect
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.
|
|
4
|
+
version: 8.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- VitableConnect
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: The VitableConnect Ruby library provides convenient access to the VitableConnect
|
|
14
14
|
API from Ruby.
|