Skip to content

Commit ed26c31

Browse files
fix(types): loosen most List params types to Iterable (#288)
1 parent 440f9ba commit ed26c31

18 files changed

+65
-65
lines changed

src/finch/resources/hris/benefits/individuals.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List
5+
from typing import List, Iterable
66

77
import httpx
88

@@ -43,7 +43,7 @@ def enroll_many(
4343
self,
4444
benefit_id: str,
4545
*,
46-
individuals: List[individual_enroll_many_params.Individual],
46+
individuals: Iterable[individual_enroll_many_params.Individual],
4747
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4848
# The extra values given here take precedence over values defined on the client or passed to this method.
4949
extra_headers: Headers | None = None,
@@ -226,7 +226,7 @@ def enroll_many(
226226
self,
227227
benefit_id: str,
228228
*,
229-
individuals: List[individual_enroll_many_params.Individual],
229+
individuals: Iterable[individual_enroll_many_params.Individual],
230230
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
231231
# The extra values given here take precedence over values defined on the client or passed to this method.
232232
extra_headers: Headers | None = None,

src/finch/resources/hris/employments.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List
5+
from typing import Iterable
66

77
import httpx
88

@@ -34,7 +34,7 @@ def with_streaming_response(self) -> EmploymentsWithStreamingResponse:
3434
def retrieve_many(
3535
self,
3636
*,
37-
requests: List[employment_retrieve_many_params.Request],
37+
requests: Iterable[employment_retrieve_many_params.Request],
3838
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3939
# The extra values given here take precedence over values defined on the client or passed to this method.
4040
extra_headers: Headers | None = None,
@@ -84,7 +84,7 @@ def with_streaming_response(self) -> AsyncEmploymentsWithStreamingResponse:
8484
def retrieve_many(
8585
self,
8686
*,
87-
requests: List[employment_retrieve_many_params.Request],
87+
requests: Iterable[employment_retrieve_many_params.Request],
8888
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8989
# The extra values given here take precedence over values defined on the client or passed to this method.
9090
extra_headers: Headers | None = None,

src/finch/resources/hris/individuals.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Optional
5+
from typing import Iterable, Optional
66

77
import httpx
88

@@ -35,7 +35,7 @@ def retrieve_many(
3535
self,
3636
*,
3737
options: Optional[individual_retrieve_many_params.Options] | NotGiven = NOT_GIVEN,
38-
requests: List[individual_retrieve_many_params.Request] | NotGiven = NOT_GIVEN,
38+
requests: Iterable[individual_retrieve_many_params.Request] | NotGiven = NOT_GIVEN,
3939
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4040
# The extra values given here take precedence over values defined on the client or passed to this method.
4141
extra_headers: Headers | None = None,
@@ -86,7 +86,7 @@ def retrieve_many(
8686
self,
8787
*,
8888
options: Optional[individual_retrieve_many_params.Options] | NotGiven = NOT_GIVEN,
89-
requests: List[individual_retrieve_many_params.Request] | NotGiven = NOT_GIVEN,
89+
requests: Iterable[individual_retrieve_many_params.Request] | NotGiven = NOT_GIVEN,
9090
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9191
# The extra values given here take precedence over values defined on the client or passed to this method.
9292
extra_headers: Headers | None = None,

src/finch/resources/hris/pay_statements.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List
5+
from typing import Iterable
66

77
import httpx
88

@@ -34,7 +34,7 @@ def with_streaming_response(self) -> PayStatementsWithStreamingResponse:
3434
def retrieve_many(
3535
self,
3636
*,
37-
requests: List[pay_statement_retrieve_many_params.Request],
37+
requests: Iterable[pay_statement_retrieve_many_params.Request],
3838
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3939
# The extra values given here take precedence over values defined on the client or passed to this method.
4040
extra_headers: Headers | None = None,
@@ -85,7 +85,7 @@ def with_streaming_response(self) -> AsyncPayStatementsWithStreamingResponse:
8585
def retrieve_many(
8686
self,
8787
*,
88-
requests: List[pay_statement_retrieve_many_params.Request],
88+
requests: Iterable[pay_statement_retrieve_many_params.Request],
8989
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9090
# The extra values given here take precedence over values defined on the client or passed to this method.
9191
extra_headers: Headers | None = None,

src/finch/resources/sandbox/company.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Optional
5+
from typing import Iterable, Optional
66

77
import httpx
88

@@ -33,12 +33,12 @@ def with_streaming_response(self) -> CompanyWithStreamingResponse:
3333
def update(
3434
self,
3535
*,
36-
accounts: Optional[List[company_update_params.Account]],
37-
departments: Optional[List[Optional[company_update_params.Department]]],
36+
accounts: Optional[Iterable[company_update_params.Account]],
37+
departments: Optional[Iterable[Optional[company_update_params.Department]]],
3838
ein: Optional[str],
3939
entity: Optional[company_update_params.Entity],
4040
legal_name: Optional[str],
41-
locations: Optional[List[Optional[LocationParam]]],
41+
locations: Optional[Iterable[Optional[LocationParam]]],
4242
primary_email: Optional[str],
4343
primary_phone_number: Optional[str],
4444
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -108,12 +108,12 @@ def with_streaming_response(self) -> AsyncCompanyWithStreamingResponse:
108108
async def update(
109109
self,
110110
*,
111-
accounts: Optional[List[company_update_params.Account]],
112-
departments: Optional[List[Optional[company_update_params.Department]]],
111+
accounts: Optional[Iterable[company_update_params.Account]],
112+
departments: Optional[Iterable[Optional[company_update_params.Department]]],
113113
ein: Optional[str],
114114
entity: Optional[company_update_params.Entity],
115115
legal_name: Optional[str],
116-
locations: Optional[List[Optional[LocationParam]]],
116+
locations: Optional[Iterable[Optional[LocationParam]]],
117117
primary_email: Optional[str],
118118
primary_phone_number: Optional[str],
119119
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/finch/resources/sandbox/directory.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List
5+
from typing import Iterable
66

77
import httpx
88

@@ -32,7 +32,7 @@ def with_streaming_response(self) -> DirectoryWithStreamingResponse:
3232
def create(
3333
self,
3434
*,
35-
body: List[directory_create_params.Body],
35+
body: Iterable[directory_create_params.Body],
3636
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3737
# The extra values given here take precedence over values defined on the client or passed to this method.
3838
extra_headers: Headers | None = None,
@@ -77,7 +77,7 @@ def with_streaming_response(self) -> AsyncDirectoryWithStreamingResponse:
7777
async def create(
7878
self,
7979
*,
80-
body: List[directory_create_params.Body],
80+
body: Iterable[directory_create_params.Body],
8181
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8282
# The extra values given here take precedence over values defined on the client or passed to this method.
8383
extra_headers: Headers | None = None,

src/finch/resources/sandbox/employment.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Optional
5+
from typing import Iterable, Optional
66

77
import httpx
88

@@ -35,13 +35,13 @@ def update(
3535
individual_id: str,
3636
*,
3737
class_code: Optional[str] | NotGiven = NOT_GIVEN,
38-
custom_fields: List[employment_update_params.CustomField] | NotGiven = NOT_GIVEN,
38+
custom_fields: Iterable[employment_update_params.CustomField] | NotGiven = NOT_GIVEN,
3939
department: Optional[employment_update_params.Department] | NotGiven = NOT_GIVEN,
4040
employment: Optional[employment_update_params.Employment] | NotGiven = NOT_GIVEN,
4141
end_date: Optional[str] | NotGiven = NOT_GIVEN,
4242
first_name: Optional[str] | NotGiven = NOT_GIVEN,
4343
income: Optional[IncomeParam] | NotGiven = NOT_GIVEN,
44-
income_history: Optional[List[Optional[IncomeParam]]] | NotGiven = NOT_GIVEN,
44+
income_history: Optional[Iterable[Optional[IncomeParam]]] | NotGiven = NOT_GIVEN,
4545
is_active: Optional[bool] | NotGiven = NOT_GIVEN,
4646
last_name: Optional[str] | NotGiven = NOT_GIVEN,
4747
location: Optional[LocationParam] | NotGiven = NOT_GIVEN,
@@ -147,13 +147,13 @@ async def update(
147147
individual_id: str,
148148
*,
149149
class_code: Optional[str] | NotGiven = NOT_GIVEN,
150-
custom_fields: List[employment_update_params.CustomField] | NotGiven = NOT_GIVEN,
150+
custom_fields: Iterable[employment_update_params.CustomField] | NotGiven = NOT_GIVEN,
151151
department: Optional[employment_update_params.Department] | NotGiven = NOT_GIVEN,
152152
employment: Optional[employment_update_params.Employment] | NotGiven = NOT_GIVEN,
153153
end_date: Optional[str] | NotGiven = NOT_GIVEN,
154154
first_name: Optional[str] | NotGiven = NOT_GIVEN,
155155
income: Optional[IncomeParam] | NotGiven = NOT_GIVEN,
156-
income_history: Optional[List[Optional[IncomeParam]]] | NotGiven = NOT_GIVEN,
156+
income_history: Optional[Iterable[Optional[IncomeParam]]] | NotGiven = NOT_GIVEN,
157157
is_active: Optional[bool] | NotGiven = NOT_GIVEN,
158158
last_name: Optional[str] | NotGiven = NOT_GIVEN,
159159
location: Optional[LocationParam] | NotGiven = NOT_GIVEN,

src/finch/resources/sandbox/individual.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Optional
5+
from typing import Iterable, Optional
66
from typing_extensions import Literal
77

88
import httpx
@@ -36,7 +36,7 @@ def update(
3636
individual_id: str,
3737
*,
3838
dob: Optional[str] | NotGiven = NOT_GIVEN,
39-
emails: Optional[List[individual_update_params.Email]] | NotGiven = NOT_GIVEN,
39+
emails: Optional[Iterable[individual_update_params.Email]] | NotGiven = NOT_GIVEN,
4040
encrypted_ssn: Optional[str] | NotGiven = NOT_GIVEN,
4141
ethnicity: Optional[
4242
Literal[
@@ -55,7 +55,7 @@ def update(
5555
gender: Optional[Literal["female", "male", "other", "decline_to_specify"]] | NotGiven = NOT_GIVEN,
5656
last_name: Optional[str] | NotGiven = NOT_GIVEN,
5757
middle_name: Optional[str] | NotGiven = NOT_GIVEN,
58-
phone_numbers: Optional[List[Optional[individual_update_params.PhoneNumber]]] | NotGiven = NOT_GIVEN,
58+
phone_numbers: Optional[Iterable[Optional[individual_update_params.PhoneNumber]]] | NotGiven = NOT_GIVEN,
5959
preferred_name: Optional[str] | NotGiven = NOT_GIVEN,
6060
residence: Optional[LocationParam] | NotGiven = NOT_GIVEN,
6161
ssn: Optional[str] | NotGiven = NOT_GIVEN,
@@ -142,7 +142,7 @@ async def update(
142142
individual_id: str,
143143
*,
144144
dob: Optional[str] | NotGiven = NOT_GIVEN,
145-
emails: Optional[List[individual_update_params.Email]] | NotGiven = NOT_GIVEN,
145+
emails: Optional[Iterable[individual_update_params.Email]] | NotGiven = NOT_GIVEN,
146146
encrypted_ssn: Optional[str] | NotGiven = NOT_GIVEN,
147147
ethnicity: Optional[
148148
Literal[
@@ -161,7 +161,7 @@ async def update(
161161
gender: Optional[Literal["female", "male", "other", "decline_to_specify"]] | NotGiven = NOT_GIVEN,
162162
last_name: Optional[str] | NotGiven = NOT_GIVEN,
163163
middle_name: Optional[str] | NotGiven = NOT_GIVEN,
164-
phone_numbers: Optional[List[Optional[individual_update_params.PhoneNumber]]] | NotGiven = NOT_GIVEN,
164+
phone_numbers: Optional[Iterable[Optional[individual_update_params.PhoneNumber]]] | NotGiven = NOT_GIVEN,
165165
preferred_name: Optional[str] | NotGiven = NOT_GIVEN,
166166
residence: Optional[LocationParam] | NotGiven = NOT_GIVEN,
167167
ssn: Optional[str] | NotGiven = NOT_GIVEN,

src/finch/resources/sandbox/payment.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List
5+
from typing import Iterable
66

77
import httpx
88

@@ -33,7 +33,7 @@ def create(
3333
self,
3434
*,
3535
end_date: str | NotGiven = NOT_GIVEN,
36-
pay_statements: List[payment_create_params.PayStatement] | NotGiven = NOT_GIVEN,
36+
pay_statements: Iterable[payment_create_params.PayStatement] | NotGiven = NOT_GIVEN,
3737
start_date: str | NotGiven = NOT_GIVEN,
3838
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3939
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -84,7 +84,7 @@ async def create(
8484
self,
8585
*,
8686
end_date: str | NotGiven = NOT_GIVEN,
87-
pay_statements: List[payment_create_params.PayStatement] | NotGiven = NOT_GIVEN,
87+
pay_statements: Iterable[payment_create_params.PayStatement] | NotGiven = NOT_GIVEN,
8888
start_date: str | NotGiven = NOT_GIVEN,
8989
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9090
# The extra values given here take precedence over values defined on the client or passed to this method.

src/finch/types/hris/benefits/individual_enroll_many_params.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
from __future__ import annotations
44

5-
from typing import List
5+
from typing import Iterable
66
from typing_extensions import Required, TypedDict
77

88
__all__ = ["IndividualEnrollManyParams", "Individual"]
99

1010

1111
class IndividualEnrollManyParams(TypedDict, total=False):
12-
individuals: Required[List[Individual]]
12+
individuals: Required[Iterable[Individual]]
1313
"""Array of the individual_id to enroll and a configuration object."""
1414

1515

src/finch/types/hris/employment_retrieve_many_params.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
from __future__ import annotations
44

5-
from typing import List
5+
from typing import Iterable
66
from typing_extensions import Required, TypedDict
77

88
__all__ = ["EmploymentRetrieveManyParams", "Request"]
99

1010

1111
class EmploymentRetrieveManyParams(TypedDict, total=False):
12-
requests: Required[List[Request]]
12+
requests: Required[Iterable[Request]]
1313
"""The array of batch requests."""
1414

1515

src/finch/types/hris/individual_retrieve_many_params.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Optional
5+
from typing import List, Iterable, Optional
66
from typing_extensions import TypedDict
77

88
__all__ = ["IndividualRetrieveManyParams", "Options", "Request"]
@@ -11,7 +11,7 @@
1111
class IndividualRetrieveManyParams(TypedDict, total=False):
1212
options: Optional[Options]
1313

14-
requests: List[Request]
14+
requests: Iterable[Request]
1515

1616

1717
class Options(TypedDict, total=False):

src/finch/types/hris/pay_statement_retrieve_many_params.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
from __future__ import annotations
44

5-
from typing import List
5+
from typing import Iterable
66
from typing_extensions import Required, TypedDict
77

88
__all__ = ["PayStatementRetrieveManyParams", "Request"]
99

1010

1111
class PayStatementRetrieveManyParams(TypedDict, total=False):
12-
requests: Required[List[Request]]
12+
requests: Required[Iterable[Request]]
1313
"""The array of batch requests."""
1414

1515

src/finch/types/sandbox/company_update_params.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import List, Optional
5+
from typing import Iterable, Optional
66
from typing_extensions import Literal, Required, TypedDict
77

88
from ..location_param import LocationParam
@@ -11,10 +11,10 @@
1111

1212

1313
class CompanyUpdateParams(TypedDict, total=False):
14-
accounts: Required[Optional[List[Account]]]
14+
accounts: Required[Optional[Iterable[Account]]]
1515
"""An array of bank account objects associated with the payroll/HRIS system."""
1616

17-
departments: Required[Optional[List[Optional[Department]]]]
17+
departments: Required[Optional[Iterable[Optional[Department]]]]
1818
"""The array of company departments."""
1919

2020
ein: Required[Optional[str]]
@@ -26,7 +26,7 @@ class CompanyUpdateParams(TypedDict, total=False):
2626
legal_name: Required[Optional[str]]
2727
"""The legal name of the company."""
2828

29-
locations: Required[Optional[List[Optional[LocationParam]]]]
29+
locations: Required[Optional[Iterable[Optional[LocationParam]]]]
3030

3131
primary_email: Required[Optional[str]]
3232
"""The email of the main administrator on the account."""

0 commit comments

Comments
 (0)