vitable-connect 8.3.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62add383932a5d2422daa451705e8bd36f294402f597b264b0ce8ea143a7c990
4
- data.tar.gz: a63f174d04c07688629d34082a7cc2be113824815296dbbf4d25c9ae78a05495
3
+ metadata.gz: 3f5a8c1dc9f7fb0501a5eb2428a0d5ea69ee98b46c9b20c7e5fc73b0fd48c619
4
+ data.tar.gz: 89e9f440f59b73ffd0a1dd6bf33088ae6ba66876c421507934b576bc16092f60
5
5
  SHA512:
6
- metadata.gz: cdba70e1928bb0e962ecbacd9ae4487c77e9d9eb3ad9f6e2e0ec003f97aa9aefeb56523f09fc41b98897a18db240f705861554adc8b92470b6e883a302869d6b
7
- data.tar.gz: 6e68c7f885c11ea98035ab403c24ff55b501f2d9be355c95a4934cc9be6e3c6758eb35804b75538b52371222d3799ba164d68d13ebd7fec68c5b031f08b02502
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": "be3da0bdd9d107e73cd97de3338d2abc4967a92a",
10
+ "originGitCommit": "61d40f260d63c4439b53339aa147f819b9e9572a",
11
11
  "originGitCommitIsDirty": false,
12
12
  "invokedBy": "ci",
13
13
  "requestedVersion": "AUTO",
14
14
  "ciProvider": "gitlab",
15
- "sdkVersion": "8.3.0"
15
+ "sdkVersion": "8.4.0"
16
16
  }
data/changelog.md CHANGED
@@ -1,3 +1,25 @@
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
+
8
+ ## 8.3.1 - 2026-11-06
9
+ * chore: document 409 conflict behavior for employee update endpoint
10
+ * Expand the inline documentation for the `update` method on the
11
+ * employees client to describe the 409 `employer_has_hris_connection`
12
+ * error response. The new doc text clarifies exactly when the conflict
13
+ * is raised (changes to `employee_class`, `compensation_type`, or
14
+ * `start_date` for employers with active, pending, or inactive HRIS
15
+ * connections) and notes that paused connections do not block, and that
16
+ * re-sending current values with a new `effective_date` is permitted.
17
+ * Key changes:
18
+ * Extended the YARD comment on `EmployeesClient#update` to document the 409 conflict response and its conditions
19
+ * Clarified that paused HRIS connections do not trigger the conflict
20
+ * Noted the allowed workaround of re-sending current values with a new effective_date
21
+ * 🌿 Generated with Fern
22
+
1
23
  ## 8.3.0 - 2026-11-05
2
24
  ### Added
3
25
  * **`VitableConnect::Types::MemberEnrollment#requires_external_plan`** — new non-nullable boolean field indicating whether the enrollment requires an external plan.
@@ -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.3.0",
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
@@ -52,7 +57,19 @@ module VitableConnect
52
57
 
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
- # applies to employee_class and compensation_type when those fields are included in the request.
60
+ # applies to employee_class and compensation_type when those fields are included in the request. Returns 409
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`).
56
73
  #
57
74
  # @param request_options [Hash]
58
75
  # @param params [VitableConnect::Employees::Types::PatchedUpdateEmployeeRequest]
@@ -62,6 +79,7 @@ module VitableConnect
62
79
  # @option request_options [Hash{String => Object}] :additional_body_parameters
63
80
  # @option request_options [Integer] :timeout_in_seconds
64
81
  # @option params [VitableConnect::Types::EmployeeID] :employee_id
82
+ # @option params [String, nil] :vitable_organization
65
83
  #
66
84
  # @example
67
85
  # client.employees.update(
@@ -76,13 +94,17 @@ module VitableConnect
76
94
  def update(request_options: {}, **params)
77
95
  params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
78
96
  request_data = VitableConnect::Employees::Types::PatchedUpdateEmployeeRequest.new(params).to_h
79
- non_body_param_names = %w[employee_id]
97
+ non_body_param_names = %w[employee_id X-Vitable-Organization]
80
98
  body = request_data.except(*non_body_param_names)
81
99
 
100
+ headers = {}
101
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
102
+
82
103
  request = VitableConnect::Internal::JSON::Request.new(
83
104
  base_url: request_options[:base_url],
84
105
  method: "PATCH",
85
106
  path: "v1/employees/#{URI.encode_uri_component(params[:employee_id].to_s)}",
107
+ headers: headers,
86
108
  body: body,
87
109
  request_options: request_options
88
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VitableConnect
4
- VERSION = "8.3.0"
4
+ VERSION = "8.4.0"
5
5
  end
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.
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.3.0
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-05 00:00:00.000000000 Z
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.