vitable-connect 2.0.0 → 2.1.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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +2 -2
  3. data/changelog.md +7 -0
  4. data/lib/VitableConnect/client.rb +1 -1
  5. data/lib/VitableConnect/employers/client.rb +96 -6
  6. data/lib/VitableConnect/employers/types/create_employer_request.rb +2 -0
  7. data/lib/VitableConnect/employers/types/ensure_payroll_integration_email_employers_request.rb +2 -0
  8. data/lib/VitableConnect/employers/types/get_benefit_plan_year_employers_request.rb +2 -0
  9. data/lib/VitableConnect/employers/types/get_employers_request.rb +2 -0
  10. data/lib/VitableConnect/employers/types/get_hris_employers_request.rb +2 -0
  11. data/lib/VitableConnect/employers/types/get_invoice_pdf_employers_request.rb +2 -0
  12. data/lib/VitableConnect/employers/types/get_payroll_access_setup_employers_request.rb +2 -0
  13. data/lib/VitableConnect/employers/types/list_benefit_plan_year_enrollments_employers_request.rb +2 -0
  14. data/lib/VitableConnect/employers/types/list_benefit_plan_years_employers_request.rb +2 -0
  15. data/lib/VitableConnect/employers/types/list_employees_employers_request.rb +2 -0
  16. data/lib/VitableConnect/employers/types/list_employers_request.rb +2 -0
  17. data/lib/VitableConnect/employers/types/list_hris_providers_employers_request.rb +11 -0
  18. data/lib/VitableConnect/employers/types/list_invoices_employers_request.rb +2 -0
  19. data/lib/VitableConnect/employers/types/list_payroll_deduction_statements_employers_request.rb +2 -0
  20. data/lib/VitableConnect/employers/types/submit_payroll_access_setup_request.rb +2 -0
  21. data/lib/VitableConnect/employers/types/update_employer_request.rb +2 -0
  22. data/lib/VitableConnect/employers/types/update_employer_settings_request.rb +2 -0
  23. data/lib/VitableConnect/enrollments/client.rb +17 -2
  24. data/lib/VitableConnect/enrollments/types/get_enrollments_request.rb +2 -0
  25. data/lib/VitableConnect/enrollments/types/reissue_enrollment_request.rb +2 -0
  26. data/lib/VitableConnect/enrollments/types/terminate_enrollment_request.rb +2 -0
  27. data/lib/VitableConnect/members/client.rb +40 -0
  28. data/lib/VitableConnect/members/types/get_household_members_request.rb +2 -0
  29. data/lib/VitableConnect/members/types/get_members_request.rb +2 -0
  30. data/lib/VitableConnect/members/types/list_dependents_members_request.rb +2 -0
  31. data/lib/VitableConnect/members/types/list_employments_members_request.rb +2 -0
  32. data/lib/VitableConnect/members/types/list_enrollments_members_request.rb +2 -0
  33. data/lib/VitableConnect/members/types/list_id_cards_members_request.rb +2 -0
  34. data/lib/VitableConnect/members/types/list_members_request.rb +2 -0
  35. data/lib/VitableConnect/members/types/list_qualifying_life_events_members_request.rb +2 -0
  36. data/lib/VitableConnect/organizations/client.rb +4 -2
  37. data/lib/VitableConnect/types/x_vitable_organization.rb +23 -0
  38. data/lib/VitableConnect/version.rb +1 -1
  39. data/lib/VitableConnect.rb +2 -0
  40. data/reference.md +225 -1
  41. metadata +3 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ab6143e783bb0a0bda3585adf6737b8442990769b3425daccb49bf752f32467
4
- data.tar.gz: d37d8b01dc93eaa35b4a33ca403a04eeaa23cabefad2f7290cf7e2a06d61a5f6
3
+ metadata.gz: 67cc90860044f147b33727cb875908908dfdc1c55207374234a02aabf717b510
4
+ data.tar.gz: f3ce52bbf2f6e09b00fbe999425d96d628e9106f6e829b85cf83d1fba26701ff
5
5
  SHA512:
