Skip to content

feat(api): api update #539

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 39
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f07b743d2ab438d7cdb6b7cfa8c0b3859ec148f84027baebbb50c6ff56cb6aef.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-1d705472a04ca3f84ed5fe8878b537e6359cab6c48cdfd3cd08656473e373f80.yml
15 changes: 15 additions & 0 deletions src/finch/resources/sandbox/employment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

from typing import Iterable, Optional
from typing_extensions import Literal

import httpx

Expand Down Expand Up @@ -52,6 +53,10 @@ def update(
custom_fields: Iterable[employment_update_params.CustomField] | NotGiven = NOT_GIVEN,
department: Optional[employment_update_params.Department] | NotGiven = NOT_GIVEN,
employment: Optional[employment_update_params.Employment] | NotGiven = NOT_GIVEN,
employment_status: Optional[
Literal["active", "deceased", "leave", "onboarding", "prehire", "retired", "terminated"]
]
| NotGiven = NOT_GIVEN,
end_date: Optional[str] | NotGiven = NOT_GIVEN,
first_name: Optional[str] | NotGiven = NOT_GIVEN,
income: Optional[IncomeParam] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -86,6 +91,8 @@ def update(

employment: The employment object.

employment_status: The detailed employment status of the individual.

first_name: The legal first name of the individual.

income: The employee's income as reported by the provider. This may not always be
Expand Down Expand Up @@ -126,6 +133,7 @@ def update(
"custom_fields": custom_fields,
"department": department,
"employment": employment,
"employment_status": employment_status,
"end_date": end_date,
"first_name": first_name,
"income": income,
Expand Down Expand Up @@ -177,6 +185,10 @@ async def update(
custom_fields: Iterable[employment_update_params.CustomField] | NotGiven = NOT_GIVEN,
department: Optional[employment_update_params.Department] | NotGiven = NOT_GIVEN,
employment: Optional[employment_update_params.Employment] | NotGiven = NOT_GIVEN,
employment_status: Optional[
Literal["active", "deceased", "leave", "onboarding", "prehire", "retired", "terminated"]
]
| NotGiven = NOT_GIVEN,
end_date: Optional[str] | NotGiven = NOT_GIVEN,
first_name: Optional[str] | NotGiven = NOT_GIVEN,
income: Optional[IncomeParam] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -211,6 +223,8 @@ async def update(

employment: The employment object.

employment_status: The detailed employment status of the individual.

first_name: The legal first name of the individual.

income: The employee's income as reported by the provider. This may not always be
Expand Down Expand Up @@ -251,6 +265,7 @@ async def update(
"custom_fields": custom_fields,
"department": department,
"employment": employment,
"employment_status": employment_status,
"end_date": end_date,
"first_name": first_name,
"income": income,
Expand Down
2 changes: 2 additions & 0 deletions src/finch/types/account_update_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ class AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmployment(BaseMo

employment: Optional[AccountUpdateEventDataAuthenticationMethodSupportedFieldsEmploymentEmployment] = None

employment_status: Optional[bool] = None

end_date: Optional[bool] = None

first_name: Optional[bool] = None
Expand Down
9 changes: 9 additions & 0 deletions src/finch/types/hris/employment_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ class EmploymentData(BaseModel):
employment: Optional[Employment] = None
"""The employment object."""

employment_status: Optional[
Literal["active", "deceased", "leave", "onboarding", "prehire", "retired", "terminated"]
] = None
"""The detailed employment status of the individual.

Available options: `active`, `deceased`, `leave`, `onboarding`, `prehire`,
`retired`, `terminated`.
"""

end_date: Optional[str] = None

first_name: Optional[str] = None
Expand Down
2 changes: 2 additions & 0 deletions src/finch/types/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ class AuthenticationMethodSupportedFieldsEmployment(BaseModel):

employment: Optional[AuthenticationMethodSupportedFieldsEmploymentEmployment] = None

employment_status: Optional[bool] = None

end_date: Optional[bool] = None

first_name: Optional[bool] = None
Expand Down
5 changes: 5 additions & 0 deletions src/finch/types/sandbox/directory_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ class Body(TypedDict, total=False):
employment: Optional[BodyEmployment]
"""The employment object."""

employment_status: Optional[
Literal["active", "deceased", "leave", "onboarding", "prehire", "retired", "terminated"]
]
"""The detailed employment status of the individual."""

encrypted_ssn: Optional[str]
"""Social Security Number of the individual in **encrypted** format.

Expand Down
5 changes: 5 additions & 0 deletions src/finch/types/sandbox/employment_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ class EmploymentUpdateParams(TypedDict, total=False):
employment: Optional[Employment]
"""The employment object."""

employment_status: Optional[
Literal["active", "deceased", "leave", "onboarding", "prehire", "retired", "terminated"]
]
"""The detailed employment status of the individual."""

end_date: Optional[str]

first_name: Optional[str]
Expand Down
5 changes: 5 additions & 0 deletions src/finch/types/sandbox/employment_update_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ class EmploymentUpdateResponse(BaseModel):
employment: Optional[Employment] = None
"""The employment object."""

employment_status: Optional[
Literal["active", "deceased", "leave", "onboarding", "prehire", "retired", "terminated"]
] = None
"""The detailed employment status of the individual."""

end_date: Optional[str] = None

first_name: Optional[str] = None
Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/sandbox/test_employment.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def test_method_update_with_all_params(self, client: Finch) -> None:
"subtype": "full_time",
"type": "employee",
},
employment_status="active",
end_date="end_date",
first_name="first_name",
income={
Expand Down Expand Up @@ -135,6 +136,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncFinch) ->
"subtype": "full_time",
"type": "employee",
},
employment_status="active",
end_date="end_date",
first_name="first_name",
income={
Expand Down