vitable-connect 2.1.0 → 4.0.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: 67cc90860044f147b33727cb875908908dfdc1c55207374234a02aabf717b510
4
- data.tar.gz: f3ce52bbf2f6e09b00fbe999425d96d628e9106f6e829b85cf83d1fba26701ff
3
+ metadata.gz: bd641f8cbcc651041563f6c1fecc4aab6a27ab3909b001fa3b3eaa00ccd9871a
4
+ data.tar.gz: aca5cbedb59b94753becde48a42260f1c4a3086a6adea5850ebd0432584ff48f
5
5
  SHA512:
6
- metadata.gz: 6bd5c5f86c189338678c010c3d20f55ed29bea785822dbe26b3dd83be1e1ce0eb39a2c4e1cbeb07e95ca43709a5f5411e14ccca03a2e2160b25ad33d8802e714
7
- data.tar.gz: 3a182911a77829803f417c845bbcc67c4c08dedf0cbbd21807f6fd25c4bb83f92604131532a6958d1d2b26e1a0d9ba74f47714e3463f02673b217da2e5323818
6
+ metadata.gz: 1cec2e039c69e02007532b5089cce1be6ce7652ad5577fa010e81a6cea407a57640e24e56d7e0b1a221e0ff947e02b1be3d5ef0fe3333ca2319d98da51b473de
7
+ data.tar.gz: 7d23eb05aab210dc106668373219d2a5fc6d7261a246a268c1332dc53a7d6f6a2cab839d1e29e1d9a908dddbd539b5ae71141a3d8a2fefe162593c8a84fadc69
data/.fern/metadata.json CHANGED
@@ -7,10 +7,10 @@
7
7
  "offsetSemantics": "page-index",
8
8
  "respectAuthSchemeNames": true
9
9
  },
10
- "originGitCommit": "bef03772691d90ef2bd02e356723d4d40733ec35",
10
+ "originGitCommit": "12dcf229a31e934e995568332f46ee8b2da93c69",
11
11
  "originGitCommitIsDirty": false,
12
12
  "invokedBy": "ci",
13
13
  "requestedVersion": "AUTO",
14
- "ciProvider": "github",
15
- "sdkVersion": "2.1.0"
14
+ "ciProvider": "gitlab",
15
+ "sdkVersion": "4.0.0"
16
16
  }
data/changelog.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 4.0.0 - 2026-09-16
2
+ ### Breaking Changes
3
+ * **`VitableConnect::Organizations::Client#create`** has been removed. Any calls to `client.organizations.create(...)` will raise `NoMethodError`; remove or replace these call sites.
4
+ * **`VitableConnect::Organizations::Types::CreateOrganizationRequest`** has been removed. Replace any direct references to this class with your own request construction or remove them entirely.
5
+ * **`VitableConnect::Types::Organization`** has been removed. Any code that references this class (e.g. `is_a?` checks, constant lookups, or return-value handling) must be updated; use `VitableConnect::Types::OrganizationMembership` for organization data returned by the list endpoint.
6
+
7
+ ## 3.0.0 - 2026-09-11
8
+ ### Breaking Changes
9
+ * **`VitableConnect::Types::CreateOrganizationRequestType`** has been removed. Replace any references with `VitableConnect::Types::OrganizationType`, which carries the same enum values.
10
+ * **`VitableConnect::Types::OrganizationsListResponse#organizations`** now returns an array of `OrganizationMembership` instead of `Organization`. Update any code that accesses fields on these objects to use the new `OrganizationMembership` shape.
11
+ ### Added
12
+ * **`VitableConnect::Types::OrganizationMembership`** — new model returned in the organizations list, containing `id`, `name`, `type`, `idp_org_id`, `idp_provider`, `super_in`, and `role` fields so callers can see the authenticated user's role within each organization.
13
+ * **`VitableConnect::Types::OrganizationUserRole`** — new enum with values `ADMIN`, `OPERATIONS`, `SALES`, and `ENROLLMENT_AGENT`, used by `OrganizationMembership#role`.
14
+
1
15
  ## 2.1.0 - 2026-09-08
2
16
  ### Added
3
17
  * **`vitable_organization`** — optional parameter added to all employer, enrollment, and members client methods, sending the `X-Vitable-Organization` HTTP header to scope requests to a specific organization.
@@ -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/2.1.0",
14
+ "User-Agent" => "vitable-connect/4.0.0",
15
15
  "X-Fern-Language" => "Ruby",