6
- metadata.gz: 7ce4703e8a3032a6dfd5553b96b52d2eef2943cc2e53d4220227ca4d5ea0371cf6371548665f5d5b3e98c35386e316299018ec3da9fcf67f6f06e2356ecec612
7
- data.tar.gz: dcefe388db65fa4e23bcf712060443785444acff67bb9db4e55b8a0e2ebf28c1b7e5c1170c69c4420c354ec0ca714f775bee36f9e198123b045589d465ac5257
6
+ metadata.gz: 6bd5c5f86c189338678c010c3d20f55ed29bea785822dbe26b3dd83be1e1ce0eb39a2c4e1cbeb07e95ca43709a5f5411e14ccca03a2e2160b25ad33d8802e714
7
+ data.tar.gz: 3a182911a77829803f417c845bbcc67c4c08dedf0cbbd21807f6fd25c4bb83f92604131532a6958d1d2b26e1a0d9ba74f47714e3463f02673b217da2e5323818
data/.fern/metadata.json CHANGED
@@ -7,10 +7,10 @@
7
7
  "offsetSemantics": "page-index",
8
8
  "respectAuthSchemeNames": true
9
9
  },
10
- "originGitCommit": "807d06d32ea058bd87c8a3e6d61c8720c8ab1ca3",
10
+ "originGitCommit": "bef03772691d90ef2bd02e356723d4d40733ec35",
11
11
  "originGitCommitIsDirty": false,
12
12
  "invokedBy": "ci",
13
13
  "requestedVersion": "AUTO",
14
14
  "ciProvider": "github",
15
- "sdkVersion": "2.0.0"
15
+ "sdkVersion": "2.1.0"
16
16
  }
