Skip to content

Commit 21a0e16

Browse files
feat(api): api update
1 parent 2055b26 commit 21a0e16

File tree

8 files changed

+111
-57
lines changed

8 files changed

+111
-57
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-05a1c7485ea6dd75ad2fb1a0628570d88a3e7c4f1e1ecad433711c78deae50e6.yml
3-
openapi_spec_hash: 6d6014d50e18c98219b496bb2a5dab1d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-3003136d45e38172828b1eb62bf9d3c876140355b4b1271559108f3df2c87208.yml
3+
openapi_spec_hash: 29a85aba1eec35434ba1db898ea18b0b
44
config_hash: 53778a0b839c4f6ad34fbba051f5e8a6

src/finch/types/location.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class Location(BaseModel):
2020
line2: Optional[str] = None
2121
"""Apartment, suite, unit, or building."""
2222

23-
name: Optional[str] = None
24-
2523
postal_code: Optional[str] = None
2624
"""The postal code or zip code."""
2725

28-
source_id: Optional[str] = None
29-
3026
state: Optional[str] = None
3127
"""The state code."""
28+
29+
name: Optional[str] = None
30+
31+
source_id: Optional[str] = None

src/finch/types/location_param.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,30 @@
33
from __future__ import annotations
44

55
from typing import Optional
6-
from typing_extensions import TypedDict
6+
from typing_extensions import Required, TypedDict
77

88
__all__ = ["LocationParam"]
99

1010

1111
class LocationParam(TypedDict, total=False):
12-
city: Optional[str]
12+
city: Required[Optional[str]]
1313
"""City, district, suburb, town, or village."""
1414

15-
country: Optional[str]
15+
country: Required[Optional[str]]
1616
"""The 2-letter ISO 3166 country code."""
1717

18-
line1: Optional[str]
18+
line1: Required[Optional[str]]
1919
"""Street address or PO box."""
2020

21-
line2: Optional[str]
21+
line2: Required[Optional[str]]
2222
"""Apartment, suite, unit, or building."""
2323

24-
name: Optional[str]
25-
26-
postal_code: Optional[str]
24+
postal_code: Required[Optional[str]]
2725
"""The postal code or zip code."""
2826

29-
source_id: Optional[str]
30-
31-
state: Optional[str]
27+
state: Required[Optional[str]]
3228
"""The state code."""
29+
30+
name: Optional[str]
31+
32+
source_id: Optional[str]