16
16
  Authorization: "Bearer #{api_key}"
17
17
  },
@@ -10,8 +10,8 @@ module VitableConnect
10
10
  @client = client
11
11
  end
12
12
 
13
- # Lists the organizations the authenticated caller is an active member of (paginated). Returns an empty list when
14
- # the caller belongs to no organizations.
13
+ # Lists the organizations the authenticated caller is an active member of (paginated), each with the role the
14
+ # caller holds in it. Returns an empty list when the caller belongs to no organizations.
15
15
  #
16
16
  # @param request_options [Hash]
17
17
  # @param _params [Hash]
@@ -45,50 +45,6 @@ module VitableConnect
45
45
  raise error_class.new(response.body, code: code)
46
46
  end
47
47
  end
48
-
49
- # Onboards the authenticated user's partner Organization: creates the local Organization + the creator's admin
50
- # membership atomically, then mirrors it to WorkOS (creates the WorkOS org and binds the creator as admin). A user
51
- # may hold several organizations and selects which one a request acts as with the `X-Vitable-Organization` header.
52
- # The founder's email domain is claimed only when no other organization holds it, so a taken domain is left with
53
- # its owner rather than rejected.
54
- #
55
- # @param request_options [Hash]
56
- # @param params [VitableConnect::Organizations::Types::CreateOrganizationRequest]
57
- # @option request_options [String] :base_url
58
- # @option request_options [Hash{String => Object}] :additional_headers
59
- # @option request_options [Hash{String => Object}] :additional_query_parameters
60
- # @option request_options [Hash{String => Object}] :additional_body_parameters
61
- # @option request_options [Integer] :timeout_in_seconds
62
- #
63
- # @example
64
- # client.organizations.create(
65
- # name: "Acme Brokerage",
66
- # type: "BROKERAGE"
67
- # )
68
- #
69
- # @return [VitableConnect::Types::Organization]
70
- def create(request_options: {}, **params)
71
- params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
72
- request = VitableConnect::Internal::JSON::Request.new(
73
- base_url: request_options[:base_url],
74
- method: "POST",
75
- path: "v1/organizations",
76
- body: VitableConnect::Organizations::Types::CreateOrganizationRequest.new(params).to_h,
77
- request_options: request_options
78
- )
79
- begin
80
- response = @client.send(request)
81
- rescue Net::HTTPRequestTimeout
82
- raise VitableConnect::Errors::TimeoutError
83
- end
84
- code = response.code.to_i
85
- if code.between?(200, 299)
86
- VitableConnect::Types::Organization.load(response.body)
87
- else
88
- error_class = VitableConnect::Errors::ResponseError.subclass_for_code(code)
89
- raise error_class.new(response.body, code: code)
90
- end
91
- end
92
48
  end
93
49
  end
94
50
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module VitableConnect
4
4
  module Types
5
- class Organization < Internal::Types::Model
5
+ class OrganizationMembership < Internal::Types::Model
6
6
  field :id, -> { String }, optional: false, nullable: false
7
7
 
8
8
  field :name, -> { String }, optional: false, nullable: false
@@ -14,6 +14,8 @@ module VitableConnect
14
14
  field :idp_provider, -> { VitableConnect::Types::IdpProvider }, optional: false, nullable: true
15
15
 
16
16
  field :super_in, -> { Internal::Types::Boolean }, optional: false, nullable: false
17
+
18
+ field :role, -> { VitableConnect::Types::OrganizationUserRole }, optional: false, nullable: false
17
19
  end
18
20
  end
19
21
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module VitableConnect
4
+ module Types
5
+ module OrganizationUserRole
6
+ extend VitableConnect::Internal::Types::Enum
7
+
8
+ ADMIN = "ADMIN"
9
+ OPERATIONS = "OPERATIONS"
10
+ SALES = "SALES"
11
+ ENROLLMENT_AGENT = "ENROLLMENT_AGENT"
12
+ end
13
+ end
14
+ end
@@ -4,7 +4,7 @@ module VitableConnect
4
4
  module Types
5
5
  # Envelope for the caller's organization memberships (paginated).
6
6
  class OrganizationsListResponse < Internal::Types::Model
7
- field :organizations, -> { Internal::Types::Array[VitableConnect::Types::Organization] }, optional: false, nullable: false
7
+ field :organizations, -> { Internal::Types::Array[VitableConnect::Types::OrganizationMembership] }, optional: false, nullable: false
8
8
 
