@@ -27,15 +27,38 @@ class TestIndividuals:
27
27
def test_method_enroll_many (self , client : Finch ) -> None :
28
28
individual = client .hris .benefits .individuals .enroll_many (
29
29
benefit_id = "benefit_id" ,
30
- individuals = [{}],
30
+ )
31
+ assert_matches_type (SyncSinglePage [EnrolledIndividual ], individual , path = ["response" ])
32
+
33
+ @parametrize
34
+ def test_method_enroll_many_with_all_params (self , client : Finch ) -> None :
35
+ individual = client .hris .benefits .individuals .enroll_many (
36
+ benefit_id = "benefit_id" ,
37
+ individuals = [
38
+ {
39
+ "configuration" : {
40
+ "annual_contribution_limit" : "individual" ,
41
+ "annual_maximum" : 500000 ,
42
+ "catch_up" : False ,
43
+ "company_contribution" : {
44
+ "amount" : 400 ,
45
+ "type" : "fixed" ,
46
+ },
47
+ "employee_deduction" : {
48
+ "amount" : 1000 ,
49
+ "type" : "fixed" ,
50
+ },
51
+ },
52
+ "individual_id" : "d02a6346-1f08-4312-a064-49ff3cafaa7a" ,
53
+ }
54
+ ],
31
55
)
32
56
assert_matches_type (SyncSinglePage [EnrolledIndividual ], individual , path = ["response" ])
33
57
34
58
@parametrize
35
59
def test_raw_response_enroll_many (self , client : Finch ) -> None :
36
60
response = client .hris .benefits .individuals .with_raw_response .enroll_many (
37
61
benefit_id = "benefit_id" ,
38
- individuals = [{}],
39
62
)
40
63
41
64
assert response .is_closed is True
@@ -47,7 +70,6 @@ def test_raw_response_enroll_many(self, client: Finch) -> None:
47
70
def test_streaming_response_enroll_many (self , client : Finch ) -> None :
48
71
with client .hris .benefits .individuals .with_streaming_response .enroll_many (
49
72
benefit_id = "benefit_id" ,
50
- individuals = [{}],
51
73
) as response :
52
74
assert not response .is_closed
53
75
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -62,7 +84,6 @@ def test_path_params_enroll_many(self, client: Finch) -> None:
62
84
with pytest .raises (ValueError , match = r"Expected a non-empty value for `benefit_id` but received ''" ):
63
85
client .hris .benefits .individuals .with_raw_response .enroll_many (
64
86
benefit_id = "" ,
65
- individuals = [{}],
66
87
)
67
88
68
89
@parametrize
@@ -203,15 +224,38 @@ class TestAsyncIndividuals:
203
224
async def test_method_enroll_many (self , async_client : AsyncFinch ) -> None :
204
225
individual = await async_client .hris .benefits .individuals .enroll_many (
205
226
benefit_id = "benefit_id" ,
206
- individuals = [{}],
227
+ )
228
+ assert_matches_type (AsyncSinglePage [EnrolledIndividual ], individual , path = ["response" ])
229
+
230
+ @parametrize
231
+ async def test_method_enroll_many_with_all_params (self , async_client : AsyncFinch ) -> None :
232
+ individual = await async_client .hris .benefits .individuals .enroll_many (
233
+ benefit_id = "benefit_id" ,
234
+ individuals = [
235
+ {
236
+ "configuration" : {
237
+ "annual_contribution_limit" : "individual" ,
238
+ "annual_maximum" : 500000 ,
239
+ "catch_up" : False ,
240
+ "company_contribution" : {
241
+ "amount" : 400 ,
242
+ "type" : "fixed" ,
243
+ },
244
+ "employee_deduction" : {
245
+ "amount" : 1000 ,
246
+ "type" : "fixed" ,
247
+ },
248
+ },
249
+ "individual_id" : "d02a6346-1f08-4312-a064-49ff3cafaa7a" ,
250
+ }
251
+ ],
207
252
)
208
253
assert_matches_type (AsyncSinglePage [EnrolledIndividual ], individual , path = ["response" ])
209
254
210
255
@parametrize
211
256
async def test_raw_response_enroll_many (self , async_client : AsyncFinch ) -> None :
212
257
response = await async_client .hris .benefits .individuals .with_raw_response .enroll_many (
213
258
benefit_id = "benefit_id" ,
214
- individuals = [{}],
215
259
)
216
260
217
261
assert response .is_closed is True
@@ -223,7 +267,6 @@ async def test_raw_response_enroll_many(self, async_client: AsyncFinch) -> None:
223
267
async def test_streaming_response_enroll_many (self , async_client : AsyncFinch ) -> None :
224
268
async with async_client .hris .benefits .individuals .with_streaming_response .enroll_many (
225
269
benefit_id = "benefit_id" ,
226
- individuals = [{}],
227
270
) as response :
228
271
assert not response .is_closed
229
272
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -238,7 +281,6 @@ async def test_path_params_enroll_many(self, async_client: AsyncFinch) -> None:
238
281
with pytest .raises (ValueError , match = r"Expected a non-empty value for `benefit_id` but received ''" ):
239
282
await async_client .hris .benefits .individuals .with_raw_response .enroll_many (
240
283
benefit_id = "" ,
241
- individuals = [{}],
242
284
)
243
285
244
286
@parametrize
0 commit comments