Skip to content

Commit 8808bc2

Browse files
feat(api): api update (#539)
1 parent 02a3af8 commit 8808bc2

File tree

9 files changed

+46
-1
lines changed

9 files changed

+46
-1
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 39
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f07b743d2ab438d7cdb6b7cfa8c0b3859ec148f84027baebbb50c6ff56cb6aef.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-1d705472a04ca3f84ed5fe8878b537e6359cab6c48cdfd3cd08656473e373f80.yml

src/finch/resources/sandbox/employment.py

+15
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Iterable, Optional
6+
from typing_extensions import Literal
67

78
import httpx
89

@@ -52,6 +53,10 @@ def update(
5253
custom_fields: Iterable[employment_update_params.CustomField] | NotGiven = NOT_GIVEN,
5354
department: Optional[employment_update_params.Department] | NotGiven = NOT_GIVEN,
5455
employment: Optional[employment_update_params.Employment] | NotGiven = NOT_GIVEN,
56+
employment_status: Optional[
57+
Literal["active", "deceased", "leave", "onboarding", "prehire", "retired", "terminated"]
58+
]
59+
| NotGiven = NOT_GIVEN,
5560
end_date: Optional[str] | NotGiven = NOT_GIVEN,
5661
first_name: Optional[str] | NotGiven = NOT_GIVEN,
5762
income: Optional[IncomeParam] | NotGiven = NOT_GIVEN,
@@ -86,6 +91,8 @@ def update(
8691
8792
employment: The employment object.
8893
94+
employment_status: The detailed employment status of the individual.
95+
8996
first_name: The legal first name of the individual.
9097
9198
income: The employee's income as reported by the provider. This may not always be
@@ -126,6 +133,7 @@ def update(
126133
"custom_fields": custom_fields,
127134
"department": department,
128135
"employment": employment,
136+
"employment_status": employment_status,
129137
"end_date": end_date,
130138
"first_name": first_name,
131139
"income": income,
@@ -177,6 +185,10 @@ async def update(
177185
custom_fields: Iterable[employment_update_params.CustomField] | NotGiven = NOT_GIVEN,
178186
department: Optional[employment_update_params.Department] | NotGiven = NOT_GIVEN,
179187
employment: Optional[employment_update_params.Employment] | NotGiven = NOT_GIVEN,
188+
employment_status: Optional[
189+
Literal["active", "deceased", "leave", "onboarding", "prehire", "retired", "terminated"]
190+
]
191+
| NotGiven = NOT_GIVEN,
180192
end_date: Optional[str] | NotGiven = NOT_GIVEN,
181193
first_name: Optional[str] | NotGiven = NOT_GIVEN,
182194
income: Optional[IncomeParam] | NotGiven = NOT_GIVEN,
@@ -211,6 +223,8 @@ async def update(
211223
212224
employment: The employment object.
213225
226+
employment_status: The detailed employment status of the individual.
227+
214228
first_name: The legal first name of the individual.
215229
216230
income: The employee's income as reported by the provider. This may not always be
@@ -251,6 +265,7 @@ async def update(
251265
"custom_fields": custom_fields,
252266
"department": department,
253267
"employment": employment,
268+
"employment_status": employment_status,
254269
"end_date": end_date,
255270
"first_name": first_name,
256271
"income": income,

src/finch/types/account_update_event.py

+2
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ class AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmployment(BaseMo
187187

188188
employment: Optional[AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentEmployment] = None
189189

190+
employment_status: Optional[bool] = None
191+
190192
end_date: Optional[bool] = None
191193

192194
first_name: Optional[bool] = None

src/finch/types/hris/employment_data.py

+9
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ class EmploymentData(BaseModel):
5757
employment: Optional[Employment] = None
5858
"""The employment object."""
5959

60+
employment_status: Optional[
61+
Literal["active", "deceased", "leave", "onboarding", "prehire", "retired", "terminated"]
62+
] = None
63+
"""The detailed employment status of the individual.
64+
65+
Available options: `active`, `deceased`, `leave`, `onboarding`, `prehire`,
66+
`retired`, `terminated`.
67+
"""
68+
6069
end_date: Optional[str] = None
6170

6271
first_name: Optional[str] = None

src/finch/types/provider.py

+2
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ class AuthenticationMethodSupportedFieldsEmployment(BaseModel):
184184

185185
employment: Optional[AuthenticationMethodSupportedFieldsEmploymentEmployment] = None
186186

187+
employment_status: Optional[bool] = None
188+
187189
end_date: Optional[bool] = None
188190

189191
first_name: Optional[bool] = None

src/finch/types/sandbox/directory_create_params.py

+5
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ class Body(TypedDict, total=False):
9090
employment: Optional[BodyEmployment]
9191
"""The employment object."""
9292

93+
employment_status: Optional[
94+
Literal["active", "deceased", "leave", "onboarding", "prehire", "retired", "terminated"]
95+
]
96+
"""The detailed employment status of the individual."""
97+
9398
encrypted_ssn: Optional[str]
9499
"""Social Security Number of the individual in **encrypted** format.
95100

src/finch/types/sandbox/employment_update_params.py

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ class EmploymentUpdateParams(TypedDict, total=False):
2828
employment: Optional[Employment]
2929
"""The employment object."""
3030

31+
employment_status: Optional[
32+
Literal["active", "deceased", "leave", "onboarding", "prehire", "retired", "terminated"]
33+
]
34+
"""The detailed employment status of the individual."""
35+
3136
end_date: Optional[str]
3237

3338
first_name: Optional[str]

src/finch/types/sandbox/employment_update_response.py

+5
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ class EmploymentUpdateResponse(BaseModel):
5858
employment: Optional[Employment] = None
5959
"""The employment object."""
6060

61+
employment_status: Optional[
62+
Literal["active", "deceased", "leave", "onboarding", "prehire", "retired", "terminated"]
63+
] = None
64+
"""The detailed employment status of the individual."""
65+
6166
end_date: Optional[str] = None
6267

6368
first_name: Optional[str] = None

tests/api_resources/sandbox/test_employment.py

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def test_method_update_with_all_params(self, client: Finch) -> None:
4040
"subtype": "full_time",
4141
"type": "employee",
4242
},
43+
employment_status="active",
4344
end_date="end_date",
4445
first_name="first_name",
4546
income={
@@ -135,6 +136,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncFinch) ->
135136
"subtype": "full_time",
136137
"type": "employee",
137138
},
139+
employment_status="active",
138140
end_date="end_date",
139141
first_name="first_name",
140142
income={

0 commit comments

Comments
 (0)