9
9
  field :total, -> { Integer }, optional: false, nullable: false
10
10
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VitableConnect
4
- VERSION = "2.1.0"
4
+ VERSION = "4.0.0"
5
5
  end
@@ -81,7 +81,6 @@ require_relative "VitableConnect/types/compensation_type"
81
81
  require_relative "VitableConnect/types/employee_class"
82
82
  require_relative "VitableConnect/types/census_sync_employee_request"
83
83
  require_relative "VitableConnect/types/classification_correction_source"
84
- require_relative "VitableConnect/types/create_organization_request_type"
85
84
  require_relative "VitableConnect/types/deduction_frequency"
86
85
  require_relative "VitableConnect/types/tax_classification"
87
86
  require_relative "VitableConnect/types/deduction_detail"
@@ -162,8 +161,6 @@ require_relative "VitableConnect/types/member_qualifying_life_event"
162
161
  require_relative "VitableConnect/types/member_qualifying_life_event_list_response"
163
162
  require_relative "VitableConnect/types/member_response"
164
163
  require_relative "VitableConnect/types/missing_employee_resolution"
165
- require_relative "VitableConnect/types/organization_type"
166
- require_relative "VitableConnect/types/organization"
167
164
  require_relative "VitableConnect/types/employer_benefit_lifecycle_stage"
168
165
  require_relative "VitableConnect/types/enrollment_rate_summary"
169
166
  require_relative "VitableConnect/types/employer_hris_status"
@@ -171,6 +168,9 @@ require_relative "VitableConnect/types/organization_employer"
171
168
  require_relative "VitableConnect/types/organization_employer_list_response"
172
169
  require_relative "VitableConnect/types/organization_hris_provider"
173
170
  require_relative "VitableConnect/types/organization_hris_providers_response"
171
+ require_relative "VitableConnect/types/organization_type"
172
+ require_relative "VitableConnect/types/organization_user_role"
173
+ require_relative "VitableConnect/types/organization_membership"
174
174
  require_relative "VitableConnect/types/organizations_list_response"
175
175
  require_relative "VitableConnect/types/payroll_access_setup_status"
176
176
  require_relative "VitableConnect/types/payroll_access_setup_status_response"
@@ -256,7 +256,6 @@ require_relative "VitableConnect/members/types/list_id_cards_members_request"
256
256
  require_relative "VitableConnect/members/types/list_qualifying_life_events_members_request"
257
257
  require_relative "VitableConnect/members/types/list_members_request"
258
258
  require_relative "VitableConnect/organizations/client"
259
- require_relative "VitableConnect/organizations/types/create_organization_request"
260
259
  require_relative "VitableConnect/plans/client"
261
260
  require_relative "VitableConnect/plans/types/list_plans_request"
262
261
  require_relative "VitableConnect/webhook_events/client"