tests/api_resources/hris/benefits/test_individuals.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ def test_method_enroll_many_with_all_params(self, client: Finch) -> None:
3939
{
4040
"configuration": {
4141
"annual_contribution_limit": "individual",
42-
"annual_maximum": 500000,
43-
"catch_up": False,
42+
"annual_maximum": None,
43+
"catch_up": True,
4444
"company_contribution": {
45-
"amount": 400,
46-
"type": "percent",
45+
"amount": 0,
46+
"type": "fixed",
4747
},
48-
"effective_date": parse_date("2025-01-01"),
48+
"effective_date": parse_date("2019-12-27"),
4949
"employee_deduction": {
50-
"amount": 1000,
51-
"type": "percent",
50+
"amount": 10000,
51+
"type": "fixed",
5252
},
5353
},
5454
"individual_id": "d02a6346-1f08-4312-a064-49ff3cafaa7a",
@@ -237,16 +237,16 @@ async def test_method_enroll_many_with_all_params(self, async_client: AsyncFinch
237237
{
238238
"configuration": {
239239
"annual_contribution_limit": "individual",
240-
"annual_maximum": 500000,
241-
"catch_up": False,
240+
"annual_maximum": None,
241+
"catch_up": True,
242242
"company_contribution": {
243-
"amount": 400,
244-
"type": "percent",
243+
"amount": 0,
244+
"type": "fixed",
245245
},
246-
"effective_date": parse_date("2025-01-01"),
246+
"effective_date": parse_date("2019-12-27"),
247247
"employee_deduction": {
248-
"amount": 1000,
249-
"type": "percent",
248+
"amount": 10000,
249+
"type": "fixed",
250250
},
251251
},
252252
"individual_id": "d02a6346-1f08-4312-a064-49ff3cafaa7a",

tests/api_resources/sandbox/test_company.py

Lines changed: 64 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ def test_method_update(self, client: Finch) -> None:
2525
ein="ein",
2626
entity={},
2727
legal_name="legal_name",
28-
locations=[{}],
28+
locations=[
29+
{
30+
"city": "city",
31+
"country": "country",
32+
"line1": "line1",
33+
"line2": "line2",
34+
"postal_code": "postal_code",
35+
"state": "state",
36+
}
37+
],
2938
primary_email="[email protected]",
3039
primary_phone_number="primary_phone_number",
3140
)
@@ -61,10 +70,10 @@ def test_method_update_with_all_params(self, client: Finch) -> None:
6170
"country": "country",
6271
"line1": "line1",
6372
"line2": "line2",
64-
"name": "name",
6573
"postal_code": "postal_code",
66-
"source_id": "source_id",
6774
"state": "state",
75+
"name": "name",
76+
"source_id": "source_id",
6877
}
6978
],
7079
primary_email="[email protected]",
@@ -80,7 +89,16 @@ def test_raw_response_update(self, client: Finch) -> None:
8089
ein="ein",
8190
entity={},
8291
legal_name="legal_name",
83-
locations=[{}],
92+
locations=[
93+
{
94+
"city": "city",
95+
"country": "country",
96+
"line1": "line1",
97+
"line2": "line2",
98+
"postal_code": "postal_code",
99+
"state": "state",
100+
}
101+
],
84102
primary_email="[email protected]",
85103
primary_phone_number="primary_phone_number",
86104
)
@@ -98,7 +116,16 @@ def test_streaming_response_update(self, client: Finch) -> None:
98116
ein="ein",
99117
entity={},
100118
legal_name="legal_name",
101-
locations=[{}],
119+
locations=[
120+
{
121+
"city": "city",
122+
"country": "country",
123+
"line1": "line1",
124+
"line2": "line2",
125+
"postal_code": "postal_code",
126+
"state": "state",
127+
}
128+
],
102129
primary_email="[email protected]",
103130
primary_phone_number="primary_phone_number",
104131
) as response:
@@ -122,7 +149,16 @@ async def test_method_update(self, async_client: AsyncFinch) -> None:
122149
ein="ein",
123150
entity={},
124151
legal_name="legal_name",
125-
locations=[{}],
152+
locations=[
153+
{
154+
"city": "city",
155+
"country": "country",
156+
"line1": "line1",
157+
"line2": "line2",
158+
"postal_code": "postal_code",
159+
"state": "state",
160+
}
161+
],
126162
primary_email="[email protected]",
127163
primary_phone_number="primary_phone_number",
128164
)
@@ -158,10 +194,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncFinch) ->
158194
"country": "country",
159195
"line1": "line1",
160196
"line2": "line2",
161-
"name": "name",
162197
"postal_code": "postal_code",
163-
"source_id": "source_id",
164198
"state": "state",
199+
"name": "name",
200+
"source_id": "source_id",
165201
}
166202
],
167203
primary_email="[email protected]",
@@ -177,7 +213,16 @@ async def test_raw_response_update(self, async_client: AsyncFinch) -> None:
177213
ein="ein",
178214
entity={},
179215
legal_name="legal_name",
180-
locations=[{}],
216+
locations=[
217+
{
218+
"city": "city",
219+
"country": "country",
220+
"line1": "line1",
221+
"line2": "line2",
222+
"postal_code": "postal_code",
223+
"state": "state",
224+
}
225+
],
181226
primary_email="[email protected]",
182227
primary_phone_number="primary_phone_number",
183228
)
@@ -195,7 +240,16 @@ async def test_streaming_response_update(self, async_client: AsyncFinch) -> None
195240
ein="ein",
196241
entity={},
197242
legal_name="legal_name",
198-
locations=[{}],
243+
locations=[
244+
{
245+
"city": "city",
246+
"country": "country",
247+
"line1": "line1",
248+
"line2": "line2",
249+
"postal_code": "postal_code",
250+
"state": "state",
251+
}
252+
],
199253
primary_email="[email protected]",
200254
primary_phone_number="primary_phone_number",
201255
) as response:

tests/api_resources/sandbox/test_directory.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ def test_method_create_with_all_params(self, client: Finch) -> None:
7474
"country": "country",
7575
"line1": "line1",
7676
"line2": "line2",
77-
"name": "name",
7877
"postal_code": "postal_code",
79-
"source_id": "source_id",
8078
"state": "state",
79+
"name": "name",
80+
"source_id": "source_id",
8181
},
8282
"manager": {"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"},
8383
"middle_name": "middle_name",
@@ -93,10 +93,10 @@ def test_method_create_with_all_params(self, client: Finch) -> None:
9393
"country": "country",
9494
"line1": "line1",
9595
"line2": "line2",
96-
"name": "name",
9796
"postal_code": "postal_code",
98-
"source_id": "source_id",
9997
"state": "state",
98+
"name": "name",
99+
"source_id": "source_id",
100100
},
101101
"source_id": "source_id",
102102
"ssn": "ssn",
@@ -188,10 +188,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) ->
188188
"country": "country",
189189
"line1": "line1",
190190
"line2": "line2",
191-
"name": "name",
192191
"postal_code": "postal_code",
193-
"source_id": "source_id",
194192
"state": "state",
193+
"name": "name",
194+
"source_id": "source_id",
195195
},
196196
"manager": {"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"},
197197
"middle_name": "middle_name",
@@ -207,10 +207,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) ->
207207
"country": "country",
208208
"line1": "line1",
209209
"line2": "line2",
210-
"name": "name",
211210
"postal_code": "postal_code",
212-
"source_id": "source_id",
213211
"state": "state",
212+
"name": "name",
213+
"source_id": "source_id",
214214
},
215215
"source_id": "source_id",
216216
"ssn": "ssn",

tests/api_resources/sandbox/test_employment.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ def test_method_update_with_all_params(self, client: Finch) -> None:
6565
"country": "country",
6666
"line1": "line1",
6767
"line2": "line2",
68-
"name": "name",
6968
"postal_code": "postal_code",
70-
"source_id": "source_id",
7169
"state": "state",
70+
"name": "name",
71+
"source_id": "source_id",
7272
},
7373
manager={"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"},
7474
middle_name="middle_name",
@@ -161,10 +161,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncFinch) ->
161161
"country": "country",
162162
"line1": "line1",
163163
"line2": "line2",
164-
"name": "name",
165164
"postal_code": "postal_code",
166-
"source_id": "source_id",
167165
"state": "state",
166+
"name": "name",
167+
"source_id": "source_id",
168168
},
169169
manager={"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"},
170170
middle_name="middle_name",

tests/api_resources/sandbox/test_individual.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ def test_method_update_with_all_params(self, client: Finch) -> None:
5353
"country": "country",
5454
"line1": "line1",
5555
"line2": "line2",
56-
"name": "name",
5756
"postal_code": "postal_code",
58-
"source_id": "source_id",
5957
"state": "state",
58+
"name": "name",
59+
"source_id": "source_id",
6060
},
6161
ssn="ssn",
6262
)
@@ -133,10 +133,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncFinch) ->
133133
"country": "country",
134134
"line1": "line1",
135135
"line2": "line2",
136-
"name": "name",
137136
"postal_code": "postal_code",
138-
"source_id": "source_id",
139137
"state": "state",
138+
"name": "name",
139+
"source_id": "source_id",
140140
},
141141
ssn="ssn",
142142
)

0 commit comments

Comments
 (0)