data/changelog.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 2.1.0 - 2026-09-08
2
+ ### Added
3
+ * **`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.
4
+ * **`VitableConnect::Types::XVitableOrganization`** — new type for serializing and deserializing the `X-Vitable-Organization` header value.
5
+ * **`VitableConnect::Employers::Types::ListHrisProvidersEmployersRequest`** — new request type for the `list_hris_providers` endpoint, supporting the `vitable_organization` header field.
6
+ * **`vitable_organization`** field added to enrollment request types `GetEnrollmentsRequest`, `ReissueEnrollmentRequest`, and `TerminateEnrollmentRequest`, mapping to the `X-Vitable-Organization` header.
7
+
1
8
  ## 2.0.0 - 2026-09-08
2
9
  ### Breaking Changes
3
10
  * **`VitableConnect::Types::Operation`** has been renamed to **`VitableConnect::Types::GroupMemberSyncFailureOperation`**. Update any references to `Operation` (e.g. constant lookups or `is_a?` checks) to use `GroupMemberSyncFailureOperation` instead.
@@ -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.0.0",
14
+ "User-Agent" => "vitable-connect/2.1.0",
15
15
  "X-Fern-Language" => "Ruby",
16
16
  Authorization: "Bearer #{api_key}"
17
17
  },
@@ -32,6 +32,7 @@ module VitableConnect
32
32
  # @option params [Integer, nil] :limit
33
33
  # @option params [Integer, nil] :page
34
34
  # @option params [String, nil] :search
35
+ # @option params [String, nil] :vitable_organization
35
36
  #
36
37
  # @example
37
38
  # client.employers.list(
@@ -52,6 +53,9 @@ module VitableConnect
52
53
  query_params["page"] = params[:page] if params.key?(:page)
53
54
  query_params["search"] = params[:search] if params.key?(:search)
54
55
 
56
+ headers = {}
57
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
58
+
55
59
  VitableConnect::Internal::OffsetItemIterator.new(
56
60
  initial_page: query_params["page"],
57
61
  item_field: :data,
@@ -63,6 +67,7 @@ module VitableConnect
63
67
  base_url: request_options[:base_url],
64
68
  method: "GET",
65
69
  path: "v1/employers",
70
+ headers: headers,
66
71
  query: query_params,
67
72
  request_options: request_options
68
73
  )
@@ -92,6 +97,7 @@ module VitableConnect
92
97
  # @option request_options [Hash{String => Object}] :additional_query_parameters
93
98
  # @option request_options [Hash{String => Object}] :additional_body_parameters
94
99
  # @option request_options [Integer] :timeout_in_seconds
100
+ # @option params [String, nil] :vitable_organization
95
101
  #
96
102
  # @example
97
103
  # client.employers.create(
@@ -113,11 +119,19 @@ module VitableConnect
113
119
  # @return [VitableConnect::Types::EmployerResponse]
114
120
  def create(request_options: {}, **params)
115
121
  params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
122
+ request_data = VitableConnect::Employers::Types::CreateEmployerRequest.new(params).to_h
123
+ non_body_param_names = %w[X-Vitable-Organization]
124
+ body = request_data.except(*non_body_param_names)
125
+
126
+ headers = {}
127
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
128
+
116
129
  request = VitableConnect::Internal::JSON::Request.new(
117
130
  base_url: request_options[:base_url],
118
131
  method: "POST",
119
132
  path: "v1/employers",
120
- body: VitableConnect::Employers::Types::CreateEmployerRequest.new(params).to_h,
133
+ headers: headers,
134
+ body: body,
121
135
  request_options: request_options
122
136
  )
123
137
  begin
@@ -145,6 +159,7 @@ module VitableConnect
145
159
  # @option request_options [Hash{String => Object}] :additional_body_parameters
146
160
  # @option request_options [Integer] :timeout_in_seconds
147
161
  # @option params [VitableConnect::Types::EmployerID] :employer_id
162
+ # @option params [String, nil] :vitable_organization
148
163
  #
149
164
  # @example
150
165
  # client.employers.get(employer_id: "empr_abc123def456")
@@ -152,10 +167,14 @@ module VitableConnect
152
167
  # @return [VitableConnect::Types::EmployerResponse]
153
168
  def get(request_options: {}, **params)
154
169
  params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
170
+ headers = {}
171
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
172
+
155
173
  request = VitableConnect::Internal::JSON::Request.new(
156
174
  base_url: request_options[:base_url],
157
175
  method: "GET",
158
176
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}",
177
+ headers: headers,
159
178
  request_options: request_options
160
179
  )
161
180
  begin
@@ -183,6 +202,7 @@ module VitableConnect
183
202
  # @option request_options [Hash{String => Object}] :additional_body_parameters
184
203
  # @option request_options [Integer] :timeout_in_seconds
185
204
  # @option params [VitableConnect::Types::EmployerID] :employer_id
205
+ # @option params [String, nil] :vitable_organization
186
206
  #
187
207
  # @example
188
208
  # client.employers.update(employer_id: "empr_abc123def456")
@@ -191,13 +211,17 @@ module VitableConnect
191
211
  def update(request_options: {}, **params)
192
212
  params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
193
213
  request_data = VitableConnect::Employers::Types::UpdateEmployerRequest.new(params).to_h
194
- non_body_param_names = %w[employer_id]
214
+ non_body_param_names = %w[employer_id X-Vitable-Organization]
195
215
  body = request_data.except(*non_body_param_names)
196
216
 
217
+ headers = {}
218
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
219
+
197
220
  request = VitableConnect::Internal::JSON::Request.new(
198
221
  base_url: request_options[:base_url],
199
222
  method: "PUT",
200
223
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}",
224
+ headers: headers,
201
225
  body: body,
202
226
  request_options: request_options
203
227
  )
@@ -227,6 +251,7 @@ module VitableConnect
227
251
  # @option request_options [Hash{String => Object}] :additional_body_parameters
228
252
  # @option request_options [Integer] :timeout_in_seconds
229
253
  # @option params [VitableConnect::Types::EmployerID] :employer_id
254
+ # @option params [String, nil] :vitable_organization
230
255
  #
231
256
  # @example
232
257
  # client.employers.list_benefit_plan_years(employer_id: "empr_abc123def456")
@@ -234,10 +259,14 @@ module VitableConnect
234
259
  # @return [VitableConnect::Types::EmployerBenefitPlanYearsListResponse]
235
260
  def list_benefit_plan_years(request_options: {}, **params)
236
261
  params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
262
+ headers = {}
263
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
264
+
237
265
  request = VitableConnect::Internal::JSON::Request.new(
238
266
  base_url: request_options[:base_url],
239
267
  method: "GET",
240
268
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}/benefit-plan-years",
269
+ headers: headers,
241
270
  request_options: request_options
242
271
  )
243
272
  begin
@@ -267,6 +296,7 @@ module VitableConnect
267
296
  # @option request_options [Integer] :timeout_in_seconds
268
297
  # @option params [VitableConnect::Types::EmployerID] :employer_id
269
298
  # @option params [VitableConnect::Types::BenefitPlanYearID] :benefit_plan_year_id
299
+ # @option params [String, nil] :vitable_organization
270
300
  #
271
301
  # @example
272
302
  # client.employers.get_benefit_plan_year(
@@ -277,10 +307,14 @@ module VitableConnect
277
307
  # @return [VitableConnect::Types::EmployerBenefitPlanYearResponse]
278
308
  def get_benefit_plan_year(request_options: {}, **params)
279
309
  params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
310
+ headers = {}
311
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
312
+
280
313
  request = VitableConnect::Internal::JSON::Request.new(
281
314
  base_url: request_options[:base_url],
282
315
  method: "GET",
283
316
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}/benefit-plan-years/#{URI.encode_uri_component(params[:benefit_plan_year_id].to_s)}",
317
+ headers: headers,
284
318
  request_options: request_options
285
319
  )
286
320
  begin
@@ -315,6 +349,7 @@ module VitableConnect
315
349
  # @option params [Integer, nil] :limit
316
350
  # @option params [Integer, nil] :page
317
351
  # @option params [String, nil] :search
352
+ # @option params [String, nil] :vitable_organization
318
353
  #
319
354
  # @example
320
355
  # client.employers.list_benefit_plan_year_enrollments(
@@ -333,6 +368,9 @@ module VitableConnect
333
368
  query_params["page"] = params[:page] if params.key?(:page)
334
369
  query_params["search"] = params[:search] if params.key?(:search)
335
370
 
371
+ headers = {}
372
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
373
+
336
374
  VitableConnect::Internal::OffsetItemIterator.new(
337
375
  initial_page: query_params["page"],
338
376
  item_field: :data,
@@ -344,6 +382,7 @@ module VitableConnect
344
382
  base_url: request_options[:base_url],
345
383
  method: "GET",
346
384
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}/benefit-plan-years/#{URI.encode_uri_component(params[:benefit_plan_year_id].to_s)}/enrollments",
385
+ headers: headers,
347
386
  query: query_params,
348
387
  request_options: request_options
349
388
  )
@@ -453,6 +492,7 @@ module VitableConnect
453
492
  # @option params [Integer, nil] :limit
454
493
  # @option params [Integer, nil] :page
455
494
  # @option params [String, nil] :search
495
+ # @option params [String, nil] :vitable_organization
456
496
  #
457
497
  # @example
458
498
  # client.employers.list_employees(
@@ -471,6 +511,9 @@ module VitableConnect
471
511
  query_params["page"] = params[:page] if params.key?(:page)
472
512
  query_params["search"] = params[:search] if params.key?(:search)
473
513
 
514
+ headers = {}
515
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
516
+
474
517
  VitableConnect::Internal::OffsetItemIterator.new(
475
518
  initial_page: query_params["page"],
476
519
  item_field: :data,
@@ -482,6 +525,7 @@ module VitableConnect
482
525
  base_url: request_options[:base_url],
483
526
  method: "GET",
484
527
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}/employees",
528
+ headers: headers,
485
529
  query: query_params,
486
530
  request_options: request_options
487
531
  )
@@ -513,6 +557,7 @@ module VitableConnect
513
557
  # @option request_options [Hash{String => Object}] :additional_body_parameters
514
558
  # @option request_options [Integer] :timeout_in_seconds
515
559
  # @option params [VitableConnect::Types::EmployerID] :employer_id
560
+ # @option params [String, nil] :vitable_organization
516
561
  #
517
562
  # @example
518
563
  # client.employers.get_hris(employer_id: "empr_abc123def456")
@@ -520,10 +565,14 @@ module VitableConnect
520
565
  # @return [VitableConnect::Types::EmployerHrisResponse]
521
566
  def get_hris(request_options: {}, **params)
522
567
  params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
568
+ headers = {}
569
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
570
+
523
571
  request = VitableConnect::Internal::JSON::Request.new(
524
572
  base_url: request_options[:base_url],
525
573
  method: "GET",
526
574
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}/hris",
575
+ headers: headers,
527
576
  request_options: request_options
528
577
  )
529
578
  begin
@@ -554,6 +603,7 @@ module VitableConnect
554
603
  # @option params [VitableConnect::Types::EmployerID] :employer_id
555
604
  # @option params [Integer, nil] :limit
556
605
  # @option params [String, nil] :offset
606
+ # @option params [String, nil] :vitable_organization
557
607
  #
558
608
  # @example
559
609
  # client.employers.list_invoices(
@@ -568,10 +618,14 @@ module VitableConnect
568
618
  query_params["limit"] = params[:limit] if params.key?(:limit)
569
619
  query_params["offset"] = params[:offset] if params.key?(:offset)
570
620
 
621
+ headers = {}
622
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
623
+
571
624
  request = VitableConnect::Internal::JSON::Request.new(
572
625
  base_url: request_options[:base_url],
573
626
  method: "GET",
574
627
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}/invoices",
628
+ headers: headers,
575
629
  query: query_params,
576
630
  request_options: request_options
577
631
  )
@@ -602,6 +656,7 @@ module VitableConnect
602
656
  # @option request_options [Integer] :timeout_in_seconds
603
657
  # @option params [VitableConnect::Types::EmployerID] :employer_id
604
658
  # @option params [VitableConnect::Types::InvoiceID] :invoice_id
659
+ # @option params [String, nil] :vitable_organization
605
660
  #
606
661
  # @example
607
662
  # client.employers.get_invoice_pdf(
@@ -612,10 +667,14 @@ module VitableConnect
612
667
  # @return [VitableConnect::Types::EmployerInvoicePdfResponse]
613
668
  def get_invoice_pdf(request_options: {}, **params)
614
669
  params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
670
+ headers = {}
671
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
672
+
615
673
  request = VitableConnect::Internal::JSON::Request.new(
616
674
  base_url: request_options[:base_url],
617
675
  method: "GET",
618
676
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}/invoices/#{URI.encode_uri_component(params[:invoice_id].to_s)}/pdf",
677
+ headers: headers,
619
678
  request_options: request_options
620
679
  )
621
680
  begin
@@ -642,6 +701,7 @@ module VitableConnect
642
701
  # @option request_options [Hash{String => Object}] :additional_body_parameters
643
702
  # @option request_options [Integer] :timeout_in_seconds
644
703
  # @option params [VitableConnect::Types::EmployerID] :employer_id
704
+ # @option params [String, nil] :vitable_organization
645
705
  #
646
706
  # @example
647
707
  # client.employers.get_payroll_access_setup(employer_id: "empr_abc123def456")
@@ -649,10 +709,14 @@ module VitableConnect
649
709
  # @return [VitableConnect::Types::PayrollAccessSetupStatusResponse]
650
710
  def get_payroll_access_setup(request_options: {}, **params)
651
711
  params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
712
+ headers = {}
713
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
714
+
652
715
  request = VitableConnect::Internal::JSON::Request.new(
653
716
  base_url: request_options[:base_url],
654
717
  method: "GET",
655
718
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}/payroll-access-setup",
719
+ headers: headers,
656
720
  request_options: request_options
657
721
  )
658
722
  begin
@@ -679,6 +743,7 @@ module VitableConnect
679
743
  # @option request_options [Hash{String => Object}] :additional_body_parameters
680
744
  # @option request_options [Integer] :timeout_in_seconds
681
745
  # @option params [VitableConnect::Types::EmployerID] :employer_id
746
+ # @option params [String, nil] :vitable_organization
682
747
  #
683
748
  # @example
684
749
  # client.employers.submit_payroll_access_setup(
@@ -696,13 +761,17 @@ module VitableConnect
696
761
  def submit_payroll_access_setup(request_options: {}, **params)
697
762
  params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
698
763
  request_data = VitableConnect::Employers::Types::SubmitPayrollAccessSetupRequest.new(params).to_h
699
- non_body_param_names = %w[employer_id]
764
+ non_body_param_names = %w[employer_id X-Vitable-Organization]
700
765
  body = request_data.except(*non_body_param_names)
701
766
 
767
+ headers = {}
768
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
769
+
702
770
  request = VitableConnect::Internal::JSON::Request.new(
703
771
  base_url: request_options[:base_url],
704
772
  method: "PUT",
705
773
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}/payroll-access-setup",
774
+ headers: headers,
706
775
  body: body,
707
776
  request_options: request_options
708
777
  )
@@ -735,6 +804,7 @@ module VitableConnect
735
804
  # @option params [VitableConnect::Types::EmployerID] :employer_id
736
805
  # @option params [Integer, nil] :limit
737
806
  # @option params [Integer, nil] :page
807
+ # @option params [String, nil] :vitable_organization
738
808
  #
739
809
  # @example
740
810
  # client.employers.list_payroll_deduction_statements(
@@ -750,6 +820,9 @@ module VitableConnect
750
820
  query_params["limit"] = params[:limit] if params.key?(:limit)
751
821
  query_params["page"] = params[:page] if params.key?(:page)
752
822
 
823
+ headers = {}
824
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
825
+
753
826
  VitableConnect::Internal::OffsetItemIterator.new(
754
827
  initial_page: query_params["page"],
755
828
  item_field: :data,
@@ -761,6 +834,7 @@ module VitableConnect
761
834
  base_url: request_options[:base_url],
762
835
  method: "GET",
763
836
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}/payroll-deduction-statements",
837
+ headers: headers,
764
838
  query: query_params,
765
839
  request_options: request_options
766
840
  )
@@ -790,6 +864,7 @@ module VitableConnect
790
864
  # @option request_options [Hash{String => Object}] :additional_body_parameters
791
865
  # @option request_options [Integer] :timeout_in_seconds
792
866
  # @option params [VitableConnect::Types::EmployerID] :employer_id
867
+ # @option params [String, nil] :vitable_organization
793
868
  #
794
869
  # @example
795
870
  # client.employers.ensure_payroll_integration_email(employer_id: "empr_abc123def456")
@@ -797,10 +872,14 @@ module VitableConnect
797
872
  # @return [VitableConnect::Types::PayrollIntegrationEmailResponse]
798
873
  def ensure_payroll_integration_email(request_options: {}, **params)
799
874
  params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
875
+ headers = {}
876
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
877
+
800
878
  request = VitableConnect::Internal::JSON::Request.new(
801
879
  base_url: request_options[:base_url],
802
880
  method: "PUT",
803
881
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}/payroll-integration-email",
882
+ headers: headers,
804
883
  request_options: request_options
805
884
  )
806
885
  begin
@@ -828,6 +907,7 @@ module VitableConnect
828
907
  # @option request_options [Hash{String => Object}] :additional_body_parameters
829
908
  # @option request_options [Integer] :timeout_in_seconds
830
909
  # @option params [VitableConnect::Types::EmployerID] :employer_id
910
+ # @option params [String, nil] :vitable_organization
831
911
  #
832
912
  # @example
833
913
  # client.employers.update_settings(
@@ -839,13 +919,17 @@ module VitableConnect
839
919
  def update_settings(request_options: {}, **params)
840
920
  params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
841
921
  request_data = VitableConnect::Employers::Types::UpdateEmployerSettingsRequest.new(params).to_h
842
- non_body_param_names = %w[employer_id]
922
+ non_body_param_names = %w[employer_id X-Vitable-Organization]
843
923
  body = request_data.except(*non_body_param_names)
844
924
 
925
+ headers = {}
926
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
927
+
845
928
  request = VitableConnect::Internal::JSON::Request.new(
846
929
  base_url: request_options[:base_url],
847
930
  method: "PUT",
848
931
  path: "v1/employers/#{URI.encode_uri_component(params[:employer_id].to_s)}/settings",
932
+ headers: headers,
849
933
  body: body,
850
934
  request_options: request_options
851
935
  )
@@ -868,22 +952,28 @@ module VitableConnect
868
952
  # `provider_label`. The stored providers are free text, so they cannot be enumerated in advance.
869
953
  #
870
954
  # @param request_options [Hash]
871
- # @param _params [Hash]
955
+ # @param params [Hash]
872
956
  # @option request_options [String] :base_url
873
957
  # @option request_options [Hash{String => Object}] :additional_headers
874
958
  # @option request_options [Hash{String => Object}] :additional_query_parameters
875
959
  # @option request_options [Hash{String => Object}] :additional_body_parameters
876
960
  # @option request_options [Integer] :timeout_in_seconds
961
+ # @option params [String, nil] :vitable_organization
877
962
  #
878
963
  # @example
879
964
  # client.employers.list_hris_providers
880
965
  #
881
966
  # @return [VitableConnect::Types::OrganizationHrisProvidersResponse]
882
- def list_hris_providers(request_options: {}, **_params)
967
+ def list_hris_providers(request_options: {}, **params)
968
+ params = VitableConnect::Internal::Types::Utils.normalize_keys(params)
969
+ headers = {}
970
+ headers["X-Vitable-Organization"] = params[:vitable_organization] if params[:vitable_organization]
971
+
883
972
  request = VitableConnect::Internal::JSON::Request.new(
884
973
  base_url: request_options[:base_url],
885
974
  method: "GET",
886
975
  path: "v1/employers/hris-providers",
976
+ headers: headers,
887
977
  request_options: request_options
888
978
  )
889
979
  begin
@@ -4,6 +4,8 @@ module VitableConnect
4
4
  module Employers
5
5
  module Types
6
6
  class CreateEmployerRequest < Internal::Types::Model
7
+ field :vitable_organization, -> { String }, optional: true, nullable: false, api_name: "X-Vitable-Organization"
8
+
7
9
  field :name, -> { String }, optional: false, nullable: false
8
10
 
9
11
  field :legal_name, -> { String }, optional: false, nullable: false
@@ -5,6 +5,8 @@ module VitableConnect
5
5
  module Types
6
6
  class EnsurePayrollIntegrationEmailEmployersRequest < Internal::Types::Model
7
7
  field :employer_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
@@ -7,6 +7,8 @@ module VitableConnect
7
7
  field :employer_id, -> { String }, optional: false, nullable: false
8
8
 
9
9
  field :benefit_plan_year_id, -> { String }, optional: false, nullable: false
10
+
11
+ field :vitable_organization, -> { String }, optional: true, nullable: false, api_name: "X-Vitable-Organization"
10
12
  end
11
13
  end
12
14
  end
@@ -5,6 +5,8 @@ module VitableConnect
5
5
  module Types
6
6
  class GetEmployersRequest < Internal::Types::Model
7
7
  field :employer_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
@@ -5,6 +5,8 @@ module VitableConnect
5
5
  module Types
6
6
  class GetHrisEmployersRequest < Internal::Types::Model
7
7
  field :employer_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
@@ -7,6 +7,8 @@ module VitableConnect
7
7
  field :employer_id, -> { String }, optional: false, nullable: false
8
8
 
9
9
  field :invoice_id, -> { String }, optional: false, nullable: false
10
+
11
+ field :vitable_organization, -> { String }, optional: true, nullable: false, api_name: "X-Vitable-Organization"
10
12
  end
11
13
  end
12
14
  end
@@ -5,6 +5,8 @@ module VitableConnect
5
5
  module Types
6
6
  class GetPayrollAccessSetupEmployersRequest < Internal::Types::Model
7
7
  field :employer_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
@@ -15,6 +15,8 @@ module VitableConnect
15
15
  field :page, -> { Integer }, optional: true, nullable: false
16
16
 
17
17
  field :search, -> { String }, optional: true, nullable: false
18
+
19
+ field :vitable_organization, -> { String }, optional: true, nullable: false, api_name: "X-Vitable-Organization"
18
20
  end
19
21
  end
20
22
  end
@@ -5,6 +5,8 @@ module VitableConnect
5
5
  module Types
6
6
  class ListBenefitPlanYearsEmployersRequest < Internal::Types::Model
7
7
  field :employer_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
@@ -13,6 +13,8 @@ module VitableConnect
13
13
  field :page, -> { Integer }, optional: true, nullable: false
14
14
 
15
15
  field :search, -> { String }, optional: true, nullable: false
16
+
17
+ field :vitable_organization, -> { String }, optional: true, nullable: false, api_name: "X-Vitable-Organization"
16
18
  end
17
19
  end
18
20
  end
@@ -19,6 +19,8 @@ module VitableConnect
19
19
  field :page, -> { Integer }, optional: true, nullable: false
20
20
 
21
21
  field :search, -> { String }, optional: true, nullable: false
22
+
23
+ field :vitable_organization, -> { String }, optional: true, nullable: false, api_name: "X-Vitable-Organization"
22
24
  end
23
25
  end
24
26
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module VitableConnect
4
+ module Employers
5
+ module Types
6
+ class ListHrisProvidersEmployersRequest < Internal::Types::Model
7
+ field :vitable_organization, -> { String }, optional: true, nullable: false, api_name: "X-Vitable-Organization"
8
+ end
9
+ end
10
+ end
11
+ end
@@ -9,6 +9,8 @@ module VitableConnect
9
9
  field :limit, -> { Integer }, optional: true, nullable: false
10
10
 
11
11
  field :offset, -> { String }, optional: true, nullable: false
12
+
13
+ field :vitable_organization, -> { String }, optional: true, nullable: false, api_name: "X-Vitable-Organization"
12
14
  end
13
15
  end
14
16
  end
@@ -9,6 +9,8 @@ module VitableConnect
9
9
  field :limit, -> { Integer }, optional: true, nullable: false
10
10
 
11
11
  field :page, -> { Integer }, optional: true, nullable: false
12
+
13
+ field :vitable_organization, -> { String }, optional: true, nullable: false, api_name: "X-Vitable-Organization"
12
14
  end
13
15
  end
14
16
  end
@@ -6,6 +6,8 @@ module VitableConnect
6
6
  class SubmitPayrollAccessSetupRequest < Internal::Types::Model
7
7
  field :employer_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 :employees_in_payroll_acknowledged, -> { Internal::Types::Boolean }, optional: false, nullable: false
10
12
 
11
13
  field :payroll_data_impacts_eligibility_acknowledged, -> { Internal::Types::Boolean }, optional: false, nullable: false
@@ -6,6 +6,8 @@ module VitableConnect
6
6
  class UpdateEmployerRequest < Internal::Types::Model
7
7
  field :employer_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 :name, -> { String }, optional: true, nullable: false
10
12
 
11
13
  field :legal_name, -> { String }, optional: true, nullable: false
@@ -6,6 +6,8 @@ module VitableConnect
6
6
  class UpdateEmployerSettingsRequest < Internal::Types::Model
7
7
  field :employer_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 :pay_frequency, -> { VitableConnect::Types::DeductionFrequency }, optional: false, nullable: false
10
12
  end
11
13
  end