data/reference.md CHANGED
@@ -3336,7 +3336,7 @@ client.members.list(
3336
3336
  <dl>
3337
3337
  <dd>
3338
3338
 
3339
- Lists the organizations the authenticated caller is an active member of (paginated). Returns an empty list when the caller belongs to no organizations.
3339
+ Lists the organizations the authenticated caller is an active member of (paginated), each with the role the caller holds in it. Returns an empty list when the caller belongs to no organizations.
3340
3340
  </dd>
3341
3341
  </dl>
3342
3342
  </dd>
@@ -3374,79 +3374,6 @@ client.organizations.list
3374
3374
  </dl>
3375
3375
 
3376
3376
 
3377
- </dd>
3378
- </dl>
3379
- </details>
3380
-
3381
- <details><summary><code>client.organizations.<a href="/lib/VitableConnect/organizations/client.rb">create</a>(request) -> VitableConnect::Types::Organization</code></summary>
3382
- <dl>
3383
- <dd>
3384
-
3385
- #### 📝 Description
3386
-
3387
- <dl>
3388
- <dd>
3389
-
3390
- <dl>
3391
- <dd>
3392
-
3393
- Onboards the authenticated user's partner Organization: creates the local Organization + the creator's admin membership atomically, then mirrors it to WorkOS (creates the WorkOS org and binds the creator as admin). A user may hold several organizations and selects which one a request acts as with the `X-Vitable-Organization` header. The founder's email domain is claimed only when no other organization holds it, so a taken domain is left with its owner rather than rejected.
3394
- </dd>
3395
- </dl>
3396
- </dd>
3397
- </dl>
3398
-
3399
- #### 🔌 Usage
3400
-
3401
- <dl>
3402
- <dd>
3403
-
3404
- <dl>
3405
- <dd>
3406
-
3407
- ```ruby
3408
- client.organizations.create(
3409
- name: "Acme Brokerage",
3410
- type: "BROKERAGE"
3411
- )
3412
- ```
3413
- </dd>
3414
- </dl>
3415
- </dd>
3416
- </dl>
3417
-
3418
- #### ⚙️ Parameters
3419
-
3420
- <dl>
3421
- <dd>
3422
-
3423
- <dl>
3424
- <dd>
3425
-
3426
- **name:** `String` — Legal or trading name of the organization.
3427
-
3428
- </dd>
3429
- </dl>
3430
-
3431
- <dl>
3432
- <dd>
3433
-
3434
- **type:** `VitableConnect::Types::CreateOrganizationRequestType` — Category of organization being onboarded.
3435
-
3436
- </dd>
3437
- </dl>
3438
-
3439
- <dl>
3440
- <dd>
3441
-
3442
- **request_options:** `VitableConnect::Organizations::RequestOptions`
3443
-
3444
- </dd>
3445
- </dl>
3446
- </dd>
3447
- </dl>
3448
-
3449
-
3450
3377
  </dd>
3451
3378
  </dl>
3452
3379
  </details>
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: 2.1.0
4
+ version: 4.0.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-09-08 00:00:00.000000000 Z
11
+ date: 2026-09-16 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.
@@ -109,7 +109,6 @@ files:
109
109
  - lib/VitableConnect/members/types/list_members_request.rb
110
110
  - lib/VitableConnect/members/types/list_qualifying_life_events_members_request.rb
111
111
  - lib/VitableConnect/organizations/client.rb
112
- - lib/VitableConnect/organizations/types/create_organization_request.rb
113
112
  - lib/VitableConnect/plans/client.rb
114
113
  - lib/VitableConnect/plans/types/list_plans_request.rb
115
114
  - lib/VitableConnect/types/access_method.rb
@@ -144,7 +143,6 @@ files:
144
143
  - lib/VitableConnect/types/contribution_strategy.rb
145
144
  - lib/VitableConnect/types/contribution_tier.rb
146
145
  - lib/VitableConnect/types/coverage_tier.rb
147
- - lib/VitableConnect/types/create_organization_request_type.rb
148
146
  - lib/VitableConnect/types/created_after.rb
149
147
  - lib/VitableConnect/types/created_before.rb
150
148
  - lib/VitableConnect/types/deduction_detail.rb
@@ -244,12 +242,13 @@ files:
244
242
  - lib/VitableConnect/types/missing_employee_resolution.rb
245
243
  - lib/VitableConnect/types/name_suffix.rb
246
244
  - lib/VitableConnect/types/offset.rb
247
- - lib/VitableConnect/types/organization.rb
248
245
  - lib/VitableConnect/types/organization_employer.rb
249
246
  - lib/VitableConnect/types/organization_employer_list_response.rb
250
247
  - lib/VitableConnect/types/organization_hris_provider.rb
251
248
  - lib/VitableConnect/types/organization_hris_providers_response.rb
249
+ - lib/VitableConnect/types/organization_membership.rb
252
250
  - lib/VitableConnect/types/organization_type.rb
251
+ - lib/VitableConnect/types/organization_user_role.rb
253
252
  - lib/VitableConnect/types/organizations_list_response.rb
254
253
  - lib/VitableConnect/types/page.rb
255
254
  - lib/VitableConnect/types/pagination.rb
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module VitableConnect
4
- module Organizations
5
- module Types
6
- class CreateOrganizationRequest < Internal::Types::Model
7
- field :name, -> { String }, optional: false, nullable: false
8
-
9
- field :type, -> { VitableConnect::Types::CreateOrganizationRequestType }, optional: true, nullable: false
10
- end
11
- end
12
- end
13
- end
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module VitableConnect
4
- module Types
5
- module CreateOrganizationRequestType
6
- extend VitableConnect::Internal::Types::Enum
7
-
8
- BROKERAGE = "BROKERAGE"
9
- TPA = "TPA"
10
- GENERAL_AGENT = "GENERAL_AGENT"
11
- CHANNEL_PARTNER = "CHANNEL_PARTNER"
12
- CONSULTING_FIRM = "CONSULTING_FIRM"
13
- API_PLATFORM = "API_PLATFORM"
14
- end
15
- end
16
- end