From 1e723242d8a86affd25c23a009318ed4da5e3374 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 16 Sep 2025 19:12:43 +0000
Subject: [PATCH 01/20] chore(internal): update pydantic dependency
---
requirements-dev.lock | 7 +++++--
requirements.lock | 7 +++++--
src/finch/_models.py | 14 ++++++++++----
3 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/requirements-dev.lock b/requirements-dev.lock
index b353a1ba..1f0c2776 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -88,9 +88,9 @@ pluggy==1.5.0
propcache==0.3.1
# via aiohttp
# via yarl
-pydantic==2.10.3
+pydantic==2.11.9
# via finch-api
-pydantic-core==2.27.1
+pydantic-core==2.33.2
# via pydantic
pygments==2.18.0
# via rich
@@ -126,6 +126,9 @@ typing-extensions==4.12.2
# via pydantic
# via pydantic-core
# via pyright
+ # via typing-inspection
+typing-inspection==0.4.1
+ # via pydantic
virtualenv==20.24.5
# via nox
yarl==1.20.0
diff --git a/requirements.lock b/requirements.lock
index a7f7f00c..7953c791 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -55,9 +55,9 @@ multidict==6.4.4
propcache==0.3.1
# via aiohttp
# via yarl
-pydantic==2.10.3
+pydantic==2.11.9
# via finch-api
-pydantic-core==2.27.1
+pydantic-core==2.33.2
# via pydantic
sniffio==1.3.0
# via anyio
@@ -68,5 +68,8 @@ typing-extensions==4.12.2
# via multidict
# via pydantic
# via pydantic-core
+ # via typing-inspection
+typing-inspection==0.4.1
+ # via pydantic
yarl==1.20.0
# via aiohttp
diff --git a/src/finch/_models.py b/src/finch/_models.py
index 3a6017ef..6a3cd1d2 100644
--- a/src/finch/_models.py
+++ b/src/finch/_models.py
@@ -256,7 +256,7 @@ def model_dump(
mode: Literal["json", "python"] | str = "python",
include: IncEx | None = None,
exclude: IncEx | None = None,
- by_alias: bool = False,
+ by_alias: bool | None = None,
exclude_unset: bool = False,
exclude_defaults: bool = False,
exclude_none: bool = False,
@@ -264,6 +264,7 @@ def model_dump(
warnings: bool | Literal["none", "warn", "error"] = True,
context: dict[str, Any] | None = None,
serialize_as_any: bool = False,
+ fallback: Callable[[Any], Any] | None = None,
) -> dict[str, Any]:
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump
@@ -295,10 +296,12 @@ def model_dump(
raise ValueError("context is only supported in Pydantic v2")
if serialize_as_any != False:
raise ValueError("serialize_as_any is only supported in Pydantic v2")
+ if fallback is not None:
+ raise ValueError("fallback is only supported in Pydantic v2")
dumped = super().dict( # pyright: ignore[reportDeprecated]
include=include,
exclude=exclude,
- by_alias=by_alias,
+ by_alias=by_alias if by_alias is not None else False,
exclude_unset=exclude_unset,
exclude_defaults=exclude_defaults,
exclude_none=exclude_none,
@@ -313,13 +316,14 @@ def model_dump_json(
indent: int | None = None,
include: IncEx | None = None,
exclude: IncEx | None = None,
- by_alias: bool = False,
+ by_alias: bool | None = None,
exclude_unset: bool = False,
exclude_defaults: bool = False,
exclude_none: bool = False,
round_trip: bool = False,
warnings: bool | Literal["none", "warn", "error"] = True,
context: dict[str, Any] | None = None,
+ fallback: Callable[[Any], Any] | None = None,
serialize_as_any: bool = False,
) -> str:
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json
@@ -348,11 +352,13 @@ def model_dump_json(
raise ValueError("context is only supported in Pydantic v2")
if serialize_as_any != False:
raise ValueError("serialize_as_any is only supported in Pydantic v2")
+ if fallback is not None:
+ raise ValueError("fallback is only supported in Pydantic v2")
return super().json( # type: ignore[reportDeprecated]
indent=indent,
include=include,
exclude=exclude,
- by_alias=by_alias,
+ by_alias=by_alias if by_alias is not None else False,
exclude_unset=exclude_unset,
exclude_defaults=exclude_defaults,
exclude_none=exclude_none,
From ae486abd5198b2aa15615108ef70281b1194666c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 18 Sep 2025 14:58:13 +0000
Subject: [PATCH 02/20] chore(types): change optional parameter type from
NotGiven to Omit
---
src/finch/__init__.py | 4 +-
src/finch/_base_client.py | 18 ++---
src/finch/_client.py | 16 ++--
src/finch/_qs.py | 14 ++--
src/finch/_types.py | 29 ++++---
src/finch/_utils/_transform.py | 4 +-
src/finch/_utils/_utils.py | 8 +-
src/finch/resources/access_tokens.py | 18 ++---
src/finch/resources/account.py | 10 +--
src/finch/resources/connect/sessions.py | 46 +++++------
src/finch/resources/hris/benefits/benefits.py | 42 +++++-----
.../resources/hris/benefits/individuals.py | 30 +++----
src/finch/resources/hris/company/company.py | 6 +-
.../pay_statement_item/pay_statement_item.py | 28 ++++---
.../hris/company/pay_statement_item/rules.py | 42 +++++-----
src/finch/resources/hris/directory.py | 26 +++----
src/finch/resources/hris/documents.py | 26 +++----
src/finch/resources/hris/employments.py | 6 +-
src/finch/resources/hris/individuals.py | 14 ++--
src/finch/resources/hris/pay_statements.py | 6 +-
src/finch/resources/hris/payments.py | 6 +-
src/finch/resources/jobs/automated.py | 42 +++++-----
src/finch/resources/jobs/manual.py | 10 +--
src/finch/resources/payroll/pay_groups.py | 18 ++---
src/finch/resources/providers.py | 6 +-
src/finch/resources/request_forwarding.py | 18 ++---
src/finch/resources/sandbox/company.py | 6 +-
.../resources/sandbox/connections/accounts.py | 22 +++---
.../sandbox/connections/connections.py | 18 ++---
src/finch/resources/sandbox/directory.py | 10 +--
src/finch/resources/sandbox/employment.py | 78 +++++++++----------
src/finch/resources/sandbox/individual.py | 54 ++++++-------
.../resources/sandbox/jobs/configuration.py | 10 +--
src/finch/resources/sandbox/jobs/jobs.py | 6 +-
src/finch/resources/sandbox/payment.py | 18 ++---
tests/test_transform.py | 11 ++-
36 files changed, 370 insertions(+), 356 deletions(-)
diff --git a/src/finch/__init__.py b/src/finch/__init__.py
index 41c80a92..7b799b16 100644
--- a/src/finch/__init__.py
+++ b/src/finch/__init__.py
@@ -3,7 +3,7 @@
import typing as _t
from . import types
-from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
+from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
from ._utils import file_from_path
from ._client import Finch, Client, Stream, Timeout, Transport, AsyncFinch, AsyncClient, AsyncStream, RequestOptions
from ._models import BaseModel
@@ -38,7 +38,9 @@
"ProxiesTypes",
"NotGiven",
"NOT_GIVEN",
+ "not_given",
"Omit",
+ "omit",
"FinchError",
"APIError",
"APIStatusError",
diff --git a/src/finch/_base_client.py b/src/finch/_base_client.py
index 4dee4d8e..072c469b 100644
--- a/src/finch/_base_client.py
+++ b/src/finch/_base_client.py
@@ -42,7 +42,6 @@
from ._qs import Querystring
from ._files import to_httpx_files, async_to_httpx_files
from ._types import (
- NOT_GIVEN,
Body,
Omit,
Query,
@@ -57,6 +56,7 @@
RequestOptions,
HttpxRequestFiles,
ModelBuilderProtocol,
+ not_given,
)
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
from ._compat import PYDANTIC_V1, model_copy, model_dump
@@ -146,9 +146,9 @@ def __init__(
def __init__(
self,
*,
- url: URL | NotGiven = NOT_GIVEN,
- json: Body | NotGiven = NOT_GIVEN,
- params: Query | NotGiven = NOT_GIVEN,
+ url: URL | NotGiven = not_given,
+ json: Body | NotGiven = not_given,
+ params: Query | NotGiven = not_given,
) -> None:
self.url = url
self.json = json
@@ -596,7 +596,7 @@ def _maybe_override_cast_to(self, cast_to: type[ResponseT], options: FinalReques
# we internally support defining a temporary header to override the
# default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response`
# see _response.py for implementation details
- override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, NOT_GIVEN)
+ override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given)
if is_given(override_cast_to):
options.headers = headers
return cast(Type[ResponseT], override_cast_to)
@@ -826,7 +826,7 @@ def __init__(
version: str,
base_url: str | URL,
max_retries: int = DEFAULT_MAX_RETRIES,
- timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.Client | None = None,
custom_headers: Mapping[str, str] | None = None,
custom_query: Mapping[str, object] | None = None,
@@ -1371,7 +1371,7 @@ def __init__(
base_url: str | URL,
_strict_response_validation: bool,
max_retries: int = DEFAULT_MAX_RETRIES,
- timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.AsyncClient | None = None,
custom_headers: Mapping[str, str] | None = None,
custom_query: Mapping[str, object] | None = None,
@@ -1847,8 +1847,8 @@ def make_request_options(
extra_query: Query | None = None,
extra_body: Body | None = None,
idempotency_key: str | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- post_parser: PostParser | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ post_parser: PostParser | NotGiven = not_given,
) -> RequestOptions:
"""Create a dict of type RequestOptions without keys of NotGiven values."""
options: RequestOptions = {}
diff --git a/src/finch/_client.py b/src/finch/_client.py
index f08e2199..cb1cea55 100644
--- a/src/finch/_client.py
+++ b/src/finch/_client.py
@@ -4,7 +4,7 @@
import os
import base64
-from typing import TYPE_CHECKING, Any, Union, Mapping
+from typing import TYPE_CHECKING, Any, Mapping
from typing_extensions import Self, override
import httpx
@@ -12,7 +12,6 @@
from . import _exceptions
from ._qs import Querystring
from ._types import (
- NOT_GIVEN,
Omit,
Headers,
Timeout,
@@ -20,6 +19,7 @@
Transport,
ProxiesTypes,
RequestOptions,
+ not_given,
)
from ._utils import is_given, get_async_library
from ._compat import cached_property
@@ -73,7 +73,7 @@ def __init__(
client_secret: str | None = None,
webhook_secret: str | None = None,
base_url: str | httpx.URL | None = None,
- timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
+ timeout: float | Timeout | None | NotGiven = not_given,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
@@ -261,9 +261,9 @@ def copy(
client_secret: str | None = None,
webhook_secret: str | None = None,
base_url: str | httpx.URL | None = None,
- timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.Client | None = None,
- max_retries: int | NotGiven = NOT_GIVEN,
+ max_retries: int | NotGiven = not_given,
default_headers: Mapping[str, str] | None = None,
set_default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
@@ -423,7 +423,7 @@ def __init__(
client_secret: str | None = None,
webhook_secret: str | None = None,
base_url: str | httpx.URL | None = None,
- timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
+ timeout: float | Timeout | None | NotGiven = not_given,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
@@ -611,9 +611,9 @@ def copy(
client_secret: str | None = None,
webhook_secret: str | None = None,
base_url: str | httpx.URL | None = None,
- timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | Timeout | None | NotGiven = not_given,
http_client: httpx.AsyncClient | None = None,
- max_retries: int | NotGiven = NOT_GIVEN,
+ max_retries: int | NotGiven = not_given,
default_headers: Mapping[str, str] | None = None,
set_default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
diff --git a/src/finch/_qs.py b/src/finch/_qs.py
index 274320ca..ada6fd3f 100644
--- a/src/finch/_qs.py
+++ b/src/finch/_qs.py
@@ -4,7 +4,7 @@
from urllib.parse import parse_qs, urlencode
from typing_extensions import Literal, get_args
-from ._types import NOT_GIVEN, NotGiven, NotGivenOr
+from ._types import NotGiven, not_given
from ._utils import flatten
_T = TypeVar("_T")
@@ -41,8 +41,8 @@ def stringify(
self,
params: Params,
*,
- array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN,
- nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN,
+ array_format: ArrayFormat | NotGiven = not_given,
+ nested_format: NestedFormat | NotGiven = not_given,
) -> str:
return urlencode(
self.stringify_items(
@@ -56,8 +56,8 @@ def stringify_items(
self,
params: Params,
*,
- array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN,
- nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN,
+ array_format: ArrayFormat | NotGiven = not_given,
+ nested_format: NestedFormat | NotGiven = not_given,
) -> list[tuple[str, str]]:
opts = Options(
qs=self,
@@ -143,8 +143,8 @@ def __init__(
self,
qs: Querystring = _qs,
*,
- array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN,
- nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN,
+ array_format: ArrayFormat | NotGiven = not_given,
+ nested_format: NestedFormat | NotGiven = not_given,
) -> None:
self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format
self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format
diff --git a/src/finch/_types.py b/src/finch/_types.py
index 9a4666ba..b99b2f91 100644
--- a/src/finch/_types.py
+++ b/src/finch/_types.py
@@ -118,18 +118,21 @@ class RequestOptions(TypedDict, total=False):
# Sentinel class used until PEP 0661 is accepted
class NotGiven:
"""
- A sentinel singleton class used to distinguish omitted keyword arguments
- from those passed in with the value None (which may have different behavior).
+ For parameters with a meaningful None value, we need to distinguish between
+ the user explicitly passing None, and the user not passing the parameter at
+ all.
+
+ User code shouldn't need to use not_given directly.
For example:
```py
- def get(timeout: Union[int, NotGiven, None] = NotGiven()) -> Response: ...
+ def create(timeout: Timeout | None | NotGiven = not_given): ...
- get(timeout=1) # 1s timeout
- get(timeout=None) # No timeout
- get() # Default timeout behavior, which may not be statically known at the method definition.
+ create(timeout=1) # 1s timeout
+ create(timeout=None) # No timeout
+ create() # Default timeout behavior
```
"""
@@ -141,13 +144,14 @@ def __repr__(self) -> str:
return "NOT_GIVEN"
-NotGivenOr = Union[_T, NotGiven]
+not_given = NotGiven()
+# for backwards compatibility:
NOT_GIVEN = NotGiven()
class Omit:
- """In certain situations you need to be able to represent a case where a default value has
- to be explicitly removed and `None` is not an appropriate substitute, for example:
+ """
+ To explicitly omit something from being sent in a request, use `omit`.
```py
# as the default `Content-Type` header is `application/json` that will be sent
@@ -157,8 +161,8 @@ class Omit:
# to look something like: 'multipart/form-data; boundary=0d8382fcf5f8c3be01ca2e11002d2983'
client.post(..., headers={"Content-Type": "multipart/form-data"})
- # instead you can remove the default `application/json` header by passing Omit
- client.post(..., headers={"Content-Type": Omit()})
+ # instead you can remove the default `application/json` header by passing omit
+ client.post(..., headers={"Content-Type": omit})
```
"""
@@ -166,6 +170,9 @@ def __bool__(self) -> Literal[False]:
return False
+omit = Omit()
+
+
@runtime_checkable
class ModelBuilderProtocol(Protocol):
@classmethod
diff --git a/src/finch/_utils/_transform.py b/src/finch/_utils/_transform.py
index c19124f0..52075492 100644
--- a/src/finch/_utils/_transform.py
+++ b/src/finch/_utils/_transform.py
@@ -268,7 +268,7 @@ def _transform_typeddict(
annotations = get_type_hints(expected_type, include_extras=True)
for key, value in data.items():
if not is_given(value):
- # we don't need to include `NotGiven` values here as they'll
+ # we don't need to include omitted values here as they'll
# be stripped out before the request is sent anyway
continue
@@ -434,7 +434,7 @@ async def _async_transform_typeddict(
annotations = get_type_hints(expected_type, include_extras=True)
for key, value in data.items():
if not is_given(value):
- # we don't need to include `NotGiven` values here as they'll
+ # we don't need to include omitted values here as they'll
# be stripped out before the request is sent anyway
continue
diff --git a/src/finch/_utils/_utils.py b/src/finch/_utils/_utils.py
index f0818595..50d59269 100644
--- a/src/finch/_utils/_utils.py
+++ b/src/finch/_utils/_utils.py
@@ -21,7 +21,7 @@
import sniffio
-from .._types import NotGiven, FileTypes, NotGivenOr, HeadersLike
+from .._types import Omit, NotGiven, FileTypes, HeadersLike
_T = TypeVar("_T")
_TupleT = TypeVar("_TupleT", bound=Tuple[object, ...])
@@ -63,7 +63,7 @@ def _extract_items(
try:
key = path[index]
except IndexError:
- if isinstance(obj, NotGiven):
+ if not is_given(obj):
# no value was provided - we can safely ignore
return []
@@ -126,8 +126,8 @@ def _extract_items(
return []
-def is_given(obj: NotGivenOr[_T]) -> TypeGuard[_T]:
- return not isinstance(obj, NotGiven)
+def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
+ return not isinstance(obj, NotGiven) and not isinstance(obj, Omit)
# Type safe methods for narrowing types with TypeVars.
diff --git a/src/finch/resources/access_tokens.py b/src/finch/resources/access_tokens.py
index 7a171237..39599bc9 100644
--- a/src/finch/resources/access_tokens.py
+++ b/src/finch/resources/access_tokens.py
@@ -6,7 +6,7 @@
from .. import _legacy_response
from ..types import access_token_create_params
-from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import is_given, maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@@ -41,15 +41,15 @@ def create(
self,
*,
code: str,
- client_id: str | NotGiven = NOT_GIVEN,
- client_secret: str | NotGiven = NOT_GIVEN,
- redirect_uri: str | NotGiven = NOT_GIVEN,
+ client_id: str | Omit = omit,
+ client_secret: str | Omit = omit,
+ redirect_uri: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CreateAccessTokenResponse:
"""
Exchange the authorization code for an access token
@@ -127,15 +127,15 @@ async def create(
self,
*,
code: str,
- client_id: str | NotGiven = NOT_GIVEN,
- client_secret: str | NotGiven = NOT_GIVEN,
- redirect_uri: str | NotGiven = NOT_GIVEN,
+ client_id: str | Omit = omit,
+ client_secret: str | Omit = omit,
+ redirect_uri: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CreateAccessTokenResponse:
"""
Exchange the authorization code for an access token
diff --git a/src/finch/resources/account.py b/src/finch/resources/account.py
index 7e5658fb..394a29e8 100644
--- a/src/finch/resources/account.py
+++ b/src/finch/resources/account.py
@@ -5,7 +5,7 @@
import httpx
from .. import _legacy_response
-from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from .._types import Body, Query, Headers, NotGiven, not_given
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
@@ -44,7 +44,7 @@ def disconnect(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DisconnectResponse:
"""Disconnect one or more `access_token`s from your application."""
return self._post(
@@ -63,7 +63,7 @@ def introspect(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Introspection:
"""Read account information associated with an `access_token`"""
return self._get(
@@ -103,7 +103,7 @@ async def disconnect(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DisconnectResponse:
"""Disconnect one or more `access_token`s from your application."""
return await self._post(
@@ -122,7 +122,7 @@ async def introspect(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Introspection:
"""Read account information associated with an `access_token`"""
return await self._get(
diff --git a/src/finch/resources/connect/sessions.py b/src/finch/resources/connect/sessions.py
index c88c3a67..574489a4 100644
--- a/src/finch/resources/connect/sessions.py
+++ b/src/finch/resources/connect/sessions.py
@@ -8,7 +8,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -60,18 +60,18 @@ def new(
"documents",
]
],
- customer_email: Optional[str] | NotGiven = NOT_GIVEN,
- integration: Optional[session_new_params.Integration] | NotGiven = NOT_GIVEN,
- manual: Optional[bool] | NotGiven = NOT_GIVEN,
- minutes_to_expire: Optional[float] | NotGiven = NOT_GIVEN,
- redirect_uri: Optional[str] | NotGiven = NOT_GIVEN,
- sandbox: Optional[Literal["finch", "provider"]] | NotGiven = NOT_GIVEN,
+ customer_email: Optional[str] | Omit = omit,
+ integration: Optional[session_new_params.Integration] | Omit = omit,
+ manual: Optional[bool] | Omit = omit,
+ minutes_to_expire: Optional[float] | Omit = omit,
+ redirect_uri: Optional[str] | Omit = omit,
+ sandbox: Optional[Literal["finch", "provider"]] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionNewResponse:
"""
Create a new connect session for an employer
@@ -114,7 +114,7 @@ def reauthenticate(
self,
*,
connection_id: str,
- minutes_to_expire: Optional[int] | NotGiven = NOT_GIVEN,
+ minutes_to_expire: Optional[int] | Omit = omit,
products: Optional[
List[
Literal[
@@ -131,14 +131,14 @@ def reauthenticate(
]
]
]
- | NotGiven = NOT_GIVEN,
- redirect_uri: Optional[str] | NotGiven = NOT_GIVEN,
+ | Omit = omit,
+ redirect_uri: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionReauthenticateResponse:
"""
Create a new Connect session for reauthenticating an existing connection
@@ -218,18 +218,18 @@ async def new(
"documents",
]
],
- customer_email: Optional[str] | NotGiven = NOT_GIVEN,
- integration: Optional[session_new_params.Integration] | NotGiven = NOT_GIVEN,
- manual: Optional[bool] | NotGiven = NOT_GIVEN,
- minutes_to_expire: Optional[float] | NotGiven = NOT_GIVEN,
- redirect_uri: Optional[str] | NotGiven = NOT_GIVEN,
- sandbox: Optional[Literal["finch", "provider"]] | NotGiven = NOT_GIVEN,
+ customer_email: Optional[str] | Omit = omit,
+ integration: Optional[session_new_params.Integration] | Omit = omit,
+ manual: Optional[bool] | Omit = omit,
+ minutes_to_expire: Optional[float] | Omit = omit,
+ redirect_uri: Optional[str] | Omit = omit,
+ sandbox: Optional[Literal["finch", "provider"]] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionNewResponse:
"""
Create a new connect session for an employer
@@ -272,7 +272,7 @@ async def reauthenticate(
self,
*,
connection_id: str,
- minutes_to_expire: Optional[int] | NotGiven = NOT_GIVEN,
+ minutes_to_expire: Optional[int] | Omit = omit,
products: Optional[
List[
Literal[
@@ -289,14 +289,14 @@ async def reauthenticate(
]
]
]
- | NotGiven = NOT_GIVEN,
- redirect_uri: Optional[str] | NotGiven = NOT_GIVEN,
+ | Omit = omit,
+ redirect_uri: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SessionReauthenticateResponse:
"""
Create a new Connect session for reauthenticating an existing connection
diff --git a/src/finch/resources/hris/benefits/benefits.py b/src/finch/resources/hris/benefits/benefits.py
index eecb7b7f..9ee6c3b0 100644
--- a/src/finch/resources/hris/benefits/benefits.py
+++ b/src/finch/resources/hris/benefits/benefits.py
@@ -7,7 +7,7 @@
import httpx
from .... import _legacy_response
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from .individuals import (
@@ -60,16 +60,16 @@ def with_streaming_response(self) -> BenefitsWithStreamingResponse:
def create(
self,
*,
- company_contribution: Optional[benefit_create_params.CompanyContribution] | NotGiven = NOT_GIVEN,
- description: str | NotGiven = NOT_GIVEN,
- frequency: Optional[BenefitFrequency] | NotGiven = NOT_GIVEN,
- type: Optional[BenefitType] | NotGiven = NOT_GIVEN,
+ company_contribution: Optional[benefit_create_params.CompanyContribution] | Omit = omit,
+ description: str | Omit = omit,
+ frequency: Optional[BenefitFrequency] | Omit = omit,
+ type: Optional[BenefitType] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CreateCompanyBenefitsResponse:
"""Creates a new company-wide deduction or contribution.
@@ -121,7 +121,7 @@ def retrieve(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CompanyBenefit:
"""
Lists deductions and contributions information for a given item
@@ -149,13 +149,13 @@ def update(
self,
benefit_id: str,
*,
- description: str | NotGiven = NOT_GIVEN,
+ description: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> UpdateCompanyBenefitResponse:
"""
Updates an existing company-wide deduction or contribution
@@ -190,7 +190,7 @@ def list(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[CompanyBenefit]:
"""List all company-wide deductions and contributions."""
return self._get_api_list(
@@ -210,7 +210,7 @@ def list_supported_benefits(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[SupportedBenefit]:
"""Get deductions metadata"""
return self._get_api_list(
@@ -250,16 +250,16 @@ def with_streaming_response(self) -> AsyncBenefitsWithStreamingResponse:
async def create(
self,
*,
- company_contribution: Optional[benefit_create_params.CompanyContribution] | NotGiven = NOT_GIVEN,
- description: str | NotGiven = NOT_GIVEN,
- frequency: Optional[BenefitFrequency] | NotGiven = NOT_GIVEN,
- type: Optional[BenefitType] | NotGiven = NOT_GIVEN,
+ company_contribution: Optional[benefit_create_params.CompanyContribution] | Omit = omit,
+ description: str | Omit = omit,
+ frequency: Optional[BenefitFrequency] | Omit = omit,
+ type: Optional[BenefitType] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CreateCompanyBenefitsResponse:
"""Creates a new company-wide deduction or contribution.
@@ -311,7 +311,7 @@ async def retrieve(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CompanyBenefit:
"""
Lists deductions and contributions information for a given item
@@ -339,13 +339,13 @@ async def update(
self,
benefit_id: str,
*,
- description: str | NotGiven = NOT_GIVEN,
+ description: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> UpdateCompanyBenefitResponse:
"""
Updates an existing company-wide deduction or contribution
@@ -380,7 +380,7 @@ def list(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[CompanyBenefit, AsyncSinglePage[CompanyBenefit]]:
"""List all company-wide deductions and contributions."""
return self._get_api_list(
@@ -400,7 +400,7 @@ def list_supported_benefits(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[SupportedBenefit, AsyncSinglePage[SupportedBenefit]]:
"""Get deductions metadata"""
return self._get_api_list(
diff --git a/src/finch/resources/hris/benefits/individuals.py b/src/finch/resources/hris/benefits/individuals.py
index f9662196..c8aedc9f 100644
--- a/src/finch/resources/hris/benefits/individuals.py
+++ b/src/finch/resources/hris/benefits/individuals.py
@@ -7,7 +7,7 @@
import httpx
from .... import _legacy_response
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
+from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -51,13 +51,13 @@ def enroll_many(
self,
benefit_id: str,
*,
- individuals: Iterable[individual_enroll_many_params.Individual] | NotGiven = NOT_GIVEN,
+ individuals: Iterable[individual_enroll_many_params.Individual] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> EnrolledIndividualBenefitResponse:
"""Enroll an individual into a deduction or contribution.
@@ -97,7 +97,7 @@ def enrolled_ids(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> IndividualEnrolledIDsResponse:
"""
Lists individuals currently enrolled in a given deduction.
@@ -125,13 +125,13 @@ def retrieve_many_benefits(
self,
benefit_id: str,
*,
- individual_ids: str | NotGiven = NOT_GIVEN,
+ individual_ids: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[IndividualBenefit]:
"""
Get enrollment information for the given individuals.
@@ -170,13 +170,13 @@ def unenroll_many(
self,
benefit_id: str,
*,
- individual_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
+ individual_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> UnenrolledIndividualBenefitResponse:
"""
Unenroll individuals from a deduction or contribution
@@ -230,13 +230,13 @@ async def enroll_many(
self,
benefit_id: str,
*,
- individuals: Iterable[individual_enroll_many_params.Individual] | NotGiven = NOT_GIVEN,
+ individuals: Iterable[individual_enroll_many_params.Individual] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> EnrolledIndividualBenefitResponse:
"""Enroll an individual into a deduction or contribution.
@@ -276,7 +276,7 @@ async def enrolled_ids(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> IndividualEnrolledIDsResponse:
"""
Lists individuals currently enrolled in a given deduction.
@@ -304,13 +304,13 @@ def retrieve_many_benefits(
self,
benefit_id: str,
*,
- individual_ids: str | NotGiven = NOT_GIVEN,
+ individual_ids: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[IndividualBenefit, AsyncSinglePage[IndividualBenefit]]:
"""
Get enrollment information for the given individuals.
@@ -349,13 +349,13 @@ async def unenroll_many(
self,
benefit_id: str,
*,
- individual_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
+ individual_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> UnenrolledIndividualBenefitResponse:
"""
Unenroll individuals from a deduction or contribution
diff --git a/src/finch/resources/hris/company/company.py b/src/finch/resources/hris/company/company.py
index c4b39f5b..62cd597c 100644
--- a/src/finch/resources/hris/company/company.py
+++ b/src/finch/resources/hris/company/company.py
@@ -5,7 +5,7 @@
import httpx
from .... import _legacy_response
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
@@ -55,7 +55,7 @@ def retrieve(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Company:
"""Read basic company data"""
return self._get(
@@ -99,7 +99,7 @@ async def retrieve(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Company:
"""Read basic company data"""
return await self._get(
diff --git a/src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py b/src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py
index 5ddda1bc..8a6ed278 100644
--- a/src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py
+++ b/src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py
@@ -17,7 +17,7 @@
RulesWithStreamingResponse,
AsyncRulesWithStreamingResponse,
)
-from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ....._utils import maybe_transform
from ....._compat import cached_property
from ....._resource import SyncAPIResource, AsyncAPIResource
@@ -57,18 +57,17 @@ def with_streaming_response(self) -> PayStatementItemWithStreamingResponse:
def list(
self,
*,
- categories: List[Literal["earnings", "taxes", "employee_deductions", "employer_contributions"]]
- | NotGiven = NOT_GIVEN,
- end_date: Union[str, date] | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
- start_date: Union[str, date] | NotGiven = NOT_GIVEN,
- type: str | NotGiven = NOT_GIVEN,
+ categories: List[Literal["earnings", "taxes", "employee_deductions", "employer_contributions"]] | Omit = omit,
+ end_date: Union[str, date] | Omit = omit,
+ name: str | Omit = omit,
+ start_date: Union[str, date] | Omit = omit,
+ type: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncResponsesPage[PayStatementItemListResponse]:
"""
**Beta:** this endpoint currently serves employers onboarded after March 4th and
@@ -147,18 +146,17 @@ def with_streaming_response(self) -> AsyncPayStatementItemWithStreamingResponse:
def list(
self,
*,
- categories: List[Literal["earnings", "taxes", "employee_deductions", "employer_contributions"]]
- | NotGiven = NOT_GIVEN,
- end_date: Union[str, date] | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
- start_date: Union[str, date] | NotGiven = NOT_GIVEN,
- type: str | NotGiven = NOT_GIVEN,
+ categories: List[Literal["earnings", "taxes", "employee_deductions", "employer_contributions"]] | Omit = omit,
+ end_date: Union[str, date] | Omit = omit,
+ name: str | Omit = omit,
+ start_date: Union[str, date] | Omit = omit,
+ type: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[PayStatementItemListResponse, AsyncResponsesPage[PayStatementItemListResponse]]:
"""
**Beta:** this endpoint currently serves employers onboarded after March 4th and
diff --git a/src/finch/resources/hris/company/pay_statement_item/rules.py b/src/finch/resources/hris/company/pay_statement_item/rules.py
index e85597be..d1c4e6f7 100644
--- a/src/finch/resources/hris/company/pay_statement_item/rules.py
+++ b/src/finch/resources/hris/company/pay_statement_item/rules.py
@@ -8,7 +8,7 @@
import httpx
from ..... import _legacy_response
-from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ....._utils import maybe_transform, async_maybe_transform
from ....._compat import cached_property
from ....._resource import SyncAPIResource, AsyncAPIResource
@@ -47,17 +47,17 @@ def with_streaming_response(self) -> RulesWithStreamingResponse:
def create(
self,
*,
- attributes: rule_create_params.Attributes | NotGiven = NOT_GIVEN,
- conditions: Iterable[rule_create_params.Condition] | NotGiven = NOT_GIVEN,
- effective_end_date: Optional[str] | NotGiven = NOT_GIVEN,
- effective_start_date: Optional[str] | NotGiven = NOT_GIVEN,
- entity_type: Literal["pay_statement_item"] | NotGiven = NOT_GIVEN,
+ attributes: rule_create_params.Attributes | Omit = omit,
+ conditions: Iterable[rule_create_params.Condition] | Omit = omit,
+ effective_end_date: Optional[str] | Omit = omit,
+ effective_start_date: Optional[str] | Omit = omit,
+ entity_type: Literal["pay_statement_item"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RuleCreateResponse:
"""
**Beta:** this endpoint currently serves employers onboarded after March 4th and
@@ -106,13 +106,13 @@ def update(
self,
rule_id: str,
*,
- optional_property: object | NotGiven = NOT_GIVEN,
+ optional_property: object | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RuleUpdateResponse:
"""
**Beta:** this endpoint currently serves employers onboarded after March 4th and
@@ -146,7 +146,7 @@ def list(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncResponsesPage[RuleListResponse]:
"""
**Beta:** this endpoint currently serves employers onboarded after March 4th and
@@ -170,7 +170,7 @@ def delete(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RuleDeleteResponse:
"""
**Beta:** this endpoint currently serves employers onboarded after March 4th and
@@ -219,17 +219,17 @@ def with_streaming_response(self) -> AsyncRulesWithStreamingResponse:
async def create(
self,
*,
- attributes: rule_create_params.Attributes | NotGiven = NOT_GIVEN,
- conditions: Iterable[rule_create_params.Condition] | NotGiven = NOT_GIVEN,
- effective_end_date: Optional[str] | NotGiven = NOT_GIVEN,
- effective_start_date: Optional[str] | NotGiven = NOT_GIVEN,
- entity_type: Literal["pay_statement_item"] | NotGiven = NOT_GIVEN,
+ attributes: rule_create_params.Attributes | Omit = omit,
+ conditions: Iterable[rule_create_params.Condition] | Omit = omit,
+ effective_end_date: Optional[str] | Omit = omit,
+ effective_start_date: Optional[str] | Omit = omit,
+ entity_type: Literal["pay_statement_item"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RuleCreateResponse:
"""
**Beta:** this endpoint currently serves employers onboarded after March 4th and
@@ -278,13 +278,13 @@ async def update(
self,
rule_id: str,
*,
- optional_property: object | NotGiven = NOT_GIVEN,
+ optional_property: object | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RuleUpdateResponse:
"""
**Beta:** this endpoint currently serves employers onboarded after March 4th and
@@ -320,7 +320,7 @@ def list(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[RuleListResponse, AsyncResponsesPage[RuleListResponse]]:
"""
**Beta:** this endpoint currently serves employers onboarded after March 4th and
@@ -344,7 +344,7 @@ async def delete(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RuleDeleteResponse:
"""
**Beta:** this endpoint currently serves employers onboarded after March 4th and
diff --git a/src/finch/resources/hris/directory.py b/src/finch/resources/hris/directory.py
index e4e6827e..68ed65f6 100644
--- a/src/finch/resources/hris/directory.py
+++ b/src/finch/resources/hris/directory.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -43,14 +43,14 @@ def with_streaming_response(self) -> DirectoryWithStreamingResponse:
def list(
self,
*,
- limit: int | NotGiven = NOT_GIVEN,
- offset: int | NotGiven = NOT_GIVEN,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncIndividualsPage[IndividualInDirectory]:
"""
Read company directory and organization structure
@@ -91,14 +91,14 @@ def list(
def list_individuals(
self,
*,
- limit: int | NotGiven = NOT_GIVEN,
- offset: int | NotGiven = NOT_GIVEN,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncIndividualsPage[IndividualInDirectory]:
"""
Read company directory and organization structure
@@ -149,14 +149,14 @@ def with_streaming_response(self) -> AsyncDirectoryWithStreamingResponse:
def list(
self,
*,
- limit: int | NotGiven = NOT_GIVEN,
- offset: int | NotGiven = NOT_GIVEN,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[IndividualInDirectory, AsyncIndividualsPage[IndividualInDirectory]]:
"""
Read company directory and organization structure
@@ -197,14 +197,14 @@ def list(
def list_individuals(
self,
*,
- limit: int | NotGiven = NOT_GIVEN,
- offset: int | NotGiven = NOT_GIVEN,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[IndividualInDirectory, AsyncIndividualsPage[IndividualInDirectory]]:
"""
Read company directory and organization structure
diff --git a/src/finch/resources/hris/documents.py b/src/finch/resources/hris/documents.py
index ce3085e8..08470d21 100644
--- a/src/finch/resources/hris/documents.py
+++ b/src/finch/resources/hris/documents.py
@@ -8,7 +8,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
+from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -44,16 +44,16 @@ def with_streaming_response(self) -> DocumentsWithStreamingResponse:
def list(
self,
*,
- individual_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
- limit: int | NotGiven = NOT_GIVEN,
- offset: int | NotGiven = NOT_GIVEN,
- types: List[Literal["w4_2020", "w4_2005"]] | NotGiven = NOT_GIVEN,
+ individual_ids: SequenceNotStr[str] | Omit = omit,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
+ types: List[Literal["w4_2020", "w4_2005"]] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DocumentListResponse:
"""**Beta:** This endpoint is in beta and may change.
@@ -108,7 +108,7 @@ def retreive(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DocumentRetreiveResponse:
"""**Beta:** This endpoint is in beta and may change.
@@ -163,16 +163,16 @@ def with_streaming_response(self) -> AsyncDocumentsWithStreamingResponse:
async def list(
self,
*,
- individual_ids: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
- limit: int | NotGiven = NOT_GIVEN,
- offset: int | NotGiven = NOT_GIVEN,
- types: List[Literal["w4_2020", "w4_2005"]] | NotGiven = NOT_GIVEN,
+ individual_ids: SequenceNotStr[str] | Omit = omit,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
+ types: List[Literal["w4_2020", "w4_2005"]] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DocumentListResponse:
"""**Beta:** This endpoint is in beta and may change.
@@ -227,7 +227,7 @@ async def retreive(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DocumentRetreiveResponse:
"""**Beta:** This endpoint is in beta and may change.
diff --git a/src/finch/resources/hris/employments.py b/src/finch/resources/hris/employments.py
index 14bdd1ad..957c70f5 100644
--- a/src/finch/resources/hris/employments.py
+++ b/src/finch/resources/hris/employments.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -49,7 +49,7 @@ def retrieve_many(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncResponsesPage[EmploymentDataResponse]:
"""
Read individual employment and income data
@@ -106,7 +106,7 @@ def retrieve_many(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[EmploymentDataResponse, AsyncResponsesPage[EmploymentDataResponse]]:
"""
Read individual employment and income data
diff --git a/src/finch/resources/hris/individuals.py b/src/finch/resources/hris/individuals.py
index 1d5e4aae..d6fdacf3 100644
--- a/src/finch/resources/hris/individuals.py
+++ b/src/finch/resources/hris/individuals.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -43,14 +43,14 @@ def with_streaming_response(self) -> IndividualsWithStreamingResponse:
def retrieve_many(
self,
*,
- options: Optional[individual_retrieve_many_params.Options] | NotGiven = NOT_GIVEN,
- requests: Iterable[individual_retrieve_many_params.Request] | NotGiven = NOT_GIVEN,
+ options: Optional[individual_retrieve_many_params.Options] | Omit = omit,
+ requests: Iterable[individual_retrieve_many_params.Request] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncResponsesPage[IndividualResponse]:
"""
Read individual data, excluding income and employment data
@@ -105,14 +105,14 @@ def with_streaming_response(self) -> AsyncIndividualsWithStreamingResponse:
def retrieve_many(
self,
*,
- options: Optional[individual_retrieve_many_params.Options] | NotGiven = NOT_GIVEN,
- requests: Iterable[individual_retrieve_many_params.Request] | NotGiven = NOT_GIVEN,
+ options: Optional[individual_retrieve_many_params.Options] | Omit = omit,
+ requests: Iterable[individual_retrieve_many_params.Request] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[IndividualResponse, AsyncResponsesPage[IndividualResponse]]:
"""
Read individual data, excluding income and employment data
diff --git a/src/finch/resources/hris/pay_statements.py b/src/finch/resources/hris/pay_statements.py
index a4d919b5..6bf92818 100644
--- a/src/finch/resources/hris/pay_statements.py
+++ b/src/finch/resources/hris/pay_statements.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -49,7 +49,7 @@ def retrieve_many(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncResponsesPage[PayStatementResponse]:
"""
Read detailed pay statements for each individual.
@@ -111,7 +111,7 @@ def retrieve_many(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[PayStatementResponse, AsyncResponsesPage[PayStatementResponse]]:
"""
Read detailed pay statements for each individual.
diff --git a/src/finch/resources/hris/payments.py b/src/finch/resources/hris/payments.py
index f9e2010b..0066cb77 100644
--- a/src/finch/resources/hris/payments.py
+++ b/src/finch/resources/hris/payments.py
@@ -8,7 +8,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -51,7 +51,7 @@ def list(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[Payment]:
"""
Read payroll and contractor related payments by the company.
@@ -121,7 +121,7 @@ def list(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Payment, AsyncSinglePage[Payment]]:
"""
Read payroll and contractor related payments by the company.
diff --git a/src/finch/resources/jobs/automated.py b/src/finch/resources/jobs/automated.py
index eb4e7ca9..4174c9fa 100644
--- a/src/finch/resources/jobs/automated.py
+++ b/src/finch/resources/jobs/automated.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import required_args, maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -51,7 +51,7 @@ def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomatedCreateResponse:
"""
Enqueue an automated job.
@@ -93,7 +93,7 @@ def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomatedCreateResponse:
"""
Enqueue an automated job.
@@ -129,13 +129,13 @@ def create(
self,
*,
type: Literal["data_sync_all"] | Literal["w4_form_employee_sync"],
- params: automated_create_params.W4FormEmployeeSyncParams | NotGiven = NOT_GIVEN,
+ params: automated_create_params.W4FormEmployeeSyncParams | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomatedCreateResponse:
return self._post(
"/jobs/automated",
@@ -156,13 +156,13 @@ def retrieve(
self,
job_id: str,
*,
- entity_id: str | NotGiven = NOT_GIVEN,
+ entity_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomatedAsyncJob:
"""
Get an automated job by `job_id`.
@@ -197,15 +197,15 @@ def retrieve(
def list(
self,
*,
- entity_id: str | NotGiven = NOT_GIVEN,
- limit: int | NotGiven = NOT_GIVEN,
- offset: int | NotGiven = NOT_GIVEN,
+ entity_id: str | Omit = omit,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomatedListResponse:
"""Get all automated jobs.
@@ -280,7 +280,7 @@ async def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomatedCreateResponse:
"""
Enqueue an automated job.
@@ -322,7 +322,7 @@ async def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomatedCreateResponse:
"""
Enqueue an automated job.
@@ -358,13 +358,13 @@ async def create(
self,
*,
type: Literal["data_sync_all"] | Literal["w4_form_employee_sync"],
- params: automated_create_params.W4FormEmployeeSyncParams | NotGiven = NOT_GIVEN,
+ params: automated_create_params.W4FormEmployeeSyncParams | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomatedCreateResponse:
return await self._post(
"/jobs/automated",
@@ -385,13 +385,13 @@ async def retrieve(
self,
job_id: str,
*,
- entity_id: str | NotGiven = NOT_GIVEN,
+ entity_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomatedAsyncJob:
"""
Get an automated job by `job_id`.
@@ -428,15 +428,15 @@ async def retrieve(
async def list(
self,
*,
- entity_id: str | NotGiven = NOT_GIVEN,
- limit: int | NotGiven = NOT_GIVEN,
- offset: int | NotGiven = NOT_GIVEN,
+ entity_id: str | Omit = omit,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AutomatedListResponse:
"""Get all automated jobs.
diff --git a/src/finch/resources/jobs/manual.py b/src/finch/resources/jobs/manual.py
index de9a8413..94a5d71a 100644
--- a/src/finch/resources/jobs/manual.py
+++ b/src/finch/resources/jobs/manual.py
@@ -5,7 +5,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -41,13 +41,13 @@ def retrieve(
self,
job_id: str,
*,
- entity_id: str | NotGiven = NOT_GIVEN,
+ entity_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ManualAsyncJob:
"""Get a manual job by `job_id`.
@@ -106,13 +106,13 @@ async def retrieve(
self,
job_id: str,
*,
- entity_id: str | NotGiven = NOT_GIVEN,
+ entity_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ManualAsyncJob:
"""Get a manual job by `job_id`.
diff --git a/src/finch/resources/payroll/pay_groups.py b/src/finch/resources/payroll/pay_groups.py
index da646900..dffc9d39 100644
--- a/src/finch/resources/payroll/pay_groups.py
+++ b/src/finch/resources/payroll/pay_groups.py
@@ -5,7 +5,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
+from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -48,7 +48,7 @@ def retrieve(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PayGroupRetrieveResponse:
"""
Read information from a single pay group
@@ -75,14 +75,14 @@ def retrieve(
def list(
self,
*,
- individual_id: str | NotGiven = NOT_GIVEN,
- pay_frequencies: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
+ individual_id: str | Omit = omit,
+ pay_frequencies: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[PayGroupListResponse]:
"""
Read company pay groups and frequencies
@@ -145,7 +145,7 @@ async def retrieve(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PayGroupRetrieveResponse:
"""
Read information from a single pay group
@@ -172,14 +172,14 @@ async def retrieve(
def list(
self,
*,
- individual_id: str | NotGiven = NOT_GIVEN,
- pay_frequencies: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
+ individual_id: str | Omit = omit,
+ pay_frequencies: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[PayGroupListResponse, AsyncSinglePage[PayGroupListResponse]]:
"""
Read company pay groups and frequencies
diff --git a/src/finch/resources/providers.py b/src/finch/resources/providers.py
index 76fc8852..b58f286f 100644
--- a/src/finch/resources/providers.py
+++ b/src/finch/resources/providers.py
@@ -5,7 +5,7 @@
import httpx
from .. import _legacy_response
-from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from .._types import Body, Query, Headers, NotGiven, not_given
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
@@ -44,7 +44,7 @@ def list(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[Provider]:
"""Return details on all available payroll and HR systems."""
return self._get_api_list(
@@ -85,7 +85,7 @@ def list(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Provider, AsyncSinglePage[Provider]]:
"""Return details on all available payroll and HR systems."""
return self._get_api_list(
diff --git a/src/finch/resources/request_forwarding.py b/src/finch/resources/request_forwarding.py
index 619d784b..4c928078 100644
--- a/src/finch/resources/request_forwarding.py
+++ b/src/finch/resources/request_forwarding.py
@@ -8,7 +8,7 @@
from .. import _legacy_response
from ..types import request_forwarding_forward_params
-from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@@ -44,15 +44,15 @@ def forward(
*,
method: str,
route: str,
- data: Optional[str] | NotGiven = NOT_GIVEN,
- headers: Optional[object] | NotGiven = NOT_GIVEN,
- params: Optional[object] | NotGiven = NOT_GIVEN,
+ data: Optional[str] | Omit = omit,
+ headers: Optional[object] | Omit = omit,
+ params: Optional[object] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RequestForwardingForwardResponse:
"""The Forward API allows you to make direct requests to an employment system.
@@ -131,15 +131,15 @@ async def forward(
*,
method: str,
route: str,
- data: Optional[str] | NotGiven = NOT_GIVEN,
- headers: Optional[object] | NotGiven = NOT_GIVEN,
- params: Optional[object] | NotGiven = NOT_GIVEN,
+ data: Optional[str] | Omit = omit,
+ headers: Optional[object] | Omit = omit,
+ params: Optional[object] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RequestForwardingForwardResponse:
"""The Forward API allows you to make direct requests to an employment system.
diff --git a/src/finch/resources/sandbox/company.py b/src/finch/resources/sandbox/company.py
index 9b76b1c0..45c87dc9 100644
--- a/src/finch/resources/sandbox/company.py
+++ b/src/finch/resources/sandbox/company.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -56,7 +56,7 @@ def update(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CompanyUpdateResponse:
"""
Update a sandbox company's data
@@ -143,7 +143,7 @@ async def update(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CompanyUpdateResponse:
"""
Update a sandbox company's data
diff --git a/src/finch/resources/sandbox/connections/accounts.py b/src/finch/resources/sandbox/connections/accounts.py
index 956cd971..e38e2a2d 100644
--- a/src/finch/resources/sandbox/connections/accounts.py
+++ b/src/finch/resources/sandbox/connections/accounts.py
@@ -7,7 +7,7 @@
import httpx
from .... import _legacy_response
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
+from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -46,14 +46,14 @@ def create(
*,
company_id: str,
provider_id: str,
- authentication_type: Literal["credential", "api_token", "oauth", "assisted"] | NotGiven = NOT_GIVEN,
- products: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
+ authentication_type: Literal["credential", "api_token", "oauth", "assisted"] | Omit = omit,
+ products: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AccountCreateResponse:
"""
Create a new account for an existing connection (company/provider pair)
@@ -92,13 +92,13 @@ def create(
def update(
self,
*,
- connection_status: ConnectionStatusType | NotGiven = NOT_GIVEN,
+ connection_status: ConnectionStatusType | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AccountUpdateResponse:
"""Update an existing sandbox account.
@@ -149,14 +149,14 @@ async def create(
*,
company_id: str,
provider_id: str,
- authentication_type: Literal["credential", "api_token", "oauth", "assisted"] | NotGiven = NOT_GIVEN,
- products: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
+ authentication_type: Literal["credential", "api_token", "oauth", "assisted"] | Omit = omit,
+ products: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AccountCreateResponse:
"""
Create a new account for an existing connection (company/provider pair)
@@ -195,13 +195,13 @@ async def create(
async def update(
self,
*,
- connection_status: ConnectionStatusType | NotGiven = NOT_GIVEN,
+ connection_status: ConnectionStatusType | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AccountUpdateResponse:
"""Update an existing sandbox account.
diff --git a/src/finch/resources/sandbox/connections/connections.py b/src/finch/resources/sandbox/connections/connections.py
index 146e6739..c4c35dc3 100644
--- a/src/finch/resources/sandbox/connections/connections.py
+++ b/src/finch/resources/sandbox/connections/connections.py
@@ -15,7 +15,7 @@
AccountsWithStreamingResponse,
AsyncAccountsWithStreamingResponse,
)
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
+from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -55,15 +55,15 @@ def create(
self,
*,
provider_id: str,
- authentication_type: Literal["credential", "api_token", "oauth", "assisted"] | NotGiven = NOT_GIVEN,
- employee_size: int | NotGiven = NOT_GIVEN,
- products: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
+ authentication_type: Literal["credential", "api_token", "oauth", "assisted"] | Omit = omit,
+ employee_size: int | Omit = omit,
+ products: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ConnectionCreateResponse:
"""
Create a new connection (new company/provider pair) with a new account
@@ -129,15 +129,15 @@ async def create(
self,
*,
provider_id: str,
- authentication_type: Literal["credential", "api_token", "oauth", "assisted"] | NotGiven = NOT_GIVEN,
- employee_size: int | NotGiven = NOT_GIVEN,
- products: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
+ authentication_type: Literal["credential", "api_token", "oauth", "assisted"] | Omit = omit,
+ employee_size: int | Omit = omit,
+ products: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ConnectionCreateResponse:
"""
Create a new connection (new company/provider pair) with a new account
diff --git a/src/finch/resources/sandbox/directory.py b/src/finch/resources/sandbox/directory.py
index 4d3378ca..2afba6a5 100644
--- a/src/finch/resources/sandbox/directory.py
+++ b/src/finch/resources/sandbox/directory.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -42,13 +42,13 @@ def with_streaming_response(self) -> DirectoryWithStreamingResponse:
def create(
self,
*,
- body: Iterable[directory_create_params.Body] | NotGiven = NOT_GIVEN,
+ body: Iterable[directory_create_params.Body] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DirectoryCreateResponse:
"""
Add new individuals to a sandbox company
@@ -98,13 +98,13 @@ def with_streaming_response(self) -> AsyncDirectoryWithStreamingResponse:
async def create(
self,
*,
- body: Iterable[directory_create_params.Body] | NotGiven = NOT_GIVEN,
+ body: Iterable[directory_create_params.Body] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DirectoryCreateResponse:
"""
Add new individuals to a sandbox company
diff --git a/src/finch/resources/sandbox/employment.py b/src/finch/resources/sandbox/employment.py
index 56d44d15..55bd7581 100644
--- a/src/finch/resources/sandbox/employment.py
+++ b/src/finch/resources/sandbox/employment.py
@@ -8,7 +8,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -46,33 +46,33 @@ def update(
self,
individual_id: str,
*,
- class_code: Optional[str] | NotGiven = NOT_GIVEN,
- custom_fields: Optional[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,
+ class_code: Optional[str] | Omit = omit,
+ custom_fields: Optional[Iterable[employment_update_params.CustomField]] | Omit = omit,
+ department: Optional[employment_update_params.Department] | Omit = omit,
+ employment: Optional[employment_update_params.Employment] | Omit = omit,
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,
- income_history: Optional[Iterable[Optional[IncomeParam]]] | NotGiven = NOT_GIVEN,
- is_active: Optional[bool] | NotGiven = NOT_GIVEN,
- last_name: Optional[str] | NotGiven = NOT_GIVEN,
- latest_rehire_date: Optional[str] | NotGiven = NOT_GIVEN,
- location: Optional[LocationParam] | NotGiven = NOT_GIVEN,
- manager: Optional[employment_update_params.Manager] | NotGiven = NOT_GIVEN,
- middle_name: Optional[str] | NotGiven = NOT_GIVEN,
- source_id: Optional[str] | NotGiven = NOT_GIVEN,
- start_date: Optional[str] | NotGiven = NOT_GIVEN,
- title: Optional[str] | NotGiven = NOT_GIVEN,
+ | Omit = omit,
+ end_date: Optional[str] | Omit = omit,
+ first_name: Optional[str] | Omit = omit,
+ income: Optional[IncomeParam] | Omit = omit,
+ income_history: Optional[Iterable[Optional[IncomeParam]]] | Omit = omit,
+ is_active: Optional[bool] | Omit = omit,
+ last_name: Optional[str] | Omit = omit,
+ latest_rehire_date: Optional[str] | Omit = omit,
+ location: Optional[LocationParam] | Omit = omit,
+ manager: Optional[employment_update_params.Manager] | Omit = omit,
+ middle_name: Optional[str] | Omit = omit,
+ source_id: Optional[str] | Omit = omit,
+ start_date: Optional[str] | Omit = omit,
+ title: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> EmploymentUpdateResponse:
"""
Update sandbox employment
@@ -179,33 +179,33 @@ async def update(
self,
individual_id: str,
*,
- class_code: Optional[str] | NotGiven = NOT_GIVEN,
- custom_fields: Optional[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,
+ class_code: Optional[str] | Omit = omit,
+ custom_fields: Optional[Iterable[employment_update_params.CustomField]] | Omit = omit,
+ department: Optional[employment_update_params.Department] | Omit = omit,
+ employment: Optional[employment_update_params.Employment] | Omit = omit,
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,
- income_history: Optional[Iterable[Optional[IncomeParam]]] | NotGiven = NOT_GIVEN,
- is_active: Optional[bool] | NotGiven = NOT_GIVEN,
- last_name: Optional[str] | NotGiven = NOT_GIVEN,
- latest_rehire_date: Optional[str] | NotGiven = NOT_GIVEN,
- location: Optional[LocationParam] | NotGiven = NOT_GIVEN,
- manager: Optional[employment_update_params.Manager] | NotGiven = NOT_GIVEN,
- middle_name: Optional[str] | NotGiven = NOT_GIVEN,
- source_id: Optional[str] | NotGiven = NOT_GIVEN,
- start_date: Optional[str] | NotGiven = NOT_GIVEN,
- title: Optional[str] | NotGiven = NOT_GIVEN,
+ | Omit = omit,
+ end_date: Optional[str] | Omit = omit,
+ first_name: Optional[str] | Omit = omit,
+ income: Optional[IncomeParam] | Omit = omit,
+ income_history: Optional[Iterable[Optional[IncomeParam]]] | Omit = omit,
+ is_active: Optional[bool] | Omit = omit,
+ last_name: Optional[str] | Omit = omit,
+ latest_rehire_date: Optional[str] | Omit = omit,
+ location: Optional[LocationParam] | Omit = omit,
+ manager: Optional[employment_update_params.Manager] | Omit = omit,
+ middle_name: Optional[str] | Omit = omit,
+ source_id: Optional[str] | Omit = omit,
+ start_date: Optional[str] | Omit = omit,
+ title: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> EmploymentUpdateResponse:
"""
Update sandbox employment
diff --git a/src/finch/resources/sandbox/individual.py b/src/finch/resources/sandbox/individual.py
index fdd077b8..5b9041c0 100644
--- a/src/finch/resources/sandbox/individual.py
+++ b/src/finch/resources/sandbox/individual.py
@@ -8,7 +8,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -45,9 +45,9 @@ def update(
self,
individual_id: str,
*,
- dob: Optional[str] | NotGiven = NOT_GIVEN,
- emails: Optional[Iterable[individual_update_params.Email]] | NotGiven = NOT_GIVEN,
- encrypted_ssn: Optional[str] | NotGiven = NOT_GIVEN,
+ dob: Optional[str] | Omit = omit,
+ emails: Optional[Iterable[individual_update_params.Email]] | Omit = omit,
+ encrypted_ssn: Optional[str] | Omit = omit,
ethnicity: Optional[
Literal[
"asian",
@@ -60,21 +60,21 @@ def update(
"decline_to_specify",
]
]
- | NotGiven = NOT_GIVEN,
- first_name: Optional[str] | NotGiven = NOT_GIVEN,
- gender: Optional[Literal["female", "male", "other", "decline_to_specify"]] | NotGiven = NOT_GIVEN,
- last_name: Optional[str] | NotGiven = NOT_GIVEN,
- middle_name: Optional[str] | NotGiven = NOT_GIVEN,
- phone_numbers: Optional[Iterable[Optional[individual_update_params.PhoneNumber]]] | NotGiven = NOT_GIVEN,
- preferred_name: Optional[str] | NotGiven = NOT_GIVEN,
- residence: Optional[LocationParam] | NotGiven = NOT_GIVEN,
- ssn: Optional[str] | NotGiven = NOT_GIVEN,
+ | Omit = omit,
+ first_name: Optional[str] | Omit = omit,
+ gender: Optional[Literal["female", "male", "other", "decline_to_specify"]] | Omit = omit,
+ last_name: Optional[str] | Omit = omit,
+ middle_name: Optional[str] | Omit = omit,
+ phone_numbers: Optional[Iterable[Optional[individual_update_params.PhoneNumber]]] | Omit = omit,
+ preferred_name: Optional[str] | Omit = omit,
+ residence: Optional[LocationParam] | Omit = omit,
+ ssn: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> IndividualUpdateResponse:
"""
Update sandbox individual
@@ -163,9 +163,9 @@ async def update(
self,
individual_id: str,
*,
- dob: Optional[str] | NotGiven = NOT_GIVEN,
- emails: Optional[Iterable[individual_update_params.Email]] | NotGiven = NOT_GIVEN,
- encrypted_ssn: Optional[str] | NotGiven = NOT_GIVEN,
+ dob: Optional[str] | Omit = omit,
+ emails: Optional[Iterable[individual_update_params.Email]] | Omit = omit,
+ encrypted_ssn: Optional[str] | Omit = omit,
ethnicity: Optional[
Literal[
"asian",
@@ -178,21 +178,21 @@ async def update(
"decline_to_specify",
]
]
- | NotGiven = NOT_GIVEN,
- first_name: Optional[str] | NotGiven = NOT_GIVEN,
- gender: Optional[Literal["female", "male", "other", "decline_to_specify"]] | NotGiven = NOT_GIVEN,
- last_name: Optional[str] | NotGiven = NOT_GIVEN,
- middle_name: Optional[str] | NotGiven = NOT_GIVEN,
- phone_numbers: Optional[Iterable[Optional[individual_update_params.PhoneNumber]]] | NotGiven = NOT_GIVEN,
- preferred_name: Optional[str] | NotGiven = NOT_GIVEN,
- residence: Optional[LocationParam] | NotGiven = NOT_GIVEN,
- ssn: Optional[str] | NotGiven = NOT_GIVEN,
+ | Omit = omit,
+ first_name: Optional[str] | Omit = omit,
+ gender: Optional[Literal["female", "male", "other", "decline_to_specify"]] | Omit = omit,
+ last_name: Optional[str] | Omit = omit,
+ middle_name: Optional[str] | Omit = omit,
+ phone_numbers: Optional[Iterable[Optional[individual_update_params.PhoneNumber]]] | Omit = omit,
+ preferred_name: Optional[str] | Omit = omit,
+ residence: Optional[LocationParam] | Omit = omit,
+ ssn: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> IndividualUpdateResponse:
"""
Update sandbox individual
diff --git a/src/finch/resources/sandbox/jobs/configuration.py b/src/finch/resources/sandbox/jobs/configuration.py
index 3fac04cf..f8839411 100644
--- a/src/finch/resources/sandbox/jobs/configuration.py
+++ b/src/finch/resources/sandbox/jobs/configuration.py
@@ -7,7 +7,7 @@
import httpx
from .... import _legacy_response
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -48,7 +48,7 @@ def retrieve(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ConfigurationRetrieveResponse:
"""Get configurations for sandbox jobs"""
return self._get(
@@ -69,7 +69,7 @@ def update(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SandboxJobConfiguration:
"""
Update configurations for sandbox jobs
@@ -127,7 +127,7 @@ async def retrieve(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ConfigurationRetrieveResponse:
"""Get configurations for sandbox jobs"""
return await self._get(
@@ -148,7 +148,7 @@ async def update(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SandboxJobConfiguration:
"""
Update configurations for sandbox jobs
diff --git a/src/finch/resources/sandbox/jobs/jobs.py b/src/finch/resources/sandbox/jobs/jobs.py
index 38abe210..070bd293 100644
--- a/src/finch/resources/sandbox/jobs/jobs.py
+++ b/src/finch/resources/sandbox/jobs/jobs.py
@@ -7,7 +7,7 @@
import httpx
from .... import _legacy_response
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ...._types import Body, Query, Headers, NotGiven, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -60,7 +60,7 @@ def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> JobCreateResponse:
"""Enqueue a new sandbox job
@@ -120,7 +120,7 @@ async def create(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> JobCreateResponse:
"""Enqueue a new sandbox job
diff --git a/src/finch/resources/sandbox/payment.py b/src/finch/resources/sandbox/payment.py
index dc2ec15e..2506f49d 100644
--- a/src/finch/resources/sandbox/payment.py
+++ b/src/finch/resources/sandbox/payment.py
@@ -8,7 +8,7 @@
import httpx
from ... import _legacy_response
-from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -43,15 +43,15 @@ def with_streaming_response(self) -> PaymentWithStreamingResponse:
def create(
self,
*,
- end_date: Union[str, date] | NotGiven = NOT_GIVEN,
- pay_statements: Iterable[payment_create_params.PayStatement] | NotGiven = NOT_GIVEN,
- start_date: Union[str, date] | NotGiven = NOT_GIVEN,
+ end_date: Union[str, date] | Omit = omit,
+ pay_statements: Iterable[payment_create_params.PayStatement] | Omit = omit,
+ start_date: Union[str, date] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PaymentCreateResponse:
"""
Add a new sandbox payment
@@ -107,15 +107,15 @@ def with_streaming_response(self) -> AsyncPaymentWithStreamingResponse:
async def create(
self,
*,
- end_date: Union[str, date] | NotGiven = NOT_GIVEN,
- pay_statements: Iterable[payment_create_params.PayStatement] | NotGiven = NOT_GIVEN,
- start_date: Union[str, date] | NotGiven = NOT_GIVEN,
+ end_date: Union[str, date] | Omit = omit,
+ pay_statements: Iterable[payment_create_params.PayStatement] | Omit = omit,
+ start_date: Union[str, date] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> PaymentCreateResponse:
"""
Add a new sandbox payment
diff --git a/tests/test_transform.py b/tests/test_transform.py
index 916fd75c..223fa54c 100644
--- a/tests/test_transform.py
+++ b/tests/test_transform.py
@@ -8,7 +8,7 @@
import pytest
-from finch._types import NOT_GIVEN, Base64FileInput
+from finch._types import Base64FileInput, omit, not_given
from finch._utils import (
PropertyInfo,
transform as _transform,
@@ -450,4 +450,11 @@ async def test_transform_skipping(use_async: bool) -> None:
@pytest.mark.asyncio
async def test_strips_notgiven(use_async: bool) -> None:
assert await transform({"foo_bar": "bar"}, Foo1, use_async) == {"fooBar": "bar"}
- assert await transform({"foo_bar": NOT_GIVEN}, Foo1, use_async) == {}
+ assert await transform({"foo_bar": not_given}, Foo1, use_async) == {}
+
+
+@parametrize
+@pytest.mark.asyncio
+async def test_strips_omit(use_async: bool) -> None:
+ assert await transform({"foo_bar": "bar"}, Foo1, use_async) == {"fooBar": "bar"}
+ assert await transform({"foo_bar": omit}, Foo1, use_async) == {}
From d9ac7edae7fdda865513b488caa03bd305b29b58 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 19 Sep 2025 17:44:37 +0000
Subject: [PATCH 03/20] chore: do not install brew dependencies in
./scripts/bootstrap by default
---
scripts/bootstrap | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/scripts/bootstrap b/scripts/bootstrap
index e84fe62c..b430fee3 100755
--- a/scripts/bootstrap
+++ b/scripts/bootstrap
@@ -4,10 +4,18 @@ set -e
cd "$(dirname "$0")/.."
-if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
+if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
- echo "==> Installing Homebrew dependencies…"
- brew bundle
+ echo -n "==> Install Homebrew dependencies? (y/N): "
+ read -r response
+ case "$response" in
+ [yY][eE][sS]|[yY])
+ brew bundle
+ ;;
+ *)
+ ;;
+ esac
+ echo
}
fi
From 4caed43e21742d513d616a64522b71011d4cd8e5 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 23 Sep 2025 17:34:19 +0000
Subject: [PATCH 04/20] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 496cf9a0..f6fac549 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bb50c0ae41ff5036adf72344d33057941f6de67c5fae811eba2e758bfa4ffd31.yml
-openapi_spec_hash: 1b21e4bfc46daeef1613e410e5aa8f28
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-4e3b71a8de554d0df7c2f1dd986d49bc16f3462f50df16986a810d3691a8f734.yml
+openapi_spec_hash: fb3607635c664f6319b4a9cf2ea4a2b5
config_hash: 6d3585c0032e08d723d077d660fc8448
From 2d12ad9207864192d9166bdf21d61effeabc6ae9 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 24 Sep 2025 10:08:11 +0000
Subject: [PATCH 05/20] fix(compat): compat with `pydantic<2.8.0` when using
additional fields
---
src/finch/types/hris/benefits_support.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/finch/types/hris/benefits_support.py b/src/finch/types/hris/benefits_support.py
index 99160dd4..9b443bc8 100644
--- a/src/finch/types/hris/benefits_support.py
+++ b/src/finch/types/hris/benefits_support.py
@@ -35,9 +35,14 @@ class BenefitsSupport(BaseModel):
simple_ira: Optional[BenefitFeaturesAndOperations] = None
- __pydantic_extra__: Dict[str, Optional[BenefitFeaturesAndOperations]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, Optional[BenefitFeaturesAndOperations]] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
# `getattr(obj, '$type')`
def __getattr__(self, attr: str) -> Optional[BenefitFeaturesAndOperations]: ...
+ else:
+ __pydantic_extra__: Dict[str, Optional[BenefitFeaturesAndOperations]]
From 17a064ac0398ab7f1cfc5ccdbd40002d70b677b4 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 26 Sep 2025 16:29:33 +0000
Subject: [PATCH 06/20] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index f6fac549..8ccb9245 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-4e3b71a8de554d0df7c2f1dd986d49bc16f3462f50df16986a810d3691a8f734.yml
-openapi_spec_hash: fb3607635c664f6319b4a9cf2ea4a2b5
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-1066fa342808844922c79f57fea5676ba822a7ff57f2143efa70bbadf5ed6428.yml
+openapi_spec_hash: 794703adc5978c044203ee5b1a9eb4f0
config_hash: 6d3585c0032e08d723d077d660fc8448
From e014b8be6ee16d732b597dd93bcd5f0573c87254 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 26 Sep 2025 20:47:22 +0000
Subject: [PATCH 07/20] feat(api): api update
---
.stats.yml | 4 +-
api.md | 4 +-
src/finch/resources/providers.py | 14 +-
src/finch/resources/request_forwarding.py | 10 +-
src/finch/types/__init__.py | 2 +-
src/finch/types/provider.py | 449 ------------------
src/finch/types/provider_list_response.py | 55 +++
.../request_forwarding_forward_params.py | 6 +-
.../request_forwarding_forward_response.py | 54 +--
tests/api_resources/test_providers.py | 14 +-
.../api_resources/test_request_forwarding.py | 50 +-
11 files changed, 126 insertions(+), 536 deletions(-)
delete mode 100644 src/finch/types/provider.py
create mode 100644 src/finch/types/provider_list_response.py
diff --git a/.stats.yml b/.stats.yml
index 8ccb9245..40205901 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-1066fa342808844922c79f57fea5676ba822a7ff57f2143efa70bbadf5ed6428.yml
-openapi_spec_hash: 794703adc5978c044203ee5b1a9eb4f0
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-fd18483a409117a70113398a50c7ff8bde92455d830e8027f2c2e3cc7a9c67ac.yml
+openapi_spec_hash: cb88f02495e1cfd2d73d2f9e3728205d
config_hash: 6d3585c0032e08d723d077d660fc8448
diff --git a/api.md b/api.md
index 8dad5c14..423479be 100644
--- a/api.md
+++ b/api.md
@@ -212,12 +212,12 @@ Methods:
Types:
```python
-from finch.types import Provider
+from finch.types import Provider, ProviderListResponse
```
Methods:
-- client.providers.list() -> SyncSinglePage[Provider]
+- client.providers.list() -> SyncSinglePage[ProviderListResponse]
# Account
diff --git a/src/finch/resources/providers.py b/src/finch/resources/providers.py
index b58f286f..9fc6fad3 100644
--- a/src/finch/resources/providers.py
+++ b/src/finch/resources/providers.py
@@ -11,7 +11,7 @@
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ..pagination import SyncSinglePage, AsyncSinglePage
from .._base_client import AsyncPaginator, make_request_options
-from ..types.provider import Provider
+from ..types.provider_list_response import ProviderListResponse
__all__ = ["Providers", "AsyncProviders"]
@@ -45,15 +45,15 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SyncSinglePage[Provider]:
+ ) -> SyncSinglePage[ProviderListResponse]:
"""Return details on all available payroll and HR systems."""
return self._get_api_list(
"/providers",
- page=SyncSinglePage[Provider],
+ page=SyncSinglePage[ProviderListResponse],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=Provider,
+ model=ProviderListResponse,
)
@@ -86,15 +86,15 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AsyncPaginator[Provider, AsyncSinglePage[Provider]]:
+ ) -> AsyncPaginator[ProviderListResponse, AsyncSinglePage[ProviderListResponse]]:
"""Return details on all available payroll and HR systems."""
return self._get_api_list(
"/providers",
- page=AsyncSinglePage[Provider],
+ page=AsyncSinglePage[ProviderListResponse],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=Provider,
+ model=ProviderListResponse,
)
diff --git a/src/finch/resources/request_forwarding.py b/src/finch/resources/request_forwarding.py
index 4c928078..62e2a25e 100644
--- a/src/finch/resources/request_forwarding.py
+++ b/src/finch/resources/request_forwarding.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Optional
+from typing import Dict, Optional
import httpx
@@ -45,8 +45,8 @@ def forward(
method: str,
route: str,
data: Optional[str] | Omit = omit,
- headers: Optional[object] | Omit = omit,
- params: Optional[object] | Omit = omit,
+ headers: Optional[Dict[str, Optional[object]]] | Omit = omit,
+ params: Optional[Dict[str, Optional[object]]] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -132,8 +132,8 @@ async def forward(
method: str,
route: str,
data: Optional[str] | Omit = omit,
- headers: Optional[object] | Omit = omit,
- params: Optional[object] | Omit = omit,
+ headers: Optional[Dict[str, Optional[object]]] | Omit = omit,
+ params: Optional[Dict[str, Optional[object]]] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/finch/types/__init__.py b/src/finch/types/__init__.py
index 14bf231d..4981087b 100644
--- a/src/finch/types/__init__.py
+++ b/src/finch/types/__init__.py
@@ -11,7 +11,6 @@
OperationSupportMatrix as OperationSupportMatrix,
)
from .location import Location as Location
-from .provider import Provider as Provider
from .income_param import IncomeParam as IncomeParam
from .company_event import CompanyEvent as CompanyEvent
from .introspection import Introspection as Introspection
@@ -26,6 +25,7 @@
from .pay_statement_event import PayStatementEvent as PayStatementEvent
from .account_update_event import AccountUpdateEvent as AccountUpdateEvent
from .job_completion_event import JobCompletionEvent as JobCompletionEvent
+from .provider_list_response import ProviderListResponse as ProviderListResponse
from .access_token_create_params import AccessTokenCreateParams as AccessTokenCreateParams
from .create_access_token_response import CreateAccessTokenResponse as CreateAccessTokenResponse
from .request_forwarding_forward_params import RequestForwardingForwardParams as RequestForwardingForwardParams
diff --git a/src/finch/types/provider.py b/src/finch/types/provider.py
deleted file mode 100644
index b7051379..00000000
--- a/src/finch/types/provider.py
+++ /dev/null
@@ -1,449 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import List, Optional
-from typing_extensions import Literal
-
-from .._models import BaseModel
-from .hris.benefits_support import BenefitsSupport
-
-__all__ = [
- "Provider",
- "AuthenticationMethod",
- "AuthenticationMethodSupportedFields",
- "AuthenticationMethodSupportedFieldsCompany",
- "AuthenticationMethodSupportedFieldsCompanyAccounts",
- "AuthenticationMethodSupportedFieldsCompanyDepartments",
- "AuthenticationMethodSupportedFieldsCompanyDepartmentsParent",
- "AuthenticationMethodSupportedFieldsCompanyEntity",
- "AuthenticationMethodSupportedFieldsCompanyLocations",
- "AuthenticationMethodSupportedFieldsDirectory",
- "AuthenticationMethodSupportedFieldsDirectoryIndividuals",
- "AuthenticationMethodSupportedFieldsDirectoryIndividualsManager",
- "AuthenticationMethodSupportedFieldsDirectoryPaging",
- "AuthenticationMethodSupportedFieldsEmployment",
- "AuthenticationMethodSupportedFieldsEmploymentDepartment",
- "AuthenticationMethodSupportedFieldsEmploymentEmployment",
- "AuthenticationMethodSupportedFieldsEmploymentIncome",
- "AuthenticationMethodSupportedFieldsEmploymentLocation",
- "AuthenticationMethodSupportedFieldsEmploymentManager",
- "AuthenticationMethodSupportedFieldsIndividual",
- "AuthenticationMethodSupportedFieldsIndividualEmails",
- "AuthenticationMethodSupportedFieldsIndividualPhoneNumbers",
- "AuthenticationMethodSupportedFieldsIndividualResidence",
- "AuthenticationMethodSupportedFieldsPayGroup",
- "AuthenticationMethodSupportedFieldsPayStatement",
- "AuthenticationMethodSupportedFieldsPayStatementPaging",
- "AuthenticationMethodSupportedFieldsPayStatementPayStatements",
- "AuthenticationMethodSupportedFieldsPayStatementPayStatementsEarnings",
- "AuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployeeDeductions",
- "AuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployerContributions",
- "AuthenticationMethodSupportedFieldsPayStatementPayStatementsTaxes",
- "AuthenticationMethodSupportedFieldsPayment",
- "AuthenticationMethodSupportedFieldsPaymentPayPeriod",
-]
-
-
-class AuthenticationMethodSupportedFieldsCompanyAccounts(BaseModel):
- account_name: Optional[bool] = None
-
- account_number: Optional[bool] = None
-
- account_type: Optional[bool] = None
-
- institution_name: Optional[bool] = None
-
- routing_number: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsCompanyDepartmentsParent(BaseModel):
- name: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsCompanyDepartments(BaseModel):
- name: Optional[bool] = None
-
- parent: Optional[AuthenticationMethodSupportedFieldsCompanyDepartmentsParent] = None
-
-
-class AuthenticationMethodSupportedFieldsCompanyEntity(BaseModel):
- subtype: Optional[bool] = None
-
- type: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsCompanyLocations(BaseModel):
- city: Optional[bool] = None
-
- country: Optional[bool] = None
-
- line1: Optional[bool] = None
-
- line2: Optional[bool] = None
-
- postal_code: Optional[bool] = None
-
- state: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsCompany(BaseModel):
- id: Optional[bool] = None
-
- accounts: Optional[AuthenticationMethodSupportedFieldsCompanyAccounts] = None
-
- departments: Optional[AuthenticationMethodSupportedFieldsCompanyDepartments] = None
-
- ein: Optional[bool] = None
-
- entity: Optional[AuthenticationMethodSupportedFieldsCompanyEntity] = None
-
- legal_name: Optional[bool] = None
-
- locations: Optional[AuthenticationMethodSupportedFieldsCompanyLocations] = None
-
- primary_email: Optional[bool] = None
-
- primary_phone_number: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsDirectoryIndividualsManager(BaseModel):
- id: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsDirectoryIndividuals(BaseModel):
- id: Optional[bool] = None
-
- department: Optional[bool] = None
-
- first_name: Optional[bool] = None
-
- is_active: Optional[bool] = None
-
- last_name: Optional[bool] = None
-
- manager: Optional[AuthenticationMethodSupportedFieldsDirectoryIndividualsManager] = None
-
- middle_name: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsDirectoryPaging(BaseModel):
- count: Optional[bool] = None
-
- offset: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsDirectory(BaseModel):
- individuals: Optional[AuthenticationMethodSupportedFieldsDirectoryIndividuals] = None
-
- paging: Optional[AuthenticationMethodSupportedFieldsDirectoryPaging] = None
-
-
-class AuthenticationMethodSupportedFieldsEmploymentDepartment(BaseModel):
- name: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsEmploymentEmployment(BaseModel):
- subtype: Optional[bool] = None
-
- type: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsEmploymentIncome(BaseModel):
- amount: Optional[bool] = None
-
- currency: Optional[bool] = None
-
- unit: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsEmploymentLocation(BaseModel):
- city: Optional[bool] = None
-
- country: Optional[bool] = None
-
- line1: Optional[bool] = None
-
- line2: Optional[bool] = None
-
- postal_code: Optional[bool] = None
-
- state: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsEmploymentManager(BaseModel):
- id: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsEmployment(BaseModel):
- id: Optional[bool] = None
-
- class_code: Optional[bool] = None
-
- custom_fields: Optional[bool] = None
-
- department: Optional[AuthenticationMethodSupportedFieldsEmploymentDepartment] = None
-
- employment: Optional[AuthenticationMethodSupportedFieldsEmploymentEmployment] = None
-
- employment_status: Optional[bool] = None
-
- end_date: Optional[bool] = None
-
- first_name: Optional[bool] = None
-
- income_history: Optional[bool] = None
-
- income: Optional[AuthenticationMethodSupportedFieldsEmploymentIncome] = None
-
- is_active: Optional[bool] = None
-
- last_name: Optional[bool] = None
-
- location: Optional[AuthenticationMethodSupportedFieldsEmploymentLocation] = None
-
- manager: Optional[AuthenticationMethodSupportedFieldsEmploymentManager] = None
-
- middle_name: Optional[bool] = None
-
- start_date: Optional[bool] = None
-
- title: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsIndividualEmails(BaseModel):
- data: Optional[bool] = None
-
- type: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsIndividualPhoneNumbers(BaseModel):
- data: Optional[bool] = None
-
- type: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsIndividualResidence(BaseModel):
- city: Optional[bool] = None
-
- country: Optional[bool] = None
-
- line1: Optional[bool] = None
-
- line2: Optional[bool] = None
-
- postal_code: Optional[bool] = None
-
- state: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsIndividual(BaseModel):
- id: Optional[bool] = None
-
- dob: Optional[bool] = None
-
- emails: Optional[AuthenticationMethodSupportedFieldsIndividualEmails] = None
-
- encrypted_ssn: Optional[bool] = None
-
- ethnicity: Optional[bool] = None
-
- first_name: Optional[bool] = None
-
- gender: Optional[bool] = None
-
- last_name: Optional[bool] = None
-
- middle_name: Optional[bool] = None
-
- phone_numbers: Optional[AuthenticationMethodSupportedFieldsIndividualPhoneNumbers] = None
-
- preferred_name: Optional[bool] = None
-
- residence: Optional[AuthenticationMethodSupportedFieldsIndividualResidence] = None
-
- ssn: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsPayGroup(BaseModel):
- id: Optional[bool] = None
-
- individual_ids: Optional[bool] = None
-
- name: Optional[bool] = None
-
- pay_frequencies: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsPayStatementPaging(BaseModel):
- count: bool
-
- offset: bool
-
-
-class AuthenticationMethodSupportedFieldsPayStatementPayStatementsEarnings(BaseModel):
- amount: Optional[bool] = None
-
- currency: Optional[bool] = None
-
- name: Optional[bool] = None
-
- type: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployeeDeductions(BaseModel):
- amount: Optional[bool] = None
-
- currency: Optional[bool] = None
-
- name: Optional[bool] = None
-
- pre_tax: Optional[bool] = None
-
- type: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployerContributions(BaseModel):
- amount: Optional[bool] = None
-
- currency: Optional[bool] = None
-
- name: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsPayStatementPayStatementsTaxes(BaseModel):
- amount: Optional[bool] = None
-
- currency: Optional[bool] = None
-
- employer: Optional[bool] = None
-
- name: Optional[bool] = None
-
- type: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsPayStatementPayStatements(BaseModel):
- earnings: Optional[AuthenticationMethodSupportedFieldsPayStatementPayStatementsEarnings] = None
-
- employee_deductions: Optional[AuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployeeDeductions] = None
-
- employer_contributions: Optional[
- AuthenticationMethodSupportedFieldsPayStatementPayStatementsEmployerContributions
- ] = None
-
- gross_pay: Optional[bool] = None
-
- individual_id: Optional[bool] = None
-
- net_pay: Optional[bool] = None
-
- payment_method: Optional[bool] = None
-
- taxes: Optional[AuthenticationMethodSupportedFieldsPayStatementPayStatementsTaxes] = None
-
- total_hours: Optional[bool] = None
-
- type: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsPayStatement(BaseModel):
- paging: Optional[AuthenticationMethodSupportedFieldsPayStatementPaging] = None
-
- pay_statements: Optional[AuthenticationMethodSupportedFieldsPayStatementPayStatements] = None
-
-
-class AuthenticationMethodSupportedFieldsPaymentPayPeriod(BaseModel):
- end_date: Optional[bool] = None
-
- start_date: Optional[bool] = None
-
-
-class AuthenticationMethodSupportedFieldsPayment(BaseModel):
- id: Optional[bool] = None
-
- company_debit: Optional[bool] = None
-
- debit_date: Optional[bool] = None
-
- employee_taxes: Optional[bool] = None
-
- employer_taxes: Optional[bool] = None
-
- gross_pay: Optional[bool] = None
-
- individual_ids: Optional[bool] = None
-
- net_pay: Optional[bool] = None
-
- pay_date: Optional[bool] = None
-
- pay_frequencies: Optional[bool] = None
-
- pay_group_ids: Optional[bool] = None
-
- pay_period: Optional[AuthenticationMethodSupportedFieldsPaymentPayPeriod] = None
-
-
-class AuthenticationMethodSupportedFields(BaseModel):
- company: Optional[AuthenticationMethodSupportedFieldsCompany] = None
-
- directory: Optional[AuthenticationMethodSupportedFieldsDirectory] = None
-
- employment: Optional[AuthenticationMethodSupportedFieldsEmployment] = None
-
- individual: Optional[AuthenticationMethodSupportedFieldsIndividual] = None
-
- pay_group: Optional[AuthenticationMethodSupportedFieldsPayGroup] = None
-
- pay_statement: Optional[AuthenticationMethodSupportedFieldsPayStatement] = None
-
- payment: Optional[AuthenticationMethodSupportedFieldsPayment] = None
-
-
-class AuthenticationMethod(BaseModel):
- benefits_support: Optional[BenefitsSupport] = None
- """Each benefit type and their supported features.
-
- If the benefit type is not supported, the property will be null
- """
-
- supported_fields: Optional[AuthenticationMethodSupportedFields] = None
- """The supported data fields returned by our HR and payroll endpoints"""
-
- type: Optional[Literal["assisted", "credential", "api_token", "api_credential", "oauth"]] = None
- """The type of authentication method."""
-
-
-class Provider(BaseModel):
- id: Optional[str] = None
- """The id of the payroll provider used in Connect."""
-
- authentication_methods: Optional[List[AuthenticationMethod]] = None
- """The list of authentication methods supported by the provider."""
-
- beta: Optional[bool] = None
- """`true` if the integration is in a beta state, `false` otherwise"""
-
- display_name: Optional[str] = None
- """The display name of the payroll provider."""
-
- icon: Optional[str] = None
- """The url to the official icon of the payroll provider."""
-
- logo: Optional[str] = None
- """The url to the official logo of the payroll provider."""
-
- manual: Optional[bool] = None
- """
- [DEPRECATED] Whether the Finch integration with this provider uses the Assisted
- Connect Flow by default. This field is now deprecated. Please check for a `type`
- of `assisted` in the `authentication_methods` field instead.
- """
-
- mfa_required: Optional[bool] = None
- """whether MFA is required for the provider."""
-
- primary_color: Optional[str] = None
- """The hex code for the primary color of the payroll provider."""
-
- products: Optional[List[str]] = None
- """The list of Finch products supported on this payroll provider."""
diff --git a/src/finch/types/provider_list_response.py b/src/finch/types/provider_list_response.py
new file mode 100644
index 00000000..effab9c2
--- /dev/null
+++ b/src/finch/types/provider_list_response.py
@@ -0,0 +1,55 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List, Optional
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["ProviderListResponse", "AuthenticationMethod"]
+
+
+class AuthenticationMethod(BaseModel):
+ type: Literal["assisted", "credential", "api_token", "api_credential", "oauth", "api"]
+ """The type of authentication method"""
+
+ benefits_support: Optional[Dict[str, Optional[object]]] = None
+ """The supported benefit types and their configurations"""
+
+ supported_fields: Optional[Dict[str, Optional[object]]] = None
+ """The supported fields for each Finch product"""
+
+
+class ProviderListResponse(BaseModel):
+ id: str
+ """The id of the payroll provider used in Connect."""
+
+ display_name: str
+ """The display name of the payroll provider."""
+
+ products: List[str]
+ """The list of Finch products supported on this payroll provider."""
+
+ authentication_methods: Optional[List[AuthenticationMethod]] = None
+ """The authentication methods supported by the provider."""
+
+ beta: Optional[bool] = None
+ """`true` if the integration is in a beta state, `false` otherwise"""
+
+ icon: Optional[str] = None
+ """The url to the official icon of the payroll provider."""
+
+ logo: Optional[str] = None
+ """The url to the official logo of the payroll provider."""
+
+ manual: Optional[bool] = None
+ """
+ [DEPRECATED] Whether the Finch integration with this provider uses the Assisted
+ Connect Flow by default. This field is now deprecated. Please check for a `type`
+ of `assisted` in the `authentication_methods` field instead.
+ """
+
+ mfa_required: Optional[bool] = None
+ """whether MFA is required for the provider."""
+
+ primary_color: Optional[str] = None
+ """The hex code for the primary color of the payroll provider."""
diff --git a/src/finch/types/request_forwarding_forward_params.py b/src/finch/types/request_forwarding_forward_params.py
index 76f06fed..a7d9f205 100644
--- a/src/finch/types/request_forwarding_forward_params.py
+++ b/src/finch/types/request_forwarding_forward_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Optional
+from typing import Dict, Optional
from typing_extensions import Required, TypedDict
__all__ = ["RequestForwardingForwardParams"]
@@ -28,14 +28,14 @@ class RequestForwardingForwardParams(TypedDict, total=False):
This value must be specified as either a string or a valid JSON object.
"""
- headers: Optional[object]
+ headers: Optional[Dict[str, Optional[object]]]
"""The HTTP headers to include on the forwarded request.
This value must be specified as an object of key-value pairs. Example:
`{"Content-Type": "application/xml", "X-API-Version": "v1" }`
"""
- params: Optional[object]
+ params: Optional[Dict[str, Optional[object]]]
"""The query parameters for the forwarded request.
This value must be specified as a valid JSON object rather than a query string.
diff --git a/src/finch/types/request_forwarding_forward_response.py b/src/finch/types/request_forwarding_forward_response.py
index 61fde1b5..c9777e09 100644
--- a/src/finch/types/request_forwarding_forward_response.py
+++ b/src/finch/types/request_forwarding_forward_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Optional
+from typing import Dict, Union, Optional
from pydantic import Field as FieldInfo
@@ -10,49 +10,26 @@
class Request(BaseModel):
- data: Optional[str] = None
- """The body that was specified for the forwarded request.
-
- If a value was not specified in the original request, this value will be
- returned as null ; otherwise, this value will always be returned as a string.
- """
-
- headers: Optional[object] = None
- """The specified HTTP headers that were included in the forwarded request.
-
- If no headers were specified, this will be returned as `null`.
- """
-
method: str
"""The HTTP method that was specified for the forwarded request.
Valid values include: `GET` , `POST` , `PUT` , `DELETE` , and `PATCH`.
"""
- params: Optional[object] = None
- """The query parameters that were included in the forwarded request.
-
- If no query parameters were specified, this will be returned as `null`.
- """
-
route: str
"""The URL route path that was specified for the forwarded request."""
+ data: Union[str, Dict[str, Optional[object]], None] = None
+ """The body that was specified for the forwarded request."""
-class RequestForwardingForwardResponse(BaseModel):
- data: Optional[str] = None
- """
- A string representation of the HTTP response body of the forwarded request's
- response received from the underlying integration's API. This field may be null
- in the case where the upstream system's response is empty.
- """
+ headers: Optional[Dict[str, Optional[object]]] = None
+ """The HTTP headers that were specified for the forwarded request."""
- headers: Optional[object] = None
- """
- The HTTP headers of the forwarded request's response, exactly as received from
- the underlying integration's API.
- """
+ params: Optional[Dict[str, Optional[object]]] = None
+ """The query parameters that were specified for the forwarded request."""
+
+class RequestForwardingForwardResponse(BaseModel):
request: Request
"""
An object containing details of your original forwarded request, for your ease
@@ -64,3 +41,16 @@ class RequestForwardingForwardResponse(BaseModel):
The HTTP status code of the forwarded request's response, exactly received from
the underlying integration's API. This value will be returned as an integer.
"""
+
+ data: Optional[str] = None
+ """
+ A string representation of the HTTP response body of the forwarded request's
+ response received from the underlying integration's API. This field may be null
+ in the case where the upstream system's response is empty.
+ """
+
+ headers: Optional[Dict[str, Optional[object]]] = None
+ """
+ The HTTP headers of the forwarded request's response, exactly as received from
+ the underlying integration's API.
+ """
diff --git a/tests/api_resources/test_providers.py b/tests/api_resources/test_providers.py
index 7228af21..be5dd8ce 100644
--- a/tests/api_resources/test_providers.py
+++ b/tests/api_resources/test_providers.py
@@ -8,7 +8,7 @@
import pytest
from finch import Finch, AsyncFinch
-from finch.types import Provider
+from finch.types import ProviderListResponse
from tests.utils import assert_matches_type
from finch.pagination import SyncSinglePage, AsyncSinglePage
@@ -21,7 +21,7 @@ class TestProviders:
@parametrize
def test_method_list(self, client: Finch) -> None:
provider = client.providers.list()
- assert_matches_type(SyncSinglePage[Provider], provider, path=["response"])
+ assert_matches_type(SyncSinglePage[ProviderListResponse], provider, path=["response"])
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
@@ -30,7 +30,7 @@ def test_raw_response_list(self, client: Finch) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
provider = response.parse()
- assert_matches_type(SyncSinglePage[Provider], provider, path=["response"])
+ assert_matches_type(SyncSinglePage[ProviderListResponse], provider, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
@@ -39,7 +39,7 @@ def test_streaming_response_list(self, client: Finch) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
provider = response.parse()
- assert_matches_type(SyncSinglePage[Provider], provider, path=["response"])
+ assert_matches_type(SyncSinglePage[ProviderListResponse], provider, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -52,7 +52,7 @@ class TestAsyncProviders:
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
provider = await async_client.providers.list()
- assert_matches_type(AsyncSinglePage[Provider], provider, path=["response"])
+ assert_matches_type(AsyncSinglePage[ProviderListResponse], provider, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@@ -61,7 +61,7 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
provider = response.parse()
- assert_matches_type(AsyncSinglePage[Provider], provider, path=["response"])
+ assert_matches_type(AsyncSinglePage[ProviderListResponse], provider, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
@@ -70,6 +70,6 @@ async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
provider = await response.parse()
- assert_matches_type(AsyncSinglePage[Provider], provider, path=["response"])
+ assert_matches_type(AsyncSinglePage[ProviderListResponse], provider, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/test_request_forwarding.py b/tests/api_resources/test_request_forwarding.py
index be7ec45f..5615e4d2 100644
--- a/tests/api_resources/test_request_forwarding.py
+++ b/tests/api_resources/test_request_forwarding.py
@@ -20,30 +20,27 @@ class TestRequestForwarding:
@parametrize
def test_method_forward(self, client: Finch) -> None:
request_forwarding = client.request_forwarding.forward(
- method="POST",
- route="/people/search",
+ method="method",
+ route="route",
)
assert_matches_type(RequestForwardingForwardResponse, request_forwarding, path=["response"])
@parametrize
def test_method_forward_with_all_params(self, client: Finch) -> None:
request_forwarding = client.request_forwarding.forward(
- method="POST",
- route="/people/search",
- data=None,
- headers={"content-type": "application/json"},
- params={
- "showInactive": True,
- "humanReadable": True,
- },
+ method="method",
+ route="route",
+ data="data",
+ headers={"foo": "bar"},
+ params={"foo": "bar"},
)
assert_matches_type(RequestForwardingForwardResponse, request_forwarding, path=["response"])
@parametrize
def test_raw_response_forward(self, client: Finch) -> None:
response = client.request_forwarding.with_raw_response.forward(
- method="POST",
- route="/people/search",
+ method="method",
+ route="route",
)
assert response.is_closed is True
@@ -54,8 +51,8 @@ def test_raw_response_forward(self, client: Finch) -> None:
@parametrize
def test_streaming_response_forward(self, client: Finch) -> None:
with client.request_forwarding.with_streaming_response.forward(
- method="POST",
- route="/people/search",
+ method="method",
+ route="route",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -74,30 +71,27 @@ class TestAsyncRequestForwarding:
@parametrize
async def test_method_forward(self, async_client: AsyncFinch) -> None:
request_forwarding = await async_client.request_forwarding.forward(
- method="POST",
- route="/people/search",
+ method="method",
+ route="route",
)
assert_matches_type(RequestForwardingForwardResponse, request_forwarding, path=["response"])
@parametrize
async def test_method_forward_with_all_params(self, async_client: AsyncFinch) -> None:
request_forwarding = await async_client.request_forwarding.forward(
- method="POST",
- route="/people/search",
- data=None,
- headers={"content-type": "application/json"},
- params={
- "showInactive": True,
- "humanReadable": True,
- },
+ method="method",
+ route="route",
+ data="data",
+ headers={"foo": "bar"},
+ params={"foo": "bar"},
)
assert_matches_type(RequestForwardingForwardResponse, request_forwarding, path=["response"])
@parametrize
async def test_raw_response_forward(self, async_client: AsyncFinch) -> None:
response = await async_client.request_forwarding.with_raw_response.forward(
- method="POST",
- route="/people/search",
+ method="method",
+ route="route",
)
assert response.is_closed is True
@@ -108,8 +102,8 @@ async def test_raw_response_forward(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_forward(self, async_client: AsyncFinch) -> None:
async with async_client.request_forwarding.with_streaming_response.forward(
- method="POST",
- route="/people/search",
+ method="method",
+ route="route",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
From c3b3973c5433ca063d35c2cd6cdca5b7711ac3f5 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 30 Sep 2025 14:03:36 +0000
Subject: [PATCH 08/20] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 40205901..23acd0a9 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-fd18483a409117a70113398a50c7ff8bde92455d830e8027f2c2e3cc7a9c67ac.yml
-openapi_spec_hash: cb88f02495e1cfd2d73d2f9e3728205d
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f8783c7acb61970583e95ad6d75c8735d2ae5e4344f808957e0b9cc22f2b8c04.yml
+openapi_spec_hash: 2baa7719b95befc1553083d5757bd99a
config_hash: 6d3585c0032e08d723d077d660fc8448
From 647e7c62de07d1b7ee16e76592f3594b7bba373d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 7 Oct 2025 15:14:28 +0000
Subject: [PATCH 09/20] feat(api): api update
---
.stats.yml | 4 ++--
src/finch/types/hris/pay_statement.py | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 23acd0a9..4d6fbdae 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f8783c7acb61970583e95ad6d75c8735d2ae5e4344f808957e0b9cc22f2b8c04.yml
-openapi_spec_hash: 2baa7719b95befc1553083d5757bd99a
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-ef0b0fb4ec85648855da514cbc53018cb429fb37bce8570bc6c44254eb32c62f.yml
+openapi_spec_hash: 38622a4a3cdef04686053018329616f2
config_hash: 6d3585c0032e08d723d077d660fc8448
diff --git a/src/finch/types/hris/pay_statement.py b/src/finch/types/hris/pay_statement.py
index 22fca52d..d8439faf 100644
--- a/src/finch/types/hris/pay_statement.py
+++ b/src/finch/types/hris/pay_statement.py
@@ -153,10 +153,10 @@ class PayStatement(BaseModel):
earnings: Optional[List[Optional[Earning]]] = None
"""The array of earnings objects associated with this pay statement"""
- employee_deductions: Optional[List[Optional[EmployeeDeduction]]] = None
+ employee_deductions: Optional[List[EmployeeDeduction]] = None
"""The array of deductions objects associated with this pay statement."""
- employer_contributions: Optional[List[Optional[EmployerContribution]]] = None
+ employer_contributions: Optional[List[EmployerContribution]] = None
gross_pay: Optional[Money] = None
@@ -168,7 +168,7 @@ class PayStatement(BaseModel):
payment_method: Optional[Literal["check", "direct_deposit", "other"]] = None
"""The payment method."""
- taxes: Optional[List[Optional[Tax]]] = None
+ taxes: Optional[List[Tax]] = None
"""The array of taxes objects associated with this pay statement."""
total_hours: Optional[float] = None
From 8d08d1b5226654243854f230bb34727ec5ac430b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 7 Oct 2025 23:34:12 +0000
Subject: [PATCH 10/20] feat(api): api update
---
.stats.yml | 4 +-
api.md | 4 +-
src/finch/resources/jobs/automated.py | 38 ++-----------------
src/finch/resources/jobs/manual.py | 28 ++------------
src/finch/types/introspection.py | 6 ---
src/finch/types/jobs/__init__.py | 2 -
src/finch/types/jobs/automated_list_params.py | 7 ----
.../types/jobs/automated_retrieve_params.py | 16 --------
.../types/jobs/manual_retrieve_params.py | 16 --------
tests/api_resources/jobs/test_automated.py | 34 ++++-------------
tests/api_resources/jobs/test_manual.py | 32 ++++------------
11 files changed, 26 insertions(+), 161 deletions(-)
delete mode 100644 src/finch/types/jobs/automated_retrieve_params.py
delete mode 100644 src/finch/types/jobs/manual_retrieve_params.py
diff --git a/.stats.yml b/.stats.yml
index 4d6fbdae..845aada6 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-ef0b0fb4ec85648855da514cbc53018cb429fb37bce8570bc6c44254eb32c62f.yml
-openapi_spec_hash: 38622a4a3cdef04686053018329616f2
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-df44cda9b18320f8a8117d5c8dfa02ebd6739fc77fc87eb284748c987a7412a4.yml
+openapi_spec_hash: 69524ddfedf3c4492e77826561f7c7d8
config_hash: 6d3585c0032e08d723d077d660fc8448
diff --git a/api.md b/api.md
index 423479be..18634d66 100644
--- a/api.md
+++ b/api.md
@@ -281,7 +281,7 @@ from finch.types.jobs import AutomatedAsyncJob, AutomatedCreateResponse, Automat
Methods:
- client.jobs.automated.create(\*\*params) -> AutomatedCreateResponse
-- client.jobs.automated.retrieve(job_id, \*\*params) -> AutomatedAsyncJob
+- client.jobs.automated.retrieve(job_id) -> AutomatedAsyncJob
- client.jobs.automated.list(\*\*params) -> AutomatedListResponse
## Manual
@@ -294,7 +294,7 @@ from finch.types.jobs import ManualAsyncJob
Methods:
-- client.jobs.manual.retrieve(job_id, \*\*params) -> ManualAsyncJob
+- client.jobs.manual.retrieve(job_id) -> ManualAsyncJob
# Sandbox
diff --git a/src/finch/resources/jobs/automated.py b/src/finch/resources/jobs/automated.py
index 4174c9fa..687e1389 100644
--- a/src/finch/resources/jobs/automated.py
+++ b/src/finch/resources/jobs/automated.py
@@ -12,7 +12,7 @@
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
-from ...types.jobs import automated_list_params, automated_create_params, automated_retrieve_params
+from ...types.jobs import automated_list_params, automated_create_params
from ..._base_client import make_request_options
from ...types.jobs.automated_async_job import AutomatedAsyncJob
from ...types.jobs.automated_list_response import AutomatedListResponse
@@ -156,7 +156,6 @@ def retrieve(
self,
job_id: str,
*,
- entity_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -168,10 +167,6 @@ def retrieve(
Get an automated job by `job_id`.
Args:
- entity_id: The entity ID to use when authenticating with a multi-account token. Required
- when using a multi-account token to specify which entity's data to access.
- Example: `123e4567-e89b-12d3-a456-426614174000`
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -185,11 +180,7 @@ def retrieve(
return self._get(
f"/jobs/automated/{job_id}",
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=maybe_transform({"entity_id": entity_id}, automated_retrieve_params.AutomatedRetrieveParams),
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AutomatedAsyncJob,
)
@@ -197,7 +188,6 @@ def retrieve(
def list(
self,
*,
- entity_id: str | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -214,10 +204,6 @@ def list(
as data syncs, only the next scheduled job is shown.
Args:
- entity_id: The entity ID to use when authenticating with a multi-account token. Required
- when using a multi-account token to specify which entity's data to access.
- Example: `123e4567-e89b-12d3-a456-426614174000`
-
limit: Number of items to return
offset: Index to start from (defaults to 0)
@@ -239,7 +225,6 @@ def list(
timeout=timeout,
query=maybe_transform(
{
- "entity_id": entity_id,
"limit": limit,
"offset": offset,
},
@@ -385,7 +370,6 @@ async def retrieve(
self,
job_id: str,
*,
- entity_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -397,10 +381,6 @@ async def retrieve(
Get an automated job by `job_id`.
Args:
- entity_id: The entity ID to use when authenticating with a multi-account token. Required
- when using a multi-account token to specify which entity's data to access.
- Example: `123e4567-e89b-12d3-a456-426614174000`
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -414,13 +394,7 @@ async def retrieve(
return await self._get(
f"/jobs/automated/{job_id}",
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=await async_maybe_transform(
- {"entity_id": entity_id}, automated_retrieve_params.AutomatedRetrieveParams
- ),
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AutomatedAsyncJob,
)
@@ -428,7 +402,6 @@ async def retrieve(
async def list(
self,
*,
- entity_id: str | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -445,10 +418,6 @@ async def list(
as data syncs, only the next scheduled job is shown.
Args:
- entity_id: The entity ID to use when authenticating with a multi-account token. Required
- when using a multi-account token to specify which entity's data to access.
- Example: `123e4567-e89b-12d3-a456-426614174000`
-
limit: Number of items to return
offset: Index to start from (defaults to 0)
@@ -470,7 +439,6 @@ async def list(
timeout=timeout,
query=await async_maybe_transform(
{
- "entity_id": entity_id,
"limit": limit,
"offset": offset,
},
diff --git a/src/finch/resources/jobs/manual.py b/src/finch/resources/jobs/manual.py
index 94a5d71a..e2f4d6d8 100644
--- a/src/finch/resources/jobs/manual.py
+++ b/src/finch/resources/jobs/manual.py
@@ -5,12 +5,10 @@
import httpx
from ... import _legacy_response
-from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
-from ..._utils import maybe_transform, async_maybe_transform
+from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
-from ...types.jobs import manual_retrieve_params
from ..._base_client import make_request_options
from ...types.jobs.manual_async_job import ManualAsyncJob
@@ -41,7 +39,6 @@ def retrieve(
self,
job_id: str,
*,
- entity_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -55,10 +52,6 @@ def retrieve(
Assisted Benefits jobs.
Args:
- entity_id: The entity ID to use when authenticating with a multi-account token. Required
- when using a multi-account token to specify which entity's data to access.
- Example: `123e4567-e89b-12d3-a456-426614174000`
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -72,11 +65,7 @@ def retrieve(
return self._get(
f"/jobs/manual/{job_id}",
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=maybe_transform({"entity_id": entity_id}, manual_retrieve_params.ManualRetrieveParams),
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=ManualAsyncJob,
)
@@ -106,7 +95,6 @@ async def retrieve(
self,
job_id: str,
*,
- entity_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -120,10 +108,6 @@ async def retrieve(
Assisted Benefits jobs.
Args:
- entity_id: The entity ID to use when authenticating with a multi-account token. Required
- when using a multi-account token to specify which entity's data to access.
- Example: `123e4567-e89b-12d3-a456-426614174000`
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -137,13 +121,7 @@ async def retrieve(
return await self._get(
f"/jobs/manual/{job_id}",
options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- query=await async_maybe_transform(
- {"entity_id": entity_id}, manual_retrieve_params.ManualRetrieveParams
- ),
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=ManualAsyncJob,
)
diff --git a/src/finch/types/introspection.py b/src/finch/types/introspection.py
index cfe4fbc3..30847577 100644
--- a/src/finch/types/introspection.py
+++ b/src/finch/types/introspection.py
@@ -98,12 +98,6 @@ class Introspection(BaseModel):
created for this connection
"""
- entity_ids: Optional[List[str]] = None
- """Array of entity IDs associated with this connection."""
-
- entity_mode: Optional[Literal["single", "multi"]] = None
- """Indicates whether this connection manages a single entity or multiple entities."""
-
manual: Optional[bool] = None
"""
Whether the connection associated with the `access_token` uses the Assisted
diff --git a/src/finch/types/jobs/__init__.py b/src/finch/types/jobs/__init__.py
index b7a24a08..ee2d3e8e 100644
--- a/src/finch/types/jobs/__init__.py
+++ b/src/finch/types/jobs/__init__.py
@@ -5,8 +5,6 @@
from .manual_async_job import ManualAsyncJob as ManualAsyncJob
from .automated_async_job import AutomatedAsyncJob as AutomatedAsyncJob
from .automated_list_params import AutomatedListParams as AutomatedListParams
-from .manual_retrieve_params import ManualRetrieveParams as ManualRetrieveParams
from .automated_create_params import AutomatedCreateParams as AutomatedCreateParams
from .automated_list_response import AutomatedListResponse as AutomatedListResponse
from .automated_create_response import AutomatedCreateResponse as AutomatedCreateResponse
-from .automated_retrieve_params import AutomatedRetrieveParams as AutomatedRetrieveParams
diff --git a/src/finch/types/jobs/automated_list_params.py b/src/finch/types/jobs/automated_list_params.py
index 2e41586c..21032e2c 100644
--- a/src/finch/types/jobs/automated_list_params.py
+++ b/src/finch/types/jobs/automated_list_params.py
@@ -8,13 +8,6 @@
class AutomatedListParams(TypedDict, total=False):
- entity_id: str
- """The entity ID to use when authenticating with a multi-account token.
-
- Required when using a multi-account token to specify which entity's data to
- access. Example: `123e4567-e89b-12d3-a456-426614174000`
- """
-
limit: int
"""Number of items to return"""
diff --git a/src/finch/types/jobs/automated_retrieve_params.py b/src/finch/types/jobs/automated_retrieve_params.py
deleted file mode 100644
index d009691e..00000000
--- a/src/finch/types/jobs/automated_retrieve_params.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import TypedDict
-
-__all__ = ["AutomatedRetrieveParams"]
-
-
-class AutomatedRetrieveParams(TypedDict, total=False):
- entity_id: str
- """The entity ID to use when authenticating with a multi-account token.
-
- Required when using a multi-account token to specify which entity's data to
- access. Example: `123e4567-e89b-12d3-a456-426614174000`
- """
diff --git a/src/finch/types/jobs/manual_retrieve_params.py b/src/finch/types/jobs/manual_retrieve_params.py
deleted file mode 100644
index 3a4e4b11..00000000
--- a/src/finch/types/jobs/manual_retrieve_params.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import TypedDict
-
-__all__ = ["ManualRetrieveParams"]
-
-
-class ManualRetrieveParams(TypedDict, total=False):
- entity_id: str
- """The entity ID to use when authenticating with a multi-account token.
-
- Required when using a multi-account token to specify which entity's data to
- access. Example: `123e4567-e89b-12d3-a456-426614174000`
- """
diff --git a/tests/api_resources/jobs/test_automated.py b/tests/api_resources/jobs/test_automated.py
index 1593aeda..746efc27 100644
--- a/tests/api_resources/jobs/test_automated.py
+++ b/tests/api_resources/jobs/test_automated.py
@@ -89,22 +89,14 @@ def test_streaming_response_create_overload_2(self, client: Finch) -> None:
@parametrize
def test_method_retrieve(self, client: Finch) -> None:
automated = client.jobs.automated.retrieve(
- job_id="job_id",
- )
- assert_matches_type(AutomatedAsyncJob, automated, path=["response"])
-
- @parametrize
- def test_method_retrieve_with_all_params(self, client: Finch) -> None:
- automated = client.jobs.automated.retrieve(
- job_id="job_id",
- entity_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ "job_id",
)
assert_matches_type(AutomatedAsyncJob, automated, path=["response"])
@parametrize
def test_raw_response_retrieve(self, client: Finch) -> None:
response = client.jobs.automated.with_raw_response.retrieve(
- job_id="job_id",
+ "job_id",
)
assert response.is_closed is True
@@ -115,7 +107,7 @@ def test_raw_response_retrieve(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve(self, client: Finch) -> None:
with client.jobs.automated.with_streaming_response.retrieve(
- job_id="job_id",
+ "job_id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -129,7 +121,7 @@ def test_streaming_response_retrieve(self, client: Finch) -> None:
def test_path_params_retrieve(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_id` but received ''"):
client.jobs.automated.with_raw_response.retrieve(
- job_id="",
+ "",
)
@parametrize
@@ -140,7 +132,6 @@ def test_method_list(self, client: Finch) -> None:
@parametrize
def test_method_list_with_all_params(self, client: Finch) -> None:
automated = client.jobs.automated.list(
- entity_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
limit=0,
offset=0,
)
@@ -240,22 +231,14 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncFin
@parametrize
async def test_method_retrieve(self, async_client: AsyncFinch) -> None:
automated = await async_client.jobs.automated.retrieve(
- job_id="job_id",
- )
- assert_matches_type(AutomatedAsyncJob, automated, path=["response"])
-
- @parametrize
- async def test_method_retrieve_with_all_params(self, async_client: AsyncFinch) -> None:
- automated = await async_client.jobs.automated.retrieve(
- job_id="job_id",
- entity_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ "job_id",
)
assert_matches_type(AutomatedAsyncJob, automated, path=["response"])
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
response = await async_client.jobs.automated.with_raw_response.retrieve(
- job_id="job_id",
+ "job_id",
)
assert response.is_closed is True
@@ -266,7 +249,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None:
async with async_client.jobs.automated.with_streaming_response.retrieve(
- job_id="job_id",
+ "job_id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -280,7 +263,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> No
async def test_path_params_retrieve(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_id` but received ''"):
await async_client.jobs.automated.with_raw_response.retrieve(
- job_id="",
+ "",
)
@parametrize
@@ -291,7 +274,6 @@ async def test_method_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> None:
automated = await async_client.jobs.automated.list(
- entity_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
limit=0,
offset=0,
)
diff --git a/tests/api_resources/jobs/test_manual.py b/tests/api_resources/jobs/test_manual.py
index bc3d5a8f..1cd30215 100644
--- a/tests/api_resources/jobs/test_manual.py
+++ b/tests/api_resources/jobs/test_manual.py
@@ -20,22 +20,14 @@ class TestManual:
@parametrize
def test_method_retrieve(self, client: Finch) -> None:
manual = client.jobs.manual.retrieve(
- job_id="job_id",
- )
- assert_matches_type(ManualAsyncJob, manual, path=["response"])
-
- @parametrize
- def test_method_retrieve_with_all_params(self, client: Finch) -> None:
- manual = client.jobs.manual.retrieve(
- job_id="job_id",
- entity_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ "job_id",
)
assert_matches_type(ManualAsyncJob, manual, path=["response"])
@parametrize
def test_raw_response_retrieve(self, client: Finch) -> None:
response = client.jobs.manual.with_raw_response.retrieve(
- job_id="job_id",
+ "job_id",
)
assert response.is_closed is True
@@ -46,7 +38,7 @@ def test_raw_response_retrieve(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve(self, client: Finch) -> None:
with client.jobs.manual.with_streaming_response.retrieve(
- job_id="job_id",
+ "job_id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -60,7 +52,7 @@ def test_streaming_response_retrieve(self, client: Finch) -> None:
def test_path_params_retrieve(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_id` but received ''"):
client.jobs.manual.with_raw_response.retrieve(
- job_id="",
+ "",
)
@@ -72,22 +64,14 @@ class TestAsyncManual:
@parametrize
async def test_method_retrieve(self, async_client: AsyncFinch) -> None:
manual = await async_client.jobs.manual.retrieve(
- job_id="job_id",
- )
- assert_matches_type(ManualAsyncJob, manual, path=["response"])
-
- @parametrize
- async def test_method_retrieve_with_all_params(self, async_client: AsyncFinch) -> None:
- manual = await async_client.jobs.manual.retrieve(
- job_id="job_id",
- entity_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ "job_id",
)
assert_matches_type(ManualAsyncJob, manual, path=["response"])
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
response = await async_client.jobs.manual.with_raw_response.retrieve(
- job_id="job_id",
+ "job_id",
)
assert response.is_closed is True
@@ -98,7 +82,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None:
async with async_client.jobs.manual.with_streaming_response.retrieve(
- job_id="job_id",
+ "job_id",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -112,5 +96,5 @@ async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> No
async def test_path_params_retrieve(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_id` but received ''"):
await async_client.jobs.manual.with_raw_response.retrieve(
- job_id="",
+ "",
)
From 833690f32d95858bd4964867c20081b3d037bba9 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 9 Oct 2025 12:58:11 +0000
Subject: [PATCH 11/20] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 845aada6..cbb8c1b5 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-df44cda9b18320f8a8117d5c8dfa02ebd6739fc77fc87eb284748c987a7412a4.yml
-openapi_spec_hash: 69524ddfedf3c4492e77826561f7c7d8
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bfcb61384672f485be2ee4e2ae2938ef8c57c063c2ea5d0e7890e68098300579.yml
+openapi_spec_hash: 5d75581b91b95d16f0fae017a36b4ea9
config_hash: 6d3585c0032e08d723d077d660fc8448
From 9885ba4aba34ab023117ed8cb03bf38bb8baaef2 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 9 Oct 2025 15:59:22 +0000
Subject: [PATCH 12/20] feat(api): api update
---
.stats.yml | 4 ++--
src/finch/types/hris/document_response.py | 8 ++++----
src/finch/types/hris/w42005.py | 12 ++++++------
src/finch/types/hris/w42020.py | 20 ++++++++++----------
4 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index cbb8c1b5..99ac1e56 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bfcb61384672f485be2ee4e2ae2938ef8c57c063c2ea5d0e7890e68098300579.yml
-openapi_spec_hash: 5d75581b91b95d16f0fae017a36b4ea9
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-199a2fd8b7387b0648e88b5942a8248895373a561aff663389982073e55c8eb5.yml
+openapi_spec_hash: 7415c1faca5f2e873824893b140650f1
config_hash: 6d3585c0032e08d723d077d660fc8448
diff --git a/src/finch/types/hris/document_response.py b/src/finch/types/hris/document_response.py
index eb68db53..6cee9fb5 100644
--- a/src/finch/types/hris/document_response.py
+++ b/src/finch/types/hris/document_response.py
@@ -9,7 +9,7 @@
class DocumentResponse(BaseModel):
- id: Optional[str] = None
+ id: str
"""A stable Finch id for the document."""
individual_id: Optional[str] = None
@@ -18,14 +18,14 @@ class DocumentResponse(BaseModel):
This will be null for employer-level documents.
"""
- type: Optional[Literal["w4_2020", "w4_2005"]] = None
+ type: Literal["w4_2020", "w4_2005"]
"""The type of document."""
- url: Optional[str] = None
+ url: str
"""A URL to access the document.
Format: `https://api.tryfinch.com/employer/documents/:document_id`.
"""
- year: Optional[float] = None
+ year: float
"""The year the document applies to, if available."""
diff --git a/src/finch/types/hris/w42005.py b/src/finch/types/hris/w42005.py
index 77d3a130..73b7d277 100644
--- a/src/finch/types/hris/w42005.py
+++ b/src/finch/types/hris/w42005.py
@@ -9,7 +9,7 @@
class Data(BaseModel):
- additional_withholding: Optional[int] = None
+ additional_withholding: int
"""Additional withholding amount (in cents)."""
exemption: Optional[Literal["exempt", "non_exempt"]] = None
@@ -18,19 +18,19 @@ class Data(BaseModel):
filing_status: Optional[Literal["married", "married_but_withhold_at_higher_single_rate", "single"]] = None
"""The individual's filing status for tax purposes."""
- individual_id: Optional[str] = None
+ individual_id: str
"""The unique identifier for the individual associated with this 2005 W4 form."""
- total_number_of_allowances: Optional[int] = None
+ total_number_of_allowances: int
"""Total number of allowances claimed (in cents)."""
class W42005(BaseModel):
- data: Optional[Data] = None
+ data: Data
"""Detailed information specific to the 2005 W4 form."""
- type: Optional[Literal["w4_2005"]] = None
+ type: Literal["w4_2005"]
"""Specifies the form type, indicating that this document is a 2005 W4 form."""
- year: Optional[float] = None
+ year: float
"""The tax year this W4 document applies to."""
diff --git a/src/finch/types/hris/w42020.py b/src/finch/types/hris/w42020.py
index 840463ec..20749283 100644
--- a/src/finch/types/hris/w42020.py
+++ b/src/finch/types/hris/w42020.py
@@ -9,19 +9,19 @@
class Data(BaseModel):
- amount_for_other_dependents: Optional[int] = None
+ amount_for_other_dependents: int
"""
Amount claimed for dependents other than qualifying children under 17 (in
cents).
"""
- amount_for_qualifying_children_under_17: Optional[int] = None
+ amount_for_qualifying_children_under_17: int
"""Amount claimed for dependents under 17 years old (in cents)."""
- deductions: Optional[int] = None
+ deductions: int
"""Deductible expenses (in cents)."""
- extra_withholding: Optional[int] = None
+ extra_withholding: int
"""Additional withholding amount (in cents)."""
filing_status: Optional[
@@ -33,22 +33,22 @@ class Data(BaseModel):
] = None
"""The individual's filing status for tax purposes."""
- individual_id: Optional[str] = None
+ individual_id: str
"""The unique identifier for the individual associated with this document."""
- other_income: Optional[int] = None
+ other_income: int
"""Additional income from sources outside of primary employment (in cents)."""
- total_claim_dependent_and_other_credits: Optional[int] = None
+ total_claim_dependent_and_other_credits: int
"""Total amount claimed for dependents and other credits (in cents)."""
class W42020(BaseModel):
- data: Optional[Data] = None
+ data: Data
"""Detailed information specific to the 2020 W4 form."""
- type: Optional[Literal["w4_2020"]] = None
+ type: Literal["w4_2020"]
"""Specifies the form type, indicating that this document is a 2020 W4 form."""
- year: Optional[float] = None
+ year: float
"""The tax year this W4 document applies to."""
From c1e5e2841ec38f9d290169abd6320fb0b8438f2f Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 10 Oct 2025 08:50:45 +0000
Subject: [PATCH 13/20] chore(internal): detect missing future annotations with
ruff
---
pyproject.toml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pyproject.toml b/pyproject.toml
index d9e19a7f..7e582b9f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -224,6 +224,8 @@ select = [
"B",
# remove unused imports
"F401",
+ # check for missing future annotations
+ "FA102",
# bare except statements
"E722",
# unused arguments
@@ -246,6 +248,8 @@ unfixable = [
"T203",
]
+extend-safe-fixes = ["FA102"]
+
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
From 3b9912772396d97b16f2b5dec275ffd5c46fc4ea Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 14 Oct 2025 15:10:46 +0000
Subject: [PATCH 14/20] feat(api): api update
---
.stats.yml | 4 +-
src/finch/resources/connect/sessions.py | 112 +++++++++++-------
src/finch/types/connect/session_new_params.py | 50 ++++----
.../connect/session_reauthenticate_params.py | 32 ++---
tests/api_resources/connect/test_sessions.py | 104 +++++++++-------
5 files changed, 178 insertions(+), 124 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 99ac1e56..0751652c 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-199a2fd8b7387b0648e88b5942a8248895373a561aff663389982073e55c8eb5.yml
-openapi_spec_hash: 7415c1faca5f2e873824893b140650f1
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-5f9c0770c8be0fa779cbb640c25043cc1d5514236b8d0d6791c822dd7e00ffe6.yml
+openapi_spec_hash: d8df70c1dc1ba1ebcd572c1fab58eec6
config_hash: 6d3585c0032e08d723d077d660fc8448
diff --git a/src/finch/resources/connect/sessions.py b/src/finch/resources/connect/sessions.py
index 574489a4..66663aff 100644
--- a/src/finch/resources/connect/sessions.py
+++ b/src/finch/resources/connect/sessions.py
@@ -8,7 +8,7 @@
import httpx
from ... import _legacy_response
-from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ..._types import Body, Query, Headers, NotGiven, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -44,28 +44,28 @@ def with_streaming_response(self) -> SessionsWithStreamingResponse:
def new(
self,
*,
+ customer_email: Optional[str],
customer_id: str,
customer_name: str,
+ integration: Optional[session_new_params.Integration],
+ manual: Optional[bool],
+ minutes_to_expire: Optional[float],
products: List[
Literal[
+ "benefits",
"company",
+ "deduction",
"directory",
- "individual",
+ "documents",
"employment",
+ "individual",
"payment",
"pay_statement",
- "benefits",
"ssn",
- "deduction",
- "documents",
]
],
- customer_email: Optional[str] | Omit = omit,
- integration: Optional[session_new_params.Integration] | Omit = omit,
- manual: Optional[bool] | Omit = omit,
- minutes_to_expire: Optional[float] | Omit = omit,
- redirect_uri: Optional[str] | Omit = omit,
- sandbox: Optional[Literal["finch", "provider"]] | Omit = omit,
+ redirect_uri: Optional[str],
+ sandbox: Optional[Literal["finch", "provider"]],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -77,9 +77,25 @@ def new(
Create a new connect session for an employer
Args:
+ customer_email: Email address of the customer
+
+ customer_id: Unique identifier for the customer
+
+ customer_name: Name of the customer
+
+ integration: Integration configuration for the connect session
+
+ manual: Enable manual authentication mode
+
minutes_to_expire: The number of minutes until the session expires (defaults to 129,600, which is
90 days)
+ products: The Finch products to request access to
+
+ redirect_uri: The URI to redirect to after the Connect flow is completed
+
+ sandbox: Sandbox mode for testing
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -92,13 +108,13 @@ def new(
"/connect/sessions",
body=maybe_transform(
{
+ "customer_email": customer_email,
"customer_id": customer_id,
"customer_name": customer_name,
- "products": products,
- "customer_email": customer_email,
"integration": integration,
"manual": manual,
"minutes_to_expire": minutes_to_expire,
+ "products": products,
"redirect_uri": redirect_uri,
"sandbox": sandbox,
},
@@ -114,25 +130,24 @@ def reauthenticate(
self,
*,
connection_id: str,
- minutes_to_expire: Optional[int] | Omit = omit,
+ minutes_to_expire: int,
products: Optional[
List[
Literal[
+ "benefits",
"company",
+ "deduction",
"directory",
- "individual",
+ "documents",
"employment",
+ "individual",
"payment",
"pay_statement",
- "benefits",
"ssn",
- "deduction",
- "documents",
]
]
- ]
- | Omit = omit,
- redirect_uri: Optional[str] | Omit = omit,
+ ],
+ redirect_uri: Optional[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -202,28 +217,28 @@ def with_streaming_response(self) -> AsyncSessionsWithStreamingResponse:
async def new(
self,
*,
+ customer_email: Optional[str],
customer_id: str,
customer_name: str,
+ integration: Optional[session_new_params.Integration],
+ manual: Optional[bool],
+ minutes_to_expire: Optional[float],
products: List[
Literal[
+ "benefits",
"company",
+ "deduction",
"directory",
- "individual",
+ "documents",
"employment",
+ "individual",
"payment",
"pay_statement",
- "benefits",
"ssn",
- "deduction",
- "documents",
]
],
- customer_email: Optional[str] | Omit = omit,
- integration: Optional[session_new_params.Integration] | Omit = omit,
- manual: Optional[bool] | Omit = omit,
- minutes_to_expire: Optional[float] | Omit = omit,
- redirect_uri: Optional[str] | Omit = omit,
- sandbox: Optional[Literal["finch", "provider"]] | Omit = omit,
+ redirect_uri: Optional[str],
+ sandbox: Optional[Literal["finch", "provider"]],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -235,9 +250,25 @@ async def new(
Create a new connect session for an employer
Args:
+ customer_email: Email address of the customer
+
+ customer_id: Unique identifier for the customer
+
+ customer_name: Name of the customer
+
+ integration: Integration configuration for the connect session
+
+ manual: Enable manual authentication mode
+
minutes_to_expire: The number of minutes until the session expires (defaults to 129,600, which is
90 days)
+ products: The Finch products to request access to
+
+ redirect_uri: The URI to redirect to after the Connect flow is completed
+
+ sandbox: Sandbox mode for testing
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -250,13 +281,13 @@ async def new(
"/connect/sessions",
body=await async_maybe_transform(
{
+ "customer_email": customer_email,
"customer_id": customer_id,
"customer_name": customer_name,
- "products": products,
- "customer_email": customer_email,
"integration": integration,
"manual": manual,
"minutes_to_expire": minutes_to_expire,
+ "products": products,
"redirect_uri": redirect_uri,
"sandbox": sandbox,
},
@@ -272,25 +303,24 @@ async def reauthenticate(
self,
*,
connection_id: str,
- minutes_to_expire: Optional[int] | Omit = omit,
+ minutes_to_expire: int,
products: Optional[
List[
Literal[
+ "benefits",
"company",
+ "deduction",
"directory",
- "individual",
+ "documents",
"employment",
+ "individual",
"payment",
"pay_statement",
- "benefits",
"ssn",
- "deduction",
- "documents",
]
]
- ]
- | Omit = omit,
- redirect_uri: Optional[str] | Omit = omit,
+ ],
+ redirect_uri: Optional[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/finch/types/connect/session_new_params.py b/src/finch/types/connect/session_new_params.py
index f49dc752..f62c3f1d 100644
--- a/src/finch/types/connect/session_new_params.py
+++ b/src/finch/types/connect/session_new_params.py
@@ -9,45 +9,55 @@
class SessionNewParams(TypedDict, total=False):
+ customer_email: Required[Optional[str]]
+ """Email address of the customer"""
+
customer_id: Required[str]
+ """Unique identifier for the customer"""
customer_name: Required[str]
+ """Name of the customer"""
+
+ integration: Required[Optional[Integration]]
+ """Integration configuration for the connect session"""
+
+ manual: Required[Optional[bool]]
+ """Enable manual authentication mode"""
+
+ minutes_to_expire: Required[Optional[float]]
+ """
+ The number of minutes until the session expires (defaults to 129,600, which is
+ 90 days)
+ """
products: Required[
List[
Literal[
+ "benefits",
"company",
+ "deduction",
"directory",
- "individual",
+ "documents",
"employment",
+ "individual",
"payment",
"pay_statement",
- "benefits",
"ssn",
- "deduction",
- "documents",
]
]
]
+ """The Finch products to request access to"""
- customer_email: Optional[str]
-
- integration: Optional[Integration]
-
- manual: Optional[bool]
-
- minutes_to_expire: Optional[float]
- """
- The number of minutes until the session expires (defaults to 129,600, which is
- 90 days)
- """
-
- redirect_uri: Optional[str]
+ redirect_uri: Required[Optional[str]]
+ """The URI to redirect to after the Connect flow is completed"""
- sandbox: Optional[Literal["finch", "provider"]]
+ sandbox: Required[Optional[Literal["finch", "provider"]]]
+ """Sandbox mode for testing"""
class Integration(TypedDict, total=False):
- auth_method: Optional[Literal["assisted", "credential", "oauth", "api_token"]]
+ auth_method: Required[Optional[Literal["assisted", "credential", "oauth", "api_token"]]]
+ """The authentication method to use"""
- provider: Optional[str]
+ provider: Required[Optional[str]]
+ """The provider to integrate with"""
diff --git a/src/finch/types/connect/session_reauthenticate_params.py b/src/finch/types/connect/session_reauthenticate_params.py
index 124100a5..2e7023ce 100644
--- a/src/finch/types/connect/session_reauthenticate_params.py
+++ b/src/finch/types/connect/session_reauthenticate_params.py
@@ -12,29 +12,31 @@ class SessionReauthenticateParams(TypedDict, total=False):
connection_id: Required[str]
"""The ID of the existing connection to reauthenticate"""
- minutes_to_expire: Optional[int]
+ minutes_to_expire: Required[int]
"""
The number of minutes until the session expires (defaults to 43,200, which is 30
days)
"""
- products: Optional[
- List[
- Literal[
- "company",
- "directory",
- "individual",
- "employment",
- "payment",
- "pay_statement",
- "benefits",
- "ssn",
- "deduction",
- "documents",
+ products: Required[
+ Optional[
+ List[
+ Literal[
+ "benefits",
+ "company",
+ "deduction",
+ "directory",
+ "documents",
+ "employment",
+ "individual",
+ "payment",
+ "pay_statement",
+ "ssn",
+ ]
]
]
]
"""The products to request access to (optional for reauthentication)"""
- redirect_uri: Optional[str]
+ redirect_uri: Required[Optional[str]]
"""The URI to redirect to after the Connect flow is completed"""
diff --git a/tests/api_resources/connect/test_sessions.py b/tests/api_resources/connect/test_sessions.py
index f437d7e6..1728d397 100644
--- a/tests/api_resources/connect/test_sessions.py
+++ b/tests/api_resources/connect/test_sessions.py
@@ -24,26 +24,16 @@ class TestSessions:
@parametrize
def test_method_new(self, client: Finch) -> None:
session = client.connect.sessions.new(
+ customer_email="dev@stainless.com",
customer_id="x",
customer_name="x",
- products=["company"],
- )
- assert_matches_type(SessionNewResponse, session, path=["response"])
-
- @pytest.mark.skip(reason="prism tests are broken")
- @parametrize
- def test_method_new_with_all_params(self, client: Finch) -> None:
- session = client.connect.sessions.new(
- customer_id="x",
- customer_name="x",
- products=["company"],
- customer_email="dev@stainless.com",
integration={
"auth_method": "assisted",
"provider": "provider",
},
manual=True,
minutes_to_expire=1,
+ products=["benefits"],
redirect_uri="redirect_uri",
sandbox="finch",
)
@@ -53,9 +43,18 @@ def test_method_new_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_new(self, client: Finch) -> None:
response = client.connect.sessions.with_raw_response.new(
+ customer_email="dev@stainless.com",
customer_id="x",
customer_name="x",
- products=["company"],
+ integration={
+ "auth_method": "assisted",
+ "provider": "provider",
+ },
+ manual=True,
+ minutes_to_expire=1,
+ products=["benefits"],
+ redirect_uri="redirect_uri",
+ sandbox="finch",
)
assert response.is_closed is True
@@ -67,9 +66,18 @@ def test_raw_response_new(self, client: Finch) -> None:
@parametrize
def test_streaming_response_new(self, client: Finch) -> None:
with client.connect.sessions.with_streaming_response.new(
+ customer_email="dev@stainless.com",
customer_id="x",
customer_name="x",
- products=["company"],
+ integration={
+ "auth_method": "assisted",
+ "provider": "provider",
+ },
+ manual=True,
+ minutes_to_expire=1,
+ products=["benefits"],
+ redirect_uri="redirect_uri",
+ sandbox="finch",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -82,18 +90,10 @@ def test_streaming_response_new(self, client: Finch) -> None:
@pytest.mark.skip(reason="prism tests are broken")
@parametrize
def test_method_reauthenticate(self, client: Finch) -> None:
- session = client.connect.sessions.reauthenticate(
- connection_id="connection_id",
- )
- assert_matches_type(SessionReauthenticateResponse, session, path=["response"])
-
- @pytest.mark.skip(reason="prism tests are broken")
- @parametrize
- def test_method_reauthenticate_with_all_params(self, client: Finch) -> None:
session = client.connect.sessions.reauthenticate(
connection_id="connection_id",
minutes_to_expire=0,
- products=["company"],
+ products=["benefits"],
redirect_uri="https://example.com",
)
assert_matches_type(SessionReauthenticateResponse, session, path=["response"])
@@ -103,6 +103,9 @@ def test_method_reauthenticate_with_all_params(self, client: Finch) -> None:
def test_raw_response_reauthenticate(self, client: Finch) -> None:
response = client.connect.sessions.with_raw_response.reauthenticate(
connection_id="connection_id",
+ minutes_to_expire=0,
+ products=["benefits"],
+ redirect_uri="https://example.com",
)
assert response.is_closed is True
@@ -115,6 +118,9 @@ def test_raw_response_reauthenticate(self, client: Finch) -> None:
def test_streaming_response_reauthenticate(self, client: Finch) -> None:
with client.connect.sessions.with_streaming_response.reauthenticate(
connection_id="connection_id",
+ minutes_to_expire=0,
+ products=["benefits"],
+ redirect_uri="https://example.com",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -134,26 +140,16 @@ class TestAsyncSessions:
@parametrize
async def test_method_new(self, async_client: AsyncFinch) -> None:
session = await async_client.connect.sessions.new(
+ customer_email="dev@stainless.com",
customer_id="x",
customer_name="x",
- products=["company"],
- )
- assert_matches_type(SessionNewResponse, session, path=["response"])
-
- @pytest.mark.skip(reason="prism tests are broken")
- @parametrize
- async def test_method_new_with_all_params(self, async_client: AsyncFinch) -> None:
- session = await async_client.connect.sessions.new(
- customer_id="x",
- customer_name="x",
- products=["company"],
- customer_email="dev@stainless.com",
integration={
"auth_method": "assisted",
"provider": "provider",
},
manual=True,
minutes_to_expire=1,
+ products=["benefits"],
redirect_uri="redirect_uri",
sandbox="finch",
)
@@ -163,9 +159,18 @@ async def test_method_new_with_all_params(self, async_client: AsyncFinch) -> Non
@parametrize
async def test_raw_response_new(self, async_client: AsyncFinch) -> None:
response = await async_client.connect.sessions.with_raw_response.new(
+ customer_email="dev@stainless.com",
customer_id="x",
customer_name="x",
- products=["company"],
+ integration={
+ "auth_method": "assisted",
+ "provider": "provider",
+ },
+ manual=True,
+ minutes_to_expire=1,
+ products=["benefits"],
+ redirect_uri="redirect_uri",
+ sandbox="finch",
)
assert response.is_closed is True
@@ -177,9 +182,18 @@ async def test_raw_response_new(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_new(self, async_client: AsyncFinch) -> None:
async with async_client.connect.sessions.with_streaming_response.new(
+ customer_email="dev@stainless.com",
customer_id="x",
customer_name="x",
- products=["company"],
+ integration={
+ "auth_method": "assisted",
+ "provider": "provider",
+ },
+ manual=True,
+ minutes_to_expire=1,
+ products=["benefits"],
+ redirect_uri="redirect_uri",
+ sandbox="finch",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -192,18 +206,10 @@ async def test_streaming_response_new(self, async_client: AsyncFinch) -> None:
@pytest.mark.skip(reason="prism tests are broken")
@parametrize
async def test_method_reauthenticate(self, async_client: AsyncFinch) -> None:
- session = await async_client.connect.sessions.reauthenticate(
- connection_id="connection_id",
- )
- assert_matches_type(SessionReauthenticateResponse, session, path=["response"])
-
- @pytest.mark.skip(reason="prism tests are broken")
- @parametrize
- async def test_method_reauthenticate_with_all_params(self, async_client: AsyncFinch) -> None:
session = await async_client.connect.sessions.reauthenticate(
connection_id="connection_id",
minutes_to_expire=0,
- products=["company"],
+ products=["benefits"],
redirect_uri="https://example.com",
)
assert_matches_type(SessionReauthenticateResponse, session, path=["response"])
@@ -213,6 +219,9 @@ async def test_method_reauthenticate_with_all_params(self, async_client: AsyncFi
async def test_raw_response_reauthenticate(self, async_client: AsyncFinch) -> None:
response = await async_client.connect.sessions.with_raw_response.reauthenticate(
connection_id="connection_id",
+ minutes_to_expire=0,
+ products=["benefits"],
+ redirect_uri="https://example.com",
)
assert response.is_closed is True
@@ -225,6 +234,9 @@ async def test_raw_response_reauthenticate(self, async_client: AsyncFinch) -> No
async def test_streaming_response_reauthenticate(self, async_client: AsyncFinch) -> None:
async with async_client.connect.sessions.with_streaming_response.reauthenticate(
connection_id="connection_id",
+ minutes_to_expire=0,
+ products=["benefits"],
+ redirect_uri="https://example.com",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
From b676295b15b012c8388ca679ab9815e34ce457df Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 14 Oct 2025 20:25:51 +0000
Subject: [PATCH 15/20] feat(api): api update
---
.stats.yml | 4 ++--
.../benefits/individual_enroll_many_params.py | 19 +++++++++++++++++--
src/finch/types/hris/supported_benefit.py | 2 +-
.../hris/benefits/test_individuals.py | 12 ++++++++++++
4 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 0751652c..80967a2d 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-5f9c0770c8be0fa779cbb640c25043cc1d5514236b8d0d6791c822dd7e00ffe6.yml
-openapi_spec_hash: d8df70c1dc1ba1ebcd572c1fab58eec6
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-b57bba4d2e9b4a64e1c8c3f037aad70e35a164bb1f3b5082948717b94d501a30.yml
+openapi_spec_hash: 7e111f64fb635d9dc76da7eaedd0296f
config_hash: 6d3585c0032e08d723d077d660fc8448
diff --git a/src/finch/types/hris/benefits/individual_enroll_many_params.py b/src/finch/types/hris/benefits/individual_enroll_many_params.py
index d0ea3f43..a20ef4e3 100644
--- a/src/finch/types/hris/benefits/individual_enroll_many_params.py
+++ b/src/finch/types/hris/benefits/individual_enroll_many_params.py
@@ -4,7 +4,7 @@
from typing import Union, Iterable, Optional
from datetime import date
-from typing_extensions import Literal, Annotated, TypedDict
+from typing_extensions import Literal, Required, Annotated, TypedDict
from ...._utils import PropertyInfo
@@ -13,6 +13,7 @@
"Individual",
"IndividualConfiguration",
"IndividualConfigurationCompanyContribution",
+ "IndividualConfigurationCompanyContributionTier",
"IndividualConfigurationEmployeeDeduction",
]
@@ -22,6 +23,14 @@ class IndividualEnrollManyParams(TypedDict, total=False):
"""Array of the individual_id to enroll and a configuration object."""
+class IndividualConfigurationCompanyContributionTier(TypedDict, total=False):
+ match: Required[int]
+ """The employer match percentage in basis points (0-10000 = 0-100%)"""
+
+ threshold: Required[int]
+ """The employee contribution threshold in basis points (0-10000 = 0-100%)"""
+
+
class IndividualConfigurationCompanyContribution(TypedDict, total=False):
amount: int
"""
@@ -29,7 +38,13 @@ class IndividualConfigurationCompanyContribution(TypedDict, total=False):
percent type
"""
- type: Literal["fixed", "percent"]
+ tiers: Iterable[IndividualConfigurationCompanyContributionTier]
+ """
+ Array of tier objects for tiered contribution matching (required when type is
+ tiered)
+ """
+
+ type: Literal["fixed", "percent", "tiered"]
class IndividualConfigurationEmployeeDeduction(TypedDict, total=False):
diff --git a/src/finch/types/hris/supported_benefit.py b/src/finch/types/hris/supported_benefit.py
index 4b57eeb4..1a3634e3 100644
--- a/src/finch/types/hris/supported_benefit.py
+++ b/src/finch/types/hris/supported_benefit.py
@@ -13,7 +13,7 @@ class SupportedBenefit(BaseModel):
annual_maximum: Optional[bool] = None
"""Whether the provider supports an annual maximum for this benefit."""
- company_contribution: Optional[List[Optional[Literal["fixed", "percent"]]]] = None
+ company_contribution: Optional[List[Optional[Literal["fixed", "percent", "tiered"]]]] = None
"""Supported contribution types.
An empty array indicates contributions are not supported.
diff --git a/tests/api_resources/hris/benefits/test_individuals.py b/tests/api_resources/hris/benefits/test_individuals.py
index 13ee6a10..d689761e 100644
--- a/tests/api_resources/hris/benefits/test_individuals.py
+++ b/tests/api_resources/hris/benefits/test_individuals.py
@@ -43,6 +43,12 @@ def test_method_enroll_many_with_all_params(self, client: Finch) -> None:
"catch_up": True,
"company_contribution": {
"amount": 0,
+ "tiers": [
+ {
+ "match": 0,
+ "threshold": 0,
+ }
+ ],
"type": "fixed",
},
"effective_date": parse_date("2019-12-27"),
@@ -243,6 +249,12 @@ async def test_method_enroll_many_with_all_params(self, async_client: AsyncFinch
"catch_up": True,
"company_contribution": {
"amount": 0,
+ "tiers": [
+ {
+ "match": 0,
+ "threshold": 0,
+ }
+ ],
"type": "fixed",
},
"effective_date": parse_date("2019-12-27"),
From 993af10b90d38c53229108e40f1ebb657003d9d6 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 17 Oct 2025 10:22:28 +0000
Subject: [PATCH 16/20] chore: bump `httpx-aiohttp` version to 0.1.9
---
pyproject.toml | 2 +-
requirements-dev.lock | 2 +-
requirements.lock | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 7e582b9f..741f7e13 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -39,7 +39,7 @@ Homepage = "https://github.com/Finch-API/finch-api-python"
Repository = "https://github.com/Finch-API/finch-api-python"
[project.optional-dependencies]
-aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
+aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
[tool.rye]
managed = true
diff --git a/requirements-dev.lock b/requirements-dev.lock
index 1f0c2776..11981681 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -56,7 +56,7 @@ httpx==0.28.1
# via finch-api
# via httpx-aiohttp
# via respx
-httpx-aiohttp==0.1.8
+httpx-aiohttp==0.1.9
# via finch-api
idna==3.4
# via anyio
diff --git a/requirements.lock b/requirements.lock
index 7953c791..b68ef972 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -43,7 +43,7 @@ httpcore==1.0.9
httpx==0.28.1
# via finch-api
# via httpx-aiohttp
-httpx-aiohttp==0.1.8
+httpx-aiohttp==0.1.9
# via finch-api
idna==3.4
# via anyio
From 93a72d479f74907ce25e4117a225e76082ef6c9e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 20 Oct 2025 14:41:33 +0000
Subject: [PATCH 17/20] feat(api): api update
---
.stats.yml | 4 +-
src/finch/types/hris/__init__.py | 2 -
src/finch/types/hris/benefit_contribution.py | 16 ----
.../types/hris/benefits/individual_benefit.py | 84 +++++++++++++++++--
src/finch/types/hris/benfit_contribution.py | 8 --
5 files changed, 81 insertions(+), 33 deletions(-)
delete mode 100644 src/finch/types/hris/benefit_contribution.py
delete mode 100644 src/finch/types/hris/benfit_contribution.py
diff --git a/.stats.yml b/.stats.yml
index 80967a2d..163d24cf 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-b57bba4d2e9b4a64e1c8c3f037aad70e35a164bb1f3b5082948717b94d501a30.yml
-openapi_spec_hash: 7e111f64fb635d9dc76da7eaedd0296f
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-9c32d7e477bd1c441abd65db0dfe6220948aa00face05fc8b57395e368ee2099.yml
+openapi_spec_hash: 3da940ffc5da8000a4f359c958ed341f
config_hash: 6d3585c0032e08d723d077d660fc8448
diff --git a/src/finch/types/hris/__init__.py b/src/finch/types/hris/__init__.py
index cbb3ebd9..52c048d4 100644
--- a/src/finch/types/hris/__init__.py
+++ b/src/finch/types/hris/__init__.py
@@ -15,10 +15,8 @@
from .benefit_frequency import BenefitFrequency as BenefitFrequency
from .document_response import DocumentResponse as DocumentResponse
from .supported_benefit import SupportedBenefit as SupportedBenefit
-from .benfit_contribution import BenfitContribution as BenfitContribution
from .individual_response import IndividualResponse as IndividualResponse
from .payment_list_params import PaymentListParams as PaymentListParams
-from .benefit_contribution import BenefitContribution as BenefitContribution
from .document_list_params import DocumentListParams as DocumentListParams
from .benefit_create_params import BenefitCreateParams as BenefitCreateParams
from .benefit_update_params import BenefitUpdateParams as BenefitUpdateParams
diff --git a/src/finch/types/hris/benefit_contribution.py b/src/finch/types/hris/benefit_contribution.py
deleted file mode 100644
index 66423a85..00000000
--- a/src/finch/types/hris/benefit_contribution.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-from typing_extensions import Literal
-
-from ..._models import BaseModel
-
-__all__ = ["BenefitContribution"]
-
-
-class BenefitContribution(BaseModel):
- amount: Optional[int] = None
- """Contribution amount in cents (if `fixed`) or basis points (if `percent`)."""
-
- type: Optional[Literal["fixed", "percent"]] = None
- """Contribution type."""
diff --git a/src/finch/types/hris/benefits/individual_benefit.py b/src/finch/types/hris/benefits/individual_benefit.py
index f550fdc2..c230f16f 100644
--- a/src/finch/types/hris/benefits/individual_benefit.py
+++ b/src/finch/types/hris/benefits/individual_benefit.py
@@ -1,12 +1,86 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Union, Optional
+from typing import List, Union, Optional
from typing_extensions import Literal, TypeAlias
from ...._models import BaseModel
-from ..benefit_contribution import BenefitContribution
-__all__ = ["IndividualBenefit", "Body", "BodyUnionMember0", "BodyBatchError"]
+__all__ = [
+ "IndividualBenefit",
+ "Body",
+ "BodyUnionMember0",
+ "BodyUnionMember0CompanyContribution",
+ "BodyUnionMember0CompanyContributionUnionMember0",
+ "BodyUnionMember0CompanyContributionUnionMember1",
+ "BodyUnionMember0CompanyContributionUnionMember2",
+ "BodyUnionMember0CompanyContributionUnionMember2Tier",
+ "BodyUnionMember0EmployeeDeduction",
+ "BodyUnionMember0EmployeeDeductionUnionMember0",
+ "BodyUnionMember0EmployeeDeductionUnionMember1",
+ "BodyBatchError",
+]
+
+
+class BodyUnionMember0CompanyContributionUnionMember0(BaseModel):
+ amount: int
+ """Contribution amount in cents."""
+
+ type: Literal["fixed"]
+ """Fixed contribution type."""
+
+
+class BodyUnionMember0CompanyContributionUnionMember1(BaseModel):
+ amount: int
+ """Contribution amount in basis points (1/100th of a percent)."""
+
+ type: Literal["percent"]
+ """Percentage contribution type."""
+
+
+class BodyUnionMember0CompanyContributionUnionMember2Tier(BaseModel):
+ match: int
+
+ threshold: int
+
+
+class BodyUnionMember0CompanyContributionUnionMember2(BaseModel):
+ tiers: List[BodyUnionMember0CompanyContributionUnionMember2Tier]
+ """
+ Array of tier objects defining employer match tiers based on employee
+ contribution thresholds.
+ """
+
+ type: Literal["tiered"]
+ """Tiered contribution type (only valid for company_contribution)."""
+
+
+BodyUnionMember0CompanyContribution: TypeAlias = Union[
+ BodyUnionMember0CompanyContributionUnionMember0,
+ BodyUnionMember0CompanyContributionUnionMember1,
+ BodyUnionMember0CompanyContributionUnionMember2,
+ None,
+]
+
+
+class BodyUnionMember0EmployeeDeductionUnionMember0(BaseModel):
+ amount: int
+ """Contribution amount in cents."""
+
+ type: Literal["fixed"]
+ """Fixed contribution type."""
+
+
+class BodyUnionMember0EmployeeDeductionUnionMember1(BaseModel):
+ amount: int
+ """Contribution amount in basis points (1/100th of a percent)."""
+
+ type: Literal["percent"]
+ """Percentage contribution type."""
+
+
+BodyUnionMember0EmployeeDeduction: TypeAlias = Union[
+ BodyUnionMember0EmployeeDeductionUnionMember0, BodyUnionMember0EmployeeDeductionUnionMember1, None
+]
class BodyUnionMember0(BaseModel):
@@ -21,9 +95,9 @@ class BodyUnionMember0(BaseModel):
for this individual.
"""
- company_contribution: Optional[BenefitContribution] = None
+ company_contribution: Optional[BodyUnionMember0CompanyContribution] = None
- employee_deduction: Optional[BenefitContribution] = None
+ employee_deduction: Optional[BodyUnionMember0EmployeeDeduction] = None
hsa_contribution_limit: Optional[Literal["individual", "family"]] = None
"""Type for HSA contribution limit if the benefit is a HSA."""
diff --git a/src/finch/types/hris/benfit_contribution.py b/src/finch/types/hris/benfit_contribution.py
deleted file mode 100644
index 1e864568..00000000
--- a/src/finch/types/hris/benfit_contribution.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .benefit_contribution import BenefitContribution
-
-__all__ = ["BenfitContribution"]
-
-BenfitContribution = BenefitContribution
-"""use `BenefitContribution` instead"""
From 831b170668e868574307830fc6eb419d4c281cc2 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 25 Oct 2025 00:35:11 +0000
Subject: [PATCH 18/20] feat(api): api update
---
.stats.yml | 4 +-
README.md | 48 +++--
api.md | 18 +-
src/finch/resources/hris/benefits/benefits.py | 166 ++++++++++++++++--
.../resources/hris/benefits/individuals.py | 83 ++++++++-
src/finch/resources/hris/company/company.py | 50 +++++-
.../pay_statement_item/pay_statement_item.py | 10 +-
.../hris/company/pay_statement_item/rules.py | 99 +++++++++--
src/finch/resources/hris/directory.py | 18 +-
src/finch/resources/hris/documents.py | 30 +++-
src/finch/resources/hris/employments.py | 24 ++-
src/finch/resources/hris/individuals.py | 24 ++-
src/finch/resources/hris/pay_statements.py | 24 ++-
src/finch/resources/hris/payments.py | 10 +-
src/finch/resources/payroll/pay_groups.py | 32 +++-
.../types/create_access_token_response.py | 3 +
src/finch/types/hris/__init__.py | 7 +
src/finch/types/hris/benefit_create_params.py | 4 +
src/finch/types/hris/benefit_list_params.py | 14 ++
.../benefit_list_supported_benefits_params.py | 14 ++
.../types/hris/benefit_retrieve_params.py | 14 ++
src/finch/types/hris/benefit_update_params.py | 7 +-
src/finch/types/hris/benefits/__init__.py | 1 +
.../benefits/individual_enroll_many_params.py | 4 +
.../individual_enrolled_ids_params.py | 14 ++
...ndividual_retrieve_many_benefits_params.py | 7 +-
.../individual_unenroll_many_params.py | 5 +-
.../company/pay_statement_item/__init__.py | 2 +
.../pay_statement_item/rule_create_params.py | 7 +-
.../pay_statement_item/rule_delete_params.py | 14 ++
.../pay_statement_item/rule_list_params.py | 14 ++
.../pay_statement_item/rule_update_params.py | 6 +-
.../company/pay_statement_item_list_params.py | 6 +-
.../types/hris/company_retrieve_params.py | 14 ++
.../hris/directory_list_individuals_params.py | 7 +-
src/finch/types/hris/directory_list_params.py | 7 +-
src/finch/types/hris/document_list_params.py | 5 +-
.../types/hris/document_retreive_params.py | 14 ++
.../hris/employment_retrieve_many_params.py | 5 +
.../hris/individual_retrieve_many_params.py | 5 +-
.../pay_statement_retrieve_many_params.py | 5 +
src/finch/types/hris/payment_list_params.py | 4 +
src/finch/types/introspection.py | 28 ++-
src/finch/types/payroll/__init__.py | 1 +
.../types/payroll/pay_group_list_params.py | 5 +-
.../payroll/pay_group_retrieve_params.py | 14 ++
.../hris/benefits/test_individuals.py | 54 +++++-
.../company/pay_statement_item/test_rules.py | 84 ++++++---
.../hris/company/test_pay_statement_item.py | 26 ++-
tests/api_resources/hris/test_benefits.py | 108 +++++++++---
tests/api_resources/hris/test_company.py | 24 ++-
tests/api_resources/hris/test_directory.py | 52 ++++--
tests/api_resources/hris/test_documents.py | 55 ++++--
tests/api_resources/hris/test_employments.py | 6 +
tests/api_resources/hris/test_individuals.py | 26 ++-
.../api_resources/hris/test_pay_statements.py | 6 +
tests/api_resources/hris/test_payments.py | 6 +
.../api_resources/payroll/test_pay_groups.py | 55 ++++--
tests/test_client.py | 30 +++-
59 files changed, 1214 insertions(+), 215 deletions(-)
create mode 100644 src/finch/types/hris/benefit_list_params.py
create mode 100644 src/finch/types/hris/benefit_list_supported_benefits_params.py
create mode 100644 src/finch/types/hris/benefit_retrieve_params.py
create mode 100644 src/finch/types/hris/benefits/individual_enrolled_ids_params.py
create mode 100644 src/finch/types/hris/company/pay_statement_item/rule_delete_params.py
create mode 100644 src/finch/types/hris/company/pay_statement_item/rule_list_params.py
create mode 100644 src/finch/types/hris/company_retrieve_params.py
create mode 100644 src/finch/types/hris/document_retreive_params.py
create mode 100644 src/finch/types/payroll/pay_group_retrieve_params.py
diff --git a/.stats.yml b/.stats.yml
index 163d24cf..d84cf0e8 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-9c32d7e477bd1c441abd65db0dfe6220948aa00face05fc8b57395e368ee2099.yml
-openapi_spec_hash: 3da940ffc5da8000a4f359c958ed341f
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-03a89ccdf10add981e714ad74c145cd3a2408bd0223108bbfe01cef4256ef7ed.yml
+openapi_spec_hash: 4179c69ca2f55a9fcfab41710a2f452c
config_hash: 6d3585c0032e08d723d077d660fc8448
diff --git a/README.md b/README.md
index c93e6fca..6d3b0743 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,9 @@ client = Finch(
access_token="My Access Token",
)
-page = client.hris.directory.list()
+page = client.hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+)
print(page.individuals)
```
@@ -49,7 +51,9 @@ client = AsyncFinch(
async def main() -> None:
- page = await client.hris.directory.list()
+ page = await client.hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
print(page.individuals)
@@ -82,7 +86,9 @@ async def main() -> None:
access_token="My Access Token",
http_client=DefaultAioHttpClient(),
) as client:
- page = await client.hris.directory.list()
+ page = await client.hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
print(page.individuals)
@@ -111,7 +117,9 @@ client = Finch()
all_directories = []
# Automatically fetches more pages as needed.
-for directory in client.hris.directory.list():
+for directory in client.hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+):
# Do something with directory here
all_directories.append(directory)
print(all_directories)
@@ -129,7 +137,9 @@ client = AsyncFinch()
async def main() -> None:
all_directories = []
# Iterate through items across all pages, issuing requests as needed.
- async for directory in client.hris.directory.list():
+ async for directory in client.hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ):
all_directories.append(directory)
print(all_directories)
@@ -140,7 +150,9 @@ asyncio.run(main())
Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:
```python
-first_page = await client.hris.directory.list()
+first_page = await client.hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+)
if first_page.has_next_page():
print(f"will fetch next page using these details: {first_page.next_page_info()}")
next_page = await first_page.get_next_page()
@@ -152,7 +164,9 @@ if first_page.has_next_page():
Or just work directly with the returned data:
```python
-first_page = await client.hris.directory.list()
+first_page = await client.hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+)
print(
f"the current start offset for this page: {first_page.paging.offset}"
@@ -202,7 +216,9 @@ from finch import Finch
client = Finch()
try:
- client.hris.company.retrieve()
+ client.hris.company.retrieve(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
except finch.APIConnectionError as e:
print("The server could not be reached")
print(e.__cause__) # an underlying Exception, likely raised within httpx.
@@ -245,7 +261,9 @@ client = Finch(
)
# Or, configure per-request:
-client.with_options(max_retries=5).hris.directory.list()
+client.with_options(max_retries=5).hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+)
```
### Timeouts
@@ -268,7 +286,9 @@ client = Finch(
)
# Override per-request:
-client.with_options(timeout=5.0).hris.directory.list()
+client.with_options(timeout=5.0).hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+)
```
On timeout, an `APITimeoutError` is thrown.
@@ -325,7 +345,9 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
from finch import Finch
client = Finch()
-response = client.hris.directory.with_raw_response.list()
+response = client.hris.directory.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+)
print(response.headers.get('X-My-Header'))
directory = response.parse() # get the object that `hris.directory.list()` would have returned
@@ -350,7 +372,9 @@ To stream the response body, use `.with_streaming_response` instead, which requi
As such, `.with_streaming_response` methods return a different [`APIResponse`](https://github.com/Finch-API/finch-api-python/tree/main/src/finch/_response.py) object, and the async client returns an [`AsyncAPIResponse`](https://github.com/Finch-API/finch-api-python/tree/main/src/finch/_response.py) object.
```python
-with client.hris.directory.with_streaming_response.list() as response:
+with client.hris.directory.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+) as response:
print(response.headers.get("X-My-Header"))
for line in response.iter_lines():
diff --git a/api.md b/api.md
index 18634d66..54860760 100644
--- a/api.md
+++ b/api.md
@@ -41,7 +41,7 @@ from finch.types.hris import Company
Methods:
-- client.hris.company.retrieve() -> Company
+- client.hris.company.retrieve(\*\*params) -> Company
### PayStatementItem
@@ -72,8 +72,8 @@ Methods:
- client.hris.company.pay_statement_item.rules.create(\*\*params) -> RuleCreateResponse
- client.hris.company.pay_statement_item.rules.update(rule_id, \*\*params) -> RuleUpdateResponse
-- client.hris.company.pay_statement_item.rules.list() -> SyncResponsesPage[RuleListResponse]
-- client.hris.company.pay_statement_item.rules.delete(rule_id) -> RuleDeleteResponse
+- client.hris.company.pay_statement_item.rules.list(\*\*params) -> SyncResponsesPage[RuleListResponse]
+- client.hris.company.pay_statement_item.rules.delete(rule_id, \*\*params) -> RuleDeleteResponse
## Directory
@@ -157,7 +157,7 @@ from finch.types.hris import (
Methods:
- client.hris.documents.list(\*\*params) -> DocumentListResponse
-- client.hris.documents.retreive(document_id) -> DocumentRetreiveResponse
+- client.hris.documents.retreive(document_id, \*\*params) -> DocumentRetreiveResponse
## Benefits
@@ -182,10 +182,10 @@ from finch.types.hris import (
Methods:
- client.hris.benefits.create(\*\*params) -> CreateCompanyBenefitsResponse
-- client.hris.benefits.retrieve(benefit_id) -> CompanyBenefit
+- client.hris.benefits.retrieve(benefit_id, \*\*params) -> CompanyBenefit
- client.hris.benefits.update(benefit_id, \*\*params) -> UpdateCompanyBenefitResponse
-- client.hris.benefits.list() -> SyncSinglePage[CompanyBenefit]
-- client.hris.benefits.list_supported_benefits() -> SyncSinglePage[SupportedBenefit]
+- client.hris.benefits.list(\*\*params) -> SyncSinglePage[CompanyBenefit]
+- client.hris.benefits.list_supported_benefits(\*\*params) -> SyncSinglePage[SupportedBenefit]
### Individuals
@@ -203,7 +203,7 @@ from finch.types.hris.benefits import (
Methods:
- client.hris.benefits.individuals.enroll_many(benefit_id, \*\*params) -> EnrolledIndividualBenefitResponse
-- client.hris.benefits.individuals.enrolled_ids(benefit_id) -> IndividualEnrolledIDsResponse
+- client.hris.benefits.individuals.enrolled_ids(benefit_id, \*\*params) -> IndividualEnrolledIDsResponse
- client.hris.benefits.individuals.retrieve_many_benefits(benefit_id, \*\*params) -> SyncSinglePage[IndividualBenefit]
- client.hris.benefits.individuals.unenroll_many(benefit_id, \*\*params) -> UnenrolledIndividualBenefitResponse
@@ -420,7 +420,7 @@ from finch.types.payroll import PayGroupRetrieveResponse, PayGroupListResponse
Methods:
-- client.payroll.pay_groups.retrieve(pay_group_id) -> PayGroupRetrieveResponse
+- client.payroll.pay_groups.retrieve(pay_group_id, \*\*params) -> PayGroupRetrieveResponse
- client.payroll.pay_groups.list(\*\*params) -> SyncSinglePage[PayGroupListResponse]
# Connect
diff --git a/src/finch/resources/hris/benefits/benefits.py b/src/finch/resources/hris/benefits/benefits.py
index 9ee6c3b0..2383e201 100644
--- a/src/finch/resources/hris/benefits/benefits.py
+++ b/src/finch/resources/hris/benefits/benefits.py
@@ -7,7 +7,7 @@
import httpx
from .... import _legacy_response
-from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from .individuals import (
@@ -21,7 +21,15 @@
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ....pagination import SyncSinglePage, AsyncSinglePage
-from ....types.hris import BenefitType, BenefitFrequency, benefit_create_params, benefit_update_params
+from ....types.hris import (
+ BenefitType,
+ BenefitFrequency,
+ benefit_list_params,
+ benefit_create_params,
+ benefit_update_params,
+ benefit_retrieve_params,
+ benefit_list_supported_benefits_params,
+)
from ...._base_client import AsyncPaginator, make_request_options
from ....types.hris.benefit_type import BenefitType
from ....types.hris.company_benefit import CompanyBenefit
@@ -60,6 +68,7 @@ def with_streaming_response(self) -> BenefitsWithStreamingResponse:
def create(
self,
*,
+ entity_ids: SequenceNotStr[str],
company_contribution: Optional[benefit_create_params.CompanyContribution] | Omit = omit,
description: str | Omit = omit,
frequency: Optional[BenefitFrequency] | Omit = omit,
@@ -77,6 +86,8 @@ def create(
`/providers` endpoint to view available types for each provider.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
company_contribution: The company match for this benefit.
description: Name of the benefit as it appears in the provider and pay statements. Recommend
@@ -107,7 +118,11 @@ def create(
benefit_create_params.BenefitCreateParams,
),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, benefit_create_params.BenefitCreateParams),
),
cast_to=CreateCompanyBenefitsResponse,
)
@@ -116,6 +131,7 @@ def retrieve(
self,
benefit_id: str,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -127,6 +143,8 @@ def retrieve(
Lists deductions and contributions information for a given item
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -140,7 +158,11 @@ def retrieve(
return self._get(
f"/employer/benefits/{benefit_id}",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, benefit_retrieve_params.BenefitRetrieveParams),
),
cast_to=CompanyBenefit,
)
@@ -149,6 +171,7 @@ def update(
self,
benefit_id: str,
*,
+ entity_ids: SequenceNotStr[str],
description: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -161,6 +184,8 @@ def update(
Updates an existing company-wide deduction or contribution
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
description: Updated name or description.
extra_headers: Send extra headers
@@ -177,7 +202,11 @@ def update(
f"/employer/benefits/{benefit_id}",
body=maybe_transform({"description": description}, benefit_update_params.BenefitUpdateParams),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, benefit_update_params.BenefitUpdateParams),
),
cast_to=UpdateCompanyBenefitResponse,
)
@@ -185,6 +214,7 @@ def update(
def list(
self,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -192,12 +222,29 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[CompanyBenefit]:
- """List all company-wide deductions and contributions."""
+ """
+ List all company-wide deductions and contributions.
+
+ Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
return self._get_api_list(
"/employer/benefits",
page=SyncSinglePage[CompanyBenefit],
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, benefit_list_params.BenefitListParams),
),
model=CompanyBenefit,
)
@@ -205,6 +252,7 @@ def list(
def list_supported_benefits(
self,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -212,12 +260,32 @@ def list_supported_benefits(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncSinglePage[SupportedBenefit]:
- """Get deductions metadata"""
+ """
+ Get deductions metadata
+
+ Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
return self._get_api_list(
"/employer/benefits/meta",
page=SyncSinglePage[SupportedBenefit],
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"entity_ids": entity_ids},
+ benefit_list_supported_benefits_params.BenefitListSupportedBenefitsParams,
+ ),
),
model=SupportedBenefit,
)
@@ -250,6 +318,7 @@ def with_streaming_response(self) -> AsyncBenefitsWithStreamingResponse:
async def create(
self,
*,
+ entity_ids: SequenceNotStr[str],
company_contribution: Optional[benefit_create_params.CompanyContribution] | Omit = omit,
description: str | Omit = omit,
frequency: Optional[BenefitFrequency] | Omit = omit,
@@ -267,6 +336,8 @@ async def create(
`/providers` endpoint to view available types for each provider.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
company_contribution: The company match for this benefit.
description: Name of the benefit as it appears in the provider and pay statements. Recommend
@@ -297,7 +368,13 @@ async def create(
benefit_create_params.BenefitCreateParams,
),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"entity_ids": entity_ids}, benefit_create_params.BenefitCreateParams
+ ),
),
cast_to=CreateCompanyBenefitsResponse,
)
@@ -306,6 +383,7 @@ async def retrieve(
self,
benefit_id: str,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -317,6 +395,8 @@ async def retrieve(
Lists deductions and contributions information for a given item
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -330,7 +410,13 @@ async def retrieve(
return await self._get(
f"/employer/benefits/{benefit_id}",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"entity_ids": entity_ids}, benefit_retrieve_params.BenefitRetrieveParams
+ ),
),
cast_to=CompanyBenefit,
)
@@ -339,6 +425,7 @@ async def update(
self,
benefit_id: str,
*,
+ entity_ids: SequenceNotStr[str],
description: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -351,6 +438,8 @@ async def update(
Updates an existing company-wide deduction or contribution
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
description: Updated name or description.
extra_headers: Send extra headers
@@ -367,7 +456,13 @@ async def update(
f"/employer/benefits/{benefit_id}",
body=await async_maybe_transform({"description": description}, benefit_update_params.BenefitUpdateParams),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"entity_ids": entity_ids}, benefit_update_params.BenefitUpdateParams
+ ),
),
cast_to=UpdateCompanyBenefitResponse,
)
@@ -375,6 +470,7 @@ async def update(
def list(
self,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -382,12 +478,29 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[CompanyBenefit, AsyncSinglePage[CompanyBenefit]]:
- """List all company-wide deductions and contributions."""
+ """
+ List all company-wide deductions and contributions.
+
+ Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
return self._get_api_list(
"/employer/benefits",
page=AsyncSinglePage[CompanyBenefit],
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, benefit_list_params.BenefitListParams),
),
model=CompanyBenefit,
)
@@ -395,6 +508,7 @@ def list(
def list_supported_benefits(
self,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -402,12 +516,32 @@ def list_supported_benefits(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[SupportedBenefit, AsyncSinglePage[SupportedBenefit]]:
- """Get deductions metadata"""
+ """
+ Get deductions metadata
+
+ Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
return self._get_api_list(
"/employer/benefits/meta",
page=AsyncSinglePage[SupportedBenefit],
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"entity_ids": entity_ids},
+ benefit_list_supported_benefits_params.BenefitListSupportedBenefitsParams,
+ ),
),
model=SupportedBenefit,
)
diff --git a/src/finch/resources/hris/benefits/individuals.py b/src/finch/resources/hris/benefits/individuals.py
index c8aedc9f..8cc60cec 100644
--- a/src/finch/resources/hris/benefits/individuals.py
+++ b/src/finch/resources/hris/benefits/individuals.py
@@ -16,6 +16,7 @@
from ...._base_client import AsyncPaginator, make_request_options
from ....types.hris.benefits import (
individual_enroll_many_params,
+ individual_enrolled_ids_params,
individual_unenroll_many_params,
individual_retrieve_many_benefits_params,
)
@@ -51,6 +52,7 @@ def enroll_many(
self,
benefit_id: str,
*,
+ entity_ids: SequenceNotStr[str],
individuals: Iterable[individual_enroll_many_params.Individual] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -67,6 +69,8 @@ def enroll_many(
enrollments, but will continue to set the state of the existing enrollment.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
individuals: Array of the individual_id to enroll and a configuration object.
extra_headers: Send extra headers
@@ -83,7 +87,13 @@ def enroll_many(
f"/employer/benefits/{benefit_id}/individuals",
body=maybe_transform(individuals, Iterable[individual_enroll_many_params.Individual]),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"entity_ids": entity_ids}, individual_enroll_many_params.IndividualEnrollManyParams
+ ),
),
cast_to=EnrolledIndividualBenefitResponse,
)
@@ -92,6 +102,7 @@ def enrolled_ids(
self,
benefit_id: str,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -103,6 +114,8 @@ def enrolled_ids(
Lists individuals currently enrolled in a given deduction.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -116,7 +129,13 @@ def enrolled_ids(
return self._get(
f"/employer/benefits/{benefit_id}/enrolled",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"entity_ids": entity_ids}, individual_enrolled_ids_params.IndividualEnrolledIDsParams
+ ),
),
cast_to=IndividualEnrolledIDsResponse,
)
@@ -125,6 +144,7 @@ def retrieve_many_benefits(
self,
benefit_id: str,
*,
+ entity_ids: SequenceNotStr[str],
individual_ids: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -137,6 +157,8 @@ def retrieve_many_benefits(
Get enrollment information for the given individuals.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
individual_ids: comma-delimited list of stable Finch uuids for each individual. If empty,
defaults to all individuals
@@ -159,7 +181,10 @@ def retrieve_many_benefits(
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
- {"individual_ids": individual_ids},
+ {
+ "entity_ids": entity_ids,
+ "individual_ids": individual_ids,
+ },
individual_retrieve_many_benefits_params.IndividualRetrieveManyBenefitsParams,
),
),
@@ -170,6 +195,7 @@ def unenroll_many(
self,
benefit_id: str,
*,
+ entity_ids: SequenceNotStr[str],
individual_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -182,6 +208,8 @@ def unenroll_many(
Unenroll individuals from a deduction or contribution
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
individual_ids: Array of individual_ids to unenroll.
extra_headers: Send extra headers
@@ -200,7 +228,13 @@ def unenroll_many(
{"individual_ids": individual_ids}, individual_unenroll_many_params.IndividualUnenrollManyParams
),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"entity_ids": entity_ids}, individual_unenroll_many_params.IndividualUnenrollManyParams
+ ),
),
cast_to=UnenrolledIndividualBenefitResponse,
)
@@ -230,6 +264,7 @@ async def enroll_many(
self,
benefit_id: str,
*,
+ entity_ids: SequenceNotStr[str],
individuals: Iterable[individual_enroll_many_params.Individual] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -246,6 +281,8 @@ async def enroll_many(
enrollments, but will continue to set the state of the existing enrollment.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
individuals: Array of the individual_id to enroll and a configuration object.
extra_headers: Send extra headers
@@ -262,7 +299,13 @@ async def enroll_many(
f"/employer/benefits/{benefit_id}/individuals",
body=await async_maybe_transform(individuals, Iterable[individual_enroll_many_params.Individual]),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"entity_ids": entity_ids}, individual_enroll_many_params.IndividualEnrollManyParams
+ ),
),
cast_to=EnrolledIndividualBenefitResponse,
)
@@ -271,6 +314,7 @@ async def enrolled_ids(
self,
benefit_id: str,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -282,6 +326,8 @@ async def enrolled_ids(
Lists individuals currently enrolled in a given deduction.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -295,7 +341,13 @@ async def enrolled_ids(
return await self._get(
f"/employer/benefits/{benefit_id}/enrolled",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"entity_ids": entity_ids}, individual_enrolled_ids_params.IndividualEnrolledIDsParams
+ ),
),
cast_to=IndividualEnrolledIDsResponse,
)
@@ -304,6 +356,7 @@ def retrieve_many_benefits(
self,
benefit_id: str,
*,
+ entity_ids: SequenceNotStr[str],
individual_ids: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -316,6 +369,8 @@ def retrieve_many_benefits(
Get enrollment information for the given individuals.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
individual_ids: comma-delimited list of stable Finch uuids for each individual. If empty,
defaults to all individuals
@@ -338,7 +393,10 @@ def retrieve_many_benefits(
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
- {"individual_ids": individual_ids},
+ {
+ "entity_ids": entity_ids,
+ "individual_ids": individual_ids,
+ },
individual_retrieve_many_benefits_params.IndividualRetrieveManyBenefitsParams,
),
),
@@ -349,6 +407,7 @@ async def unenroll_many(
self,
benefit_id: str,
*,
+ entity_ids: SequenceNotStr[str],
individual_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -361,6 +420,8 @@ async def unenroll_many(
Unenroll individuals from a deduction or contribution
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
individual_ids: Array of individual_ids to unenroll.
extra_headers: Send extra headers
@@ -379,7 +440,13 @@ async def unenroll_many(
{"individual_ids": individual_ids}, individual_unenroll_many_params.IndividualUnenrollManyParams
),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"entity_ids": entity_ids}, individual_unenroll_many_params.IndividualUnenrollManyParams
+ ),
),
cast_to=UnenrolledIndividualBenefitResponse,
)
diff --git a/src/finch/resources/hris/company/company.py b/src/finch/resources/hris/company/company.py
index 62cd597c..254a97c5 100644
--- a/src/finch/resources/hris/company/company.py
+++ b/src/finch/resources/hris/company/company.py
@@ -5,10 +5,12 @@
import httpx
from .... import _legacy_response
-from ...._types import Body, Query, Headers, NotGiven, not_given
+from ...._types import Body, Query, Headers, NotGiven, SequenceNotStr, not_given
+from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
+from ....types.hris import company_retrieve_params
from ...._base_client import make_request_options
from ....types.hris.company.company import Company
from .pay_statement_item.pay_statement_item import (
@@ -50,6 +52,7 @@ def with_streaming_response(self) -> CompanyResourceWithStreamingResponse:
def retrieve(
self,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -57,11 +60,28 @@ def retrieve(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Company:
- """Read basic company data"""
+ """
+ Read basic company data
+
+ Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
return self._get(
"/employer/company",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, company_retrieve_params.CompanyRetrieveParams),
),
cast_to=Company,
)
@@ -94,6 +114,7 @@ def with_streaming_response(self) -> AsyncCompanyResourceWithStreamingResponse:
async def retrieve(
self,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -101,11 +122,30 @@ async def retrieve(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Company:
- """Read basic company data"""
+ """
+ Read basic company data
+
+ Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
return await self._get(
"/employer/company",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"entity_ids": entity_ids}, company_retrieve_params.CompanyRetrieveParams
+ ),
),
cast_to=Company,
)
diff --git a/src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py b/src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py
index 8a6ed278..160ba7bb 100644
--- a/src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py
+++ b/src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py
@@ -17,7 +17,7 @@
RulesWithStreamingResponse,
AsyncRulesWithStreamingResponse,
)
-from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ....._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ....._utils import maybe_transform
from ....._compat import cached_property
from ....._resource import SyncAPIResource, AsyncAPIResource
@@ -57,6 +57,7 @@ def with_streaming_response(self) -> PayStatementItemWithStreamingResponse:
def list(
self,
*,
+ entity_ids: SequenceNotStr[str],
categories: List[Literal["earnings", "taxes", "employee_deductions", "employer_contributions"]] | Omit = omit,
end_date: Union[str, date] | Omit = omit,
name: str | Omit = omit,
@@ -75,6 +76,8 @@ def list(
items for the access token's connection account.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
categories: Comma-delimited list of pay statement item categories to filter on. If empty,
defaults to all categories.
@@ -106,6 +109,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "entity_ids": entity_ids,
"categories": categories,
"end_date": end_date,
"name": name,
@@ -146,6 +150,7 @@ def with_streaming_response(self) -> AsyncPayStatementItemWithStreamingResponse:
def list(
self,
*,
+ entity_ids: SequenceNotStr[str],
categories: List[Literal["earnings", "taxes", "employee_deductions", "employer_contributions"]] | Omit = omit,
end_date: Union[str, date] | Omit = omit,
name: str | Omit = omit,
@@ -164,6 +169,8 @@ def list(
items for the access token's connection account.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
categories: Comma-delimited list of pay statement item categories to filter on. If empty,
defaults to all categories.
@@ -195,6 +202,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "entity_ids": entity_ids,
"categories": categories,
"end_date": end_date,
"name": name,
diff --git a/src/finch/resources/hris/company/pay_statement_item/rules.py b/src/finch/resources/hris/company/pay_statement_item/rules.py
index d1c4e6f7..bdcdeaca 100644
--- a/src/finch/resources/hris/company/pay_statement_item/rules.py
+++ b/src/finch/resources/hris/company/pay_statement_item/rules.py
@@ -8,14 +8,19 @@
import httpx
from ..... import _legacy_response
-from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ....._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ....._utils import maybe_transform, async_maybe_transform
from ....._compat import cached_property
from ....._resource import SyncAPIResource, AsyncAPIResource
from ....._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from .....pagination import SyncResponsesPage, AsyncResponsesPage
from ....._base_client import AsyncPaginator, make_request_options
-from .....types.hris.company.pay_statement_item import rule_create_params, rule_update_params
+from .....types.hris.company.pay_statement_item import (
+ rule_list_params,
+ rule_create_params,
+ rule_delete_params,
+ rule_update_params,
+)
from .....types.hris.company.pay_statement_item.rule_list_response import RuleListResponse
from .....types.hris.company.pay_statement_item.rule_create_response import RuleCreateResponse
from .....types.hris.company.pay_statement_item.rule_delete_response import RuleDeleteResponse
@@ -47,6 +52,7 @@ def with_streaming_response(self) -> RulesWithStreamingResponse:
def create(
self,
*,
+ entity_ids: SequenceNotStr[str],
attributes: rule_create_params.Attributes | Omit = omit,
conditions: Iterable[rule_create_params.Condition] | Omit = omit,
effective_end_date: Optional[str] | Omit = omit,
@@ -68,6 +74,8 @@ def create(
information is available.
Args:
+ entity_ids: The entity IDs to create the rule for.
+
attributes: Specifies the fields to be applied when the condition is met.
effective_end_date: Specifies when the rules should stop applying rules based on the date.
@@ -97,7 +105,11 @@ def create(
rule_create_params.RuleCreateParams,
),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, rule_create_params.RuleCreateParams),
),
cast_to=RuleCreateResponse,
)
@@ -106,6 +118,7 @@ def update(
self,
rule_id: str,
*,
+ entity_ids: SequenceNotStr[str],
optional_property: object | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -119,6 +132,8 @@ def update(
historical support will be added soon Update a rule for a pay statement item.
Args:
+ entity_ids: The entity IDs to update the rule for.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -133,7 +148,11 @@ def update(
f"/employer/pay-statement-item/rule/{rule_id}",
body=maybe_transform({"optional_property": optional_property}, rule_update_params.RuleUpdateParams),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, rule_update_params.RuleUpdateParams),
),
cast_to=RuleUpdateResponse,
)
@@ -141,6 +160,7 @@ def update(
def list(
self,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -151,12 +171,27 @@ def list(
"""
**Beta:** this endpoint currently serves employers onboarded after March 4th and
historical support will be added soon List all rules of a connection account.
+
+ Args:
+ entity_ids: The entity IDs to retrieve rules for.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
"/employer/pay-statement-item/rule",
page=SyncResponsesPage[RuleListResponse],
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, rule_list_params.RuleListParams),
),
model=RuleListResponse,
)
@@ -165,6 +200,7 @@ def delete(
self,
rule_id: str,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -177,6 +213,8 @@ def delete(
historical support will be added soon Delete a rule for a pay statement item.
Args:
+ entity_ids: The entity IDs to delete the rule for.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -190,7 +228,11 @@ def delete(
return self._delete(
f"/employer/pay-statement-item/rule/{rule_id}",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, rule_delete_params.RuleDeleteParams),
),
cast_to=RuleDeleteResponse,
)
@@ -219,6 +261,7 @@ def with_streaming_response(self) -> AsyncRulesWithStreamingResponse:
async def create(
self,
*,
+ entity_ids: SequenceNotStr[str],
attributes: rule_create_params.Attributes | Omit = omit,
conditions: Iterable[rule_create_params.Condition] | Omit = omit,
effective_end_date: Optional[str] | Omit = omit,
@@ -240,6 +283,8 @@ async def create(
information is available.
Args:
+ entity_ids: The entity IDs to create the rule for.
+
attributes: Specifies the fields to be applied when the condition is met.
effective_end_date: Specifies when the rules should stop applying rules based on the date.
@@ -269,7 +314,11 @@ async def create(
rule_create_params.RuleCreateParams,
),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform({"entity_ids": entity_ids}, rule_create_params.RuleCreateParams),
),
cast_to=RuleCreateResponse,
)
@@ -278,6 +327,7 @@ async def update(
self,
rule_id: str,
*,
+ entity_ids: SequenceNotStr[str],
optional_property: object | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -291,6 +341,8 @@ async def update(
historical support will be added soon Update a rule for a pay statement item.
Args:
+ entity_ids: The entity IDs to update the rule for.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -307,7 +359,11 @@ async def update(
{"optional_property": optional_property}, rule_update_params.RuleUpdateParams
),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform({"entity_ids": entity_ids}, rule_update_params.RuleUpdateParams),
),
cast_to=RuleUpdateResponse,
)
@@ -315,6 +371,7 @@ async def update(
def list(
self,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -325,12 +382,27 @@ def list(
"""
**Beta:** this endpoint currently serves employers onboarded after March 4th and
historical support will be added soon List all rules of a connection account.
+
+ Args:
+ entity_ids: The entity IDs to retrieve rules for.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get_api_list(
"/employer/pay-statement-item/rule",
page=AsyncResponsesPage[RuleListResponse],
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, rule_list_params.RuleListParams),
),
model=RuleListResponse,
)
@@ -339,6 +411,7 @@ async def delete(
self,
rule_id: str,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -351,6 +424,8 @@ async def delete(
historical support will be added soon Delete a rule for a pay statement item.
Args:
+ entity_ids: The entity IDs to delete the rule for.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -364,7 +439,11 @@ async def delete(
return await self._delete(
f"/employer/pay-statement-item/rule/{rule_id}",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform({"entity_ids": entity_ids}, rule_delete_params.RuleDeleteParams),
),
cast_to=RuleDeleteResponse,
)
diff --git a/src/finch/resources/hris/directory.py b/src/finch/resources/hris/directory.py
index 68ed65f6..43c85661 100644
--- a/src/finch/resources/hris/directory.py
+++ b/src/finch/resources/hris/directory.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -43,6 +43,7 @@ def with_streaming_response(self) -> DirectoryWithStreamingResponse:
def list(
self,
*,
+ entity_ids: SequenceNotStr[str],
limit: int | Omit = omit,
offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -56,6 +57,8 @@ def list(
Read company directory and organization structure
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
limit: Number of employees to return (defaults to all)
offset: Index to start from (defaults to 0)
@@ -78,6 +81,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "entity_ids": entity_ids,
"limit": limit,
"offset": offset,
},
@@ -91,6 +95,7 @@ def list(
def list_individuals(
self,
*,
+ entity_ids: SequenceNotStr[str],
limit: int | Omit = omit,
offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -104,6 +109,8 @@ def list_individuals(
Read company directory and organization structure
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
limit: Number of employees to return (defaults to all)
offset: Index to start from (defaults to 0)
@@ -117,6 +124,7 @@ def list_individuals(
timeout: Override the client-level default timeout for this request, in seconds
"""
return self.list(
+ entity_ids=entity_ids,
limit=limit,
offset=offset,
extra_headers=extra_headers,
@@ -149,6 +157,7 @@ def with_streaming_response(self) -> AsyncDirectoryWithStreamingResponse:
def list(
self,
*,
+ entity_ids: SequenceNotStr[str],
limit: int | Omit = omit,
offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -162,6 +171,8 @@ def list(
Read company directory and organization structure
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
limit: Number of employees to return (defaults to all)
offset: Index to start from (defaults to 0)
@@ -184,6 +195,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "entity_ids": entity_ids,
"limit": limit,
"offset": offset,
},
@@ -197,6 +209,7 @@ def list(
def list_individuals(
self,
*,
+ entity_ids: SequenceNotStr[str],
limit: int | Omit = omit,
offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -210,6 +223,8 @@ def list_individuals(
Read company directory and organization structure
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
limit: Number of employees to return (defaults to all)
offset: Index to start from (defaults to 0)
@@ -223,6 +238,7 @@ def list_individuals(
timeout: Override the client-level default timeout for this request, in seconds
"""
return self.list(
+ entity_ids=entity_ids,
limit=limit,
offset=offset,
extra_headers=extra_headers,
diff --git a/src/finch/resources/hris/documents.py b/src/finch/resources/hris/documents.py
index 08470d21..56968393 100644
--- a/src/finch/resources/hris/documents.py
+++ b/src/finch/resources/hris/documents.py
@@ -13,7 +13,7 @@
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
-from ...types.hris import document_list_params
+from ...types.hris import document_list_params, document_retreive_params
from ..._base_client import make_request_options
from ...types.hris.document_list_response import DocumentListResponse
from ...types.hris.document_retreive_response import DocumentRetreiveResponse
@@ -44,6 +44,7 @@ def with_streaming_response(self) -> DocumentsWithStreamingResponse:
def list(
self,
*,
+ entity_ids: SequenceNotStr[str],
individual_ids: SequenceNotStr[str] | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
@@ -61,6 +62,8 @@ def list(
company-wide documents.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
individual_ids: Comma-delimited list of stable Finch uuids for each individual. If empty,
defaults to all individuals
@@ -88,6 +91,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "entity_ids": entity_ids,
"individual_ids": individual_ids,
"limit": limit,
"offset": offset,
@@ -103,6 +107,7 @@ def retreive(
self,
document_id: str,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -116,6 +121,8 @@ def retreive(
specific document by its ID.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -131,7 +138,11 @@ def retreive(
self._get(
f"/employer/documents/{document_id}",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, document_retreive_params.DocumentRetreiveParams),
),
cast_to=cast(
Any, DocumentRetreiveResponse
@@ -163,6 +174,7 @@ def with_streaming_response(self) -> AsyncDocumentsWithStreamingResponse:
async def list(
self,
*,
+ entity_ids: SequenceNotStr[str],
individual_ids: SequenceNotStr[str] | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
@@ -180,6 +192,8 @@ async def list(
company-wide documents.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
individual_ids: Comma-delimited list of stable Finch uuids for each individual. If empty,
defaults to all individuals
@@ -207,6 +221,7 @@ async def list(
timeout=timeout,
query=await async_maybe_transform(
{
+ "entity_ids": entity_ids,
"individual_ids": individual_ids,
"limit": limit,
"offset": offset,
@@ -222,6 +237,7 @@ async def retreive(
self,
document_id: str,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -235,6 +251,8 @@ async def retreive(
specific document by its ID.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -250,7 +268,13 @@ async def retreive(
await self._get(
f"/employer/documents/{document_id}",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"entity_ids": entity_ids}, document_retreive_params.DocumentRetreiveParams
+ ),
),
cast_to=cast(
Any, DocumentRetreiveResponse
diff --git a/src/finch/resources/hris/employments.py b/src/finch/resources/hris/employments.py
index 957c70f5..e4cdb59f 100644
--- a/src/finch/resources/hris/employments.py
+++ b/src/finch/resources/hris/employments.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import Body, Query, Headers, NotGiven, not_given
+from ..._types import Body, Query, Headers, NotGiven, SequenceNotStr, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -43,6 +43,7 @@ def with_streaming_response(self) -> EmploymentsWithStreamingResponse:
def retrieve_many(
self,
*,
+ entity_ids: SequenceNotStr[str],
requests: Iterable[employment_retrieve_many_params.Request],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -55,6 +56,8 @@ def retrieve_many(
Read individual employment and income data
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
requests: The array of batch requests.
extra_headers: Send extra headers
@@ -70,7 +73,13 @@ def retrieve_many(
page=SyncResponsesPage[EmploymentDataResponse],
body=maybe_transform({"requests": requests}, employment_retrieve_many_params.EmploymentRetrieveManyParams),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"entity_ids": entity_ids}, employment_retrieve_many_params.EmploymentRetrieveManyParams
+ ),
),
model=EmploymentDataResponse,
method="post",
@@ -100,6 +109,7 @@ def with_streaming_response(self) -> AsyncEmploymentsWithStreamingResponse:
def retrieve_many(
self,
*,
+ entity_ids: SequenceNotStr[str],
requests: Iterable[employment_retrieve_many_params.Request],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -112,6 +122,8 @@ def retrieve_many(
Read individual employment and income data
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
requests: The array of batch requests.
extra_headers: Send extra headers
@@ -127,7 +139,13 @@ def retrieve_many(
page=AsyncResponsesPage[EmploymentDataResponse],
body=maybe_transform({"requests": requests}, employment_retrieve_many_params.EmploymentRetrieveManyParams),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"entity_ids": entity_ids}, employment_retrieve_many_params.EmploymentRetrieveManyParams
+ ),
),
model=EmploymentDataResponse,
method="post",
diff --git a/src/finch/resources/hris/individuals.py b/src/finch/resources/hris/individuals.py
index d6fdacf3..b0b66f55 100644
--- a/src/finch/resources/hris/individuals.py
+++ b/src/finch/resources/hris/individuals.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -43,6 +43,7 @@ def with_streaming_response(self) -> IndividualsWithStreamingResponse:
def retrieve_many(
self,
*,
+ entity_ids: SequenceNotStr[str],
options: Optional[individual_retrieve_many_params.Options] | Omit = omit,
requests: Iterable[individual_retrieve_many_params.Request] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -56,6 +57,8 @@ def retrieve_many(
Read individual data, excluding income and employment data
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -75,7 +78,13 @@ def retrieve_many(
individual_retrieve_many_params.IndividualRetrieveManyParams,
),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"entity_ids": entity_ids}, individual_retrieve_many_params.IndividualRetrieveManyParams
+ ),
),
model=IndividualResponse,
method="post",
@@ -105,6 +114,7 @@ def with_streaming_response(self) -> AsyncIndividualsWithStreamingResponse:
def retrieve_many(
self,
*,
+ entity_ids: SequenceNotStr[str],
options: Optional[individual_retrieve_many_params.Options] | Omit = omit,
requests: Iterable[individual_retrieve_many_params.Request] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -118,6 +128,8 @@ def retrieve_many(
Read individual data, excluding income and employment data
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -137,7 +149,13 @@ def retrieve_many(
individual_retrieve_many_params.IndividualRetrieveManyParams,
),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"entity_ids": entity_ids}, individual_retrieve_many_params.IndividualRetrieveManyParams
+ ),
),
model=IndividualResponse,
method="post",
diff --git a/src/finch/resources/hris/pay_statements.py b/src/finch/resources/hris/pay_statements.py
index 6bf92818..c393f864 100644
--- a/src/finch/resources/hris/pay_statements.py
+++ b/src/finch/resources/hris/pay_statements.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import Body, Query, Headers, NotGiven, not_given
+from ..._types import Body, Query, Headers, NotGiven, SequenceNotStr, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -43,6 +43,7 @@ def with_streaming_response(self) -> PayStatementsWithStreamingResponse:
def retrieve_many(
self,
*,
+ entity_ids: SequenceNotStr[str],
requests: Iterable[pay_statement_retrieve_many_params.Request],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -58,6 +59,8 @@ def retrieve_many(
supports Benefits.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
requests: The array of batch requests.
extra_headers: Send extra headers
@@ -75,7 +78,13 @@ def retrieve_many(
{"requests": requests}, pay_statement_retrieve_many_params.PayStatementRetrieveManyParams
),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"entity_ids": entity_ids}, pay_statement_retrieve_many_params.PayStatementRetrieveManyParams
+ ),
),
model=PayStatementResponse,
method="post",
@@ -105,6 +114,7 @@ def with_streaming_response(self) -> AsyncPayStatementsWithStreamingResponse:
def retrieve_many(
self,
*,
+ entity_ids: SequenceNotStr[str],
requests: Iterable[pay_statement_retrieve_many_params.Request],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -120,6 +130,8 @@ def retrieve_many(
supports Benefits.
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
requests: The array of batch requests.
extra_headers: Send extra headers
@@ -137,7 +149,13 @@ def retrieve_many(
{"requests": requests}, pay_statement_retrieve_many_params.PayStatementRetrieveManyParams
),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"entity_ids": entity_ids}, pay_statement_retrieve_many_params.PayStatementRetrieveManyParams
+ ),
),
model=PayStatementResponse,
method="post",
diff --git a/src/finch/resources/hris/payments.py b/src/finch/resources/hris/payments.py
index 0066cb77..e14ca481 100644
--- a/src/finch/resources/hris/payments.py
+++ b/src/finch/resources/hris/payments.py
@@ -8,7 +8,7 @@
import httpx
from ... import _legacy_response
-from ..._types import Body, Query, Headers, NotGiven, not_given
+from ..._types import Body, Query, Headers, NotGiven, SequenceNotStr, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -45,6 +45,7 @@ def list(
self,
*,
end_date: Union[str, date],
+ entity_ids: SequenceNotStr[str],
start_date: Union[str, date],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -60,6 +61,8 @@ def list(
end_date: The end date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
format.
+ entity_ids: The entity IDs to specify which entities' data to access.
+
start_date: The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
format.
@@ -82,6 +85,7 @@ def list(
query=maybe_transform(
{
"end_date": end_date,
+ "entity_ids": entity_ids,
"start_date": start_date,
},
payment_list_params.PaymentListParams,
@@ -115,6 +119,7 @@ def list(
self,
*,
end_date: Union[str, date],
+ entity_ids: SequenceNotStr[str],
start_date: Union[str, date],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -130,6 +135,8 @@ def list(
end_date: The end date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
format.
+ entity_ids: The entity IDs to specify which entities' data to access.
+
start_date: The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
format.
@@ -152,6 +159,7 @@ def list(
query=maybe_transform(
{
"end_date": end_date,
+ "entity_ids": entity_ids,
"start_date": start_date,
},
payment_list_params.PaymentListParams,
diff --git a/src/finch/resources/payroll/pay_groups.py b/src/finch/resources/payroll/pay_groups.py
index dffc9d39..cc3b598f 100644
--- a/src/finch/resources/payroll/pay_groups.py
+++ b/src/finch/resources/payroll/pay_groups.py
@@ -6,13 +6,13 @@
from ... import _legacy_response
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
-from ..._utils import maybe_transform
+from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ...pagination import SyncSinglePage, AsyncSinglePage
from ..._base_client import AsyncPaginator, make_request_options
-from ...types.payroll import pay_group_list_params
+from ...types.payroll import pay_group_list_params, pay_group_retrieve_params
from ...types.payroll.pay_group_list_response import PayGroupListResponse
from ...types.payroll.pay_group_retrieve_response import PayGroupRetrieveResponse
@@ -43,6 +43,7 @@ def retrieve(
self,
pay_group_id: str,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -54,6 +55,8 @@ def retrieve(
Read information from a single pay group
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -67,7 +70,11 @@ def retrieve(
return self._get(
f"/employer/pay-groups/{pay_group_id}",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"entity_ids": entity_ids}, pay_group_retrieve_params.PayGroupRetrieveParams),
),
cast_to=PayGroupRetrieveResponse,
)
@@ -75,6 +82,7 @@ def retrieve(
def list(
self,
*,
+ entity_ids: SequenceNotStr[str],
individual_id: str | Omit = omit,
pay_frequencies: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -88,6 +96,8 @@ def list(
Read company pay groups and frequencies
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -106,6 +116,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "entity_ids": entity_ids,
"individual_id": individual_id,
"pay_frequencies": pay_frequencies,
},
@@ -140,6 +151,7 @@ async def retrieve(
self,
pay_group_id: str,
*,
+ entity_ids: SequenceNotStr[str],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -151,6 +163,8 @@ async def retrieve(
Read information from a single pay group
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -164,7 +178,13 @@ async def retrieve(
return await self._get(
f"/employer/pay-groups/{pay_group_id}",
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"entity_ids": entity_ids}, pay_group_retrieve_params.PayGroupRetrieveParams
+ ),
),
cast_to=PayGroupRetrieveResponse,
)
@@ -172,6 +192,7 @@ async def retrieve(
def list(
self,
*,
+ entity_ids: SequenceNotStr[str],
individual_id: str | Omit = omit,
pay_frequencies: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -185,6 +206,8 @@ def list(
Read company pay groups and frequencies
Args:
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -203,6 +226,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "entity_ids": entity_ids,
"individual_id": individual_id,
"pay_frequencies": pay_frequencies,
},
diff --git a/src/finch/types/create_access_token_response.py b/src/finch/types/create_access_token_response.py
index beddef23..0aacdf48 100644
--- a/src/finch/types/create_access_token_response.py
+++ b/src/finch/types/create_access_token_response.py
@@ -25,6 +25,9 @@ class CreateAccessTokenResponse(BaseModel):
- `finch` - finch-generated data.
"""
+ entity_ids: List[str]
+ """An array of entity IDs that can be accessed with this access token"""
+
products: List[str]
"""An array of the authorized products associated with the `access_token`"""
diff --git a/src/finch/types/hris/__init__.py b/src/finch/types/hris/__init__.py
index 52c048d4..eb98fa99 100644
--- a/src/finch/types/hris/__init__.py
+++ b/src/finch/types/hris/__init__.py
@@ -15,6 +15,7 @@
from .benefit_frequency import BenefitFrequency as BenefitFrequency
from .document_response import DocumentResponse as DocumentResponse
from .supported_benefit import SupportedBenefit as SupportedBenefit
+from .benefit_list_params import BenefitListParams as BenefitListParams
from .individual_response import IndividualResponse as IndividualResponse
from .payment_list_params import PaymentListParams as PaymentListParams
from .document_list_params import DocumentListParams as DocumentListParams
@@ -23,7 +24,10 @@
from .directory_list_params import DirectoryListParams as DirectoryListParams
from .document_list_response import DocumentListResponse as DocumentListResponse
from .pay_statement_response import PayStatementResponse as PayStatementResponse
+from .benefit_retrieve_params import BenefitRetrieveParams as BenefitRetrieveParams
+from .company_retrieve_params import CompanyRetrieveParams as CompanyRetrieveParams
from .individual_in_directory import IndividualInDirectory as IndividualInDirectory
+from .document_retreive_params import DocumentRetreiveParams as DocumentRetreiveParams
from .employment_data_response import EmploymentDataResponse as EmploymentDataResponse
from .support_per_benefit_type import SupportPerBenefitType as SupportPerBenefitType
from .document_retreive_response import DocumentRetreiveResponse as DocumentRetreiveResponse
@@ -36,3 +40,6 @@
from .directory_list_individuals_params import DirectoryListIndividualsParams as DirectoryListIndividualsParams
from .pay_statement_retrieve_many_params import PayStatementRetrieveManyParams as PayStatementRetrieveManyParams
from .pay_statement_data_sync_in_progress import PayStatementDataSyncInProgress as PayStatementDataSyncInProgress
+from .benefit_list_supported_benefits_params import (
+ BenefitListSupportedBenefitsParams as BenefitListSupportedBenefitsParams,
+)
diff --git a/src/finch/types/hris/benefit_create_params.py b/src/finch/types/hris/benefit_create_params.py
index 48b21cf3..b11837bc 100644
--- a/src/finch/types/hris/benefit_create_params.py
+++ b/src/finch/types/hris/benefit_create_params.py
@@ -5,6 +5,7 @@
from typing import Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
+from ..._types import SequenceNotStr
from .benefit_type import BenefitType
from .benefit_frequency import BenefitFrequency
@@ -12,6 +13,9 @@
class BenefitCreateParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
company_contribution: Optional[CompanyContribution]
"""The company match for this benefit."""
diff --git a/src/finch/types/hris/benefit_list_params.py b/src/finch/types/hris/benefit_list_params.py
new file mode 100644
index 00000000..8f0c7fd5
--- /dev/null
+++ b/src/finch/types/hris/benefit_list_params.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from ..._types import SequenceNotStr
+
+__all__ = ["BenefitListParams"]
+
+
+class BenefitListParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/hris/benefit_list_supported_benefits_params.py b/src/finch/types/hris/benefit_list_supported_benefits_params.py
new file mode 100644
index 00000000..d24d4a1e
--- /dev/null
+++ b/src/finch/types/hris/benefit_list_supported_benefits_params.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from ..._types import SequenceNotStr
+
+__all__ = ["BenefitListSupportedBenefitsParams"]
+
+
+class BenefitListSupportedBenefitsParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/hris/benefit_retrieve_params.py b/src/finch/types/hris/benefit_retrieve_params.py
new file mode 100644
index 00000000..3eb2f6d0
--- /dev/null
+++ b/src/finch/types/hris/benefit_retrieve_params.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from ..._types import SequenceNotStr
+
+__all__ = ["BenefitRetrieveParams"]
+
+
+class BenefitRetrieveParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/hris/benefit_update_params.py b/src/finch/types/hris/benefit_update_params.py
index 33ddfff2..667be3be 100644
--- a/src/finch/types/hris/benefit_update_params.py
+++ b/src/finch/types/hris/benefit_update_params.py
@@ -2,11 +2,16 @@
from __future__ import annotations
-from typing_extensions import TypedDict
+from typing_extensions import Required, TypedDict
+
+from ..._types import SequenceNotStr
__all__ = ["BenefitUpdateParams"]
class BenefitUpdateParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
description: str
"""Updated name or description."""
diff --git a/src/finch/types/hris/benefits/__init__.py b/src/finch/types/hris/benefits/__init__.py
index 90057bb2..47052d79 100644
--- a/src/finch/types/hris/benefits/__init__.py
+++ b/src/finch/types/hris/benefits/__init__.py
@@ -4,6 +4,7 @@
from .individual_benefit import IndividualBenefit as IndividualBenefit
from .individual_enroll_many_params import IndividualEnrollManyParams as IndividualEnrollManyParams
+from .individual_enrolled_ids_params import IndividualEnrolledIDsParams as IndividualEnrolledIDsParams
from .individual_unenroll_many_params import IndividualUnenrollManyParams as IndividualUnenrollManyParams
from .individual_enrolled_ids_response import IndividualEnrolledIDsResponse as IndividualEnrolledIDsResponse
from .enrolled_individual_benefit_response import EnrolledIndividualBenefitResponse as EnrolledIndividualBenefitResponse
diff --git a/src/finch/types/hris/benefits/individual_enroll_many_params.py b/src/finch/types/hris/benefits/individual_enroll_many_params.py
index a20ef4e3..c4eb9119 100644
--- a/src/finch/types/hris/benefits/individual_enroll_many_params.py
+++ b/src/finch/types/hris/benefits/individual_enroll_many_params.py
@@ -6,6 +6,7 @@
from datetime import date
from typing_extensions import Literal, Required, Annotated, TypedDict
+from ...._types import SequenceNotStr
from ...._utils import PropertyInfo
__all__ = [
@@ -19,6 +20,9 @@
class IndividualEnrollManyParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
individuals: Iterable[Individual]
"""Array of the individual_id to enroll and a configuration object."""
diff --git a/src/finch/types/hris/benefits/individual_enrolled_ids_params.py b/src/finch/types/hris/benefits/individual_enrolled_ids_params.py
new file mode 100644
index 00000000..8b3555bb
--- /dev/null
+++ b/src/finch/types/hris/benefits/individual_enrolled_ids_params.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from ...._types import SequenceNotStr
+
+__all__ = ["IndividualEnrolledIDsParams"]
+
+
+class IndividualEnrolledIDsParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/hris/benefits/individual_retrieve_many_benefits_params.py b/src/finch/types/hris/benefits/individual_retrieve_many_benefits_params.py
index dab473e1..5c11aea2 100644
--- a/src/finch/types/hris/benefits/individual_retrieve_many_benefits_params.py
+++ b/src/finch/types/hris/benefits/individual_retrieve_many_benefits_params.py
@@ -2,12 +2,17 @@
from __future__ import annotations
-from typing_extensions import TypedDict
+from typing_extensions import Required, TypedDict
+
+from ...._types import SequenceNotStr
__all__ = ["IndividualRetrieveManyBenefitsParams"]
class IndividualRetrieveManyBenefitsParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
individual_ids: str
"""comma-delimited list of stable Finch uuids for each individual.
diff --git a/src/finch/types/hris/benefits/individual_unenroll_many_params.py b/src/finch/types/hris/benefits/individual_unenroll_many_params.py
index 28263e89..8368a083 100644
--- a/src/finch/types/hris/benefits/individual_unenroll_many_params.py
+++ b/src/finch/types/hris/benefits/individual_unenroll_many_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import TypedDict
+from typing_extensions import Required, TypedDict
from ...._types import SequenceNotStr
@@ -10,5 +10,8 @@
class IndividualUnenrollManyParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
individual_ids: SequenceNotStr[str]
"""Array of individual_ids to unenroll."""
diff --git a/src/finch/types/hris/company/pay_statement_item/__init__.py b/src/finch/types/hris/company/pay_statement_item/__init__.py
index 15e0b3ff..4ff8bafc 100644
--- a/src/finch/types/hris/company/pay_statement_item/__init__.py
+++ b/src/finch/types/hris/company/pay_statement_item/__init__.py
@@ -2,7 +2,9 @@
from __future__ import annotations
+from .rule_list_params import RuleListParams as RuleListParams
from .rule_create_params import RuleCreateParams as RuleCreateParams
+from .rule_delete_params import RuleDeleteParams as RuleDeleteParams
from .rule_list_response import RuleListResponse as RuleListResponse
from .rule_update_params import RuleUpdateParams as RuleUpdateParams
from .rule_create_response import RuleCreateResponse as RuleCreateResponse
diff --git a/src/finch/types/hris/company/pay_statement_item/rule_create_params.py b/src/finch/types/hris/company/pay_statement_item/rule_create_params.py
index 8154426b..e4e87c2d 100644
--- a/src/finch/types/hris/company/pay_statement_item/rule_create_params.py
+++ b/src/finch/types/hris/company/pay_statement_item/rule_create_params.py
@@ -3,12 +3,17 @@
from __future__ import annotations
from typing import Dict, Iterable, Optional
-from typing_extensions import Literal, TypedDict
+from typing_extensions import Literal, Required, TypedDict
+
+from ....._types import SequenceNotStr
__all__ = ["RuleCreateParams", "Attributes", "Condition"]
class RuleCreateParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to create the rule for."""
+
attributes: Attributes
"""Specifies the fields to be applied when the condition is met."""
diff --git a/src/finch/types/hris/company/pay_statement_item/rule_delete_params.py b/src/finch/types/hris/company/pay_statement_item/rule_delete_params.py
new file mode 100644
index 00000000..ca0dbcf9
--- /dev/null
+++ b/src/finch/types/hris/company/pay_statement_item/rule_delete_params.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from ....._types import SequenceNotStr
+
+__all__ = ["RuleDeleteParams"]
+
+
+class RuleDeleteParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to delete the rule for."""
diff --git a/src/finch/types/hris/company/pay_statement_item/rule_list_params.py b/src/finch/types/hris/company/pay_statement_item/rule_list_params.py
new file mode 100644
index 00000000..cd49ff51
--- /dev/null
+++ b/src/finch/types/hris/company/pay_statement_item/rule_list_params.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from ....._types import SequenceNotStr
+
+__all__ = ["RuleListParams"]
+
+
+class RuleListParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to retrieve rules for."""
diff --git a/src/finch/types/hris/company/pay_statement_item/rule_update_params.py b/src/finch/types/hris/company/pay_statement_item/rule_update_params.py
index e0f18618..19dc5e58 100644
--- a/src/finch/types/hris/company/pay_statement_item/rule_update_params.py
+++ b/src/finch/types/hris/company/pay_statement_item/rule_update_params.py
@@ -2,12 +2,16 @@
from __future__ import annotations
-from typing_extensions import Annotated, TypedDict
+from typing_extensions import Required, Annotated, TypedDict
+from ....._types import SequenceNotStr
from ....._utils import PropertyInfo
__all__ = ["RuleUpdateParams"]
class RuleUpdateParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to update the rule for."""
+
optional_property: Annotated[object, PropertyInfo(alias="optionalProperty")]
diff --git a/src/finch/types/hris/company/pay_statement_item_list_params.py b/src/finch/types/hris/company/pay_statement_item_list_params.py
index 9d4dabf6..05de54dc 100644
--- a/src/finch/types/hris/company/pay_statement_item_list_params.py
+++ b/src/finch/types/hris/company/pay_statement_item_list_params.py
@@ -4,14 +4,18 @@
from typing import List, Union
from datetime import date
-from typing_extensions import Literal, Annotated, TypedDict
+from typing_extensions import Literal, Required, Annotated, TypedDict
+from ...._types import SequenceNotStr
from ...._utils import PropertyInfo
__all__ = ["PayStatementItemListParams"]
class PayStatementItemListParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
categories: List[Literal["earnings", "taxes", "employee_deductions", "employer_contributions"]]
"""Comma-delimited list of pay statement item categories to filter on.
diff --git a/src/finch/types/hris/company_retrieve_params.py b/src/finch/types/hris/company_retrieve_params.py
new file mode 100644
index 00000000..1c9b008b
--- /dev/null
+++ b/src/finch/types/hris/company_retrieve_params.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from ..._types import SequenceNotStr
+
+__all__ = ["CompanyRetrieveParams"]
+
+
+class CompanyRetrieveParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/hris/directory_list_individuals_params.py b/src/finch/types/hris/directory_list_individuals_params.py
index b70a073e..d1f45447 100644
--- a/src/finch/types/hris/directory_list_individuals_params.py
+++ b/src/finch/types/hris/directory_list_individuals_params.py
@@ -2,12 +2,17 @@
from __future__ import annotations
-from typing_extensions import TypedDict
+from typing_extensions import Required, TypedDict
+
+from ..._types import SequenceNotStr
__all__ = ["DirectoryListIndividualsParams"]
class DirectoryListIndividualsParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
limit: int
"""Number of employees to return (defaults to all)"""
diff --git a/src/finch/types/hris/directory_list_params.py b/src/finch/types/hris/directory_list_params.py
index f6aceee4..d3e82e13 100644
--- a/src/finch/types/hris/directory_list_params.py
+++ b/src/finch/types/hris/directory_list_params.py
@@ -2,12 +2,17 @@
from __future__ import annotations
-from typing_extensions import TypedDict
+from typing_extensions import Required, TypedDict
+
+from ..._types import SequenceNotStr
__all__ = ["DirectoryListParams"]
class DirectoryListParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
limit: int
"""Number of employees to return (defaults to all)"""
diff --git a/src/finch/types/hris/document_list_params.py b/src/finch/types/hris/document_list_params.py
index 23b35355..b56b5d71 100644
--- a/src/finch/types/hris/document_list_params.py
+++ b/src/finch/types/hris/document_list_params.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import List
-from typing_extensions import Literal, TypedDict
+from typing_extensions import Literal, Required, TypedDict
from ..._types import SequenceNotStr
@@ -11,6 +11,9 @@
class DocumentListParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
individual_ids: SequenceNotStr[str]
"""Comma-delimited list of stable Finch uuids for each individual.
diff --git a/src/finch/types/hris/document_retreive_params.py b/src/finch/types/hris/document_retreive_params.py
new file mode 100644
index 00000000..275ea29f
--- /dev/null
+++ b/src/finch/types/hris/document_retreive_params.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from ..._types import SequenceNotStr
+
+__all__ = ["DocumentRetreiveParams"]
+
+
+class DocumentRetreiveParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/hris/employment_retrieve_many_params.py b/src/finch/types/hris/employment_retrieve_many_params.py
index 0aeccf6c..69dd329e 100644
--- a/src/finch/types/hris/employment_retrieve_many_params.py
+++ b/src/finch/types/hris/employment_retrieve_many_params.py
@@ -5,10 +5,15 @@
from typing import Iterable
from typing_extensions import Required, TypedDict
+from ..._types import SequenceNotStr
+
__all__ = ["EmploymentRetrieveManyParams", "Request"]
class EmploymentRetrieveManyParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
requests: Required[Iterable[Request]]
"""The array of batch requests."""
diff --git a/src/finch/types/hris/individual_retrieve_many_params.py b/src/finch/types/hris/individual_retrieve_many_params.py
index 86686eac..0cb18d93 100644
--- a/src/finch/types/hris/individual_retrieve_many_params.py
+++ b/src/finch/types/hris/individual_retrieve_many_params.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import Iterable, Optional
-from typing_extensions import TypedDict
+from typing_extensions import Required, TypedDict
from ..._types import SequenceNotStr
@@ -11,6 +11,9 @@
class IndividualRetrieveManyParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
options: Optional[Options]
requests: Iterable[Request]
diff --git a/src/finch/types/hris/pay_statement_retrieve_many_params.py b/src/finch/types/hris/pay_statement_retrieve_many_params.py
index 7a08009c..63595021 100644
--- a/src/finch/types/hris/pay_statement_retrieve_many_params.py
+++ b/src/finch/types/hris/pay_statement_retrieve_many_params.py
@@ -5,10 +5,15 @@
from typing import Iterable
from typing_extensions import Required, TypedDict
+from ..._types import SequenceNotStr
+
__all__ = ["PayStatementRetrieveManyParams", "Request"]
class PayStatementRetrieveManyParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
requests: Required[Iterable[Request]]
"""The array of batch requests."""
diff --git a/src/finch/types/hris/payment_list_params.py b/src/finch/types/hris/payment_list_params.py
index 5b0cd004..f43022bf 100644
--- a/src/finch/types/hris/payment_list_params.py
+++ b/src/finch/types/hris/payment_list_params.py
@@ -6,6 +6,7 @@
from datetime import date
from typing_extensions import Required, Annotated, TypedDict
+from ..._types import SequenceNotStr
from ..._utils import PropertyInfo
__all__ = ["PaymentListParams"]
@@ -18,6 +19,9 @@ class PaymentListParams(TypedDict, total=False):
format.
"""
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
start_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
"""
The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
diff --git a/src/finch/types/introspection.py b/src/finch/types/introspection.py
index 30847577..03730a3c 100644
--- a/src/finch/types/introspection.py
+++ b/src/finch/types/introspection.py
@@ -7,7 +7,13 @@
from .._models import BaseModel
from .shared.connection_status_type import ConnectionStatusType
-__all__ = ["Introspection", "ConnectionStatus", "AuthenticationMethod", "AuthenticationMethodConnectionStatus"]
+__all__ = [
+ "Introspection",
+ "ConnectionStatus",
+ "AuthenticationMethod",
+ "AuthenticationMethodConnectionStatus",
+ "Entity",
+]
class ConnectionStatus(BaseModel):
@@ -38,6 +44,20 @@ class AuthenticationMethod(BaseModel):
"""An array of the authorized products associated with the `access_token`"""
+class Entity(BaseModel):
+ id: str
+ """The connection account ID for this entity"""
+
+ name: Optional[str] = None
+ """The name of the entity (payroll provider company name)"""
+
+ source_id: Optional[str] = None
+ """The source ID of the entity"""
+
+ type: Optional[str] = None
+ """The type of entity"""
+
+
class Introspection(BaseModel):
id: str
"""The Finch UUID of the token being introspected"""
@@ -98,6 +118,12 @@ class Introspection(BaseModel):
created for this connection
"""
+ entities: Optional[List[Entity]] = None
+ """
+ Array of detailed entity information for each connected account in multi-account
+ mode
+ """
+
manual: Optional[bool] = None
"""
Whether the connection associated with the `access_token` uses the Assisted
diff --git a/src/finch/types/payroll/__init__.py b/src/finch/types/payroll/__init__.py
index f98e6098..3697ce53 100644
--- a/src/finch/types/payroll/__init__.py
+++ b/src/finch/types/payroll/__init__.py
@@ -4,4 +4,5 @@
from .pay_group_list_params import PayGroupListParams as PayGroupListParams
from .pay_group_list_response import PayGroupListResponse as PayGroupListResponse
+from .pay_group_retrieve_params import PayGroupRetrieveParams as PayGroupRetrieveParams
from .pay_group_retrieve_response import PayGroupRetrieveResponse as PayGroupRetrieveResponse
diff --git a/src/finch/types/payroll/pay_group_list_params.py b/src/finch/types/payroll/pay_group_list_params.py
index 67a6044e..0e48056e 100644
--- a/src/finch/types/payroll/pay_group_list_params.py
+++ b/src/finch/types/payroll/pay_group_list_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import TypedDict
+from typing_extensions import Required, TypedDict
from ..._types import SequenceNotStr
@@ -10,6 +10,9 @@
class PayGroupListParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
+
individual_id: str
pay_frequencies: SequenceNotStr[str]
diff --git a/src/finch/types/payroll/pay_group_retrieve_params.py b/src/finch/types/payroll/pay_group_retrieve_params.py
new file mode 100644
index 00000000..eb229d7e
--- /dev/null
+++ b/src/finch/types/payroll/pay_group_retrieve_params.py
@@ -0,0 +1,14 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from ..._types import SequenceNotStr
+
+__all__ = ["PayGroupRetrieveParams"]
+
+
+class PayGroupRetrieveParams(TypedDict, total=False):
+ entity_ids: Required[SequenceNotStr[str]]
+ """The entity IDs to specify which entities' data to access."""
diff --git a/tests/api_resources/hris/benefits/test_individuals.py b/tests/api_resources/hris/benefits/test_individuals.py
index d689761e..ccb6cd08 100644
--- a/tests/api_resources/hris/benefits/test_individuals.py
+++ b/tests/api_resources/hris/benefits/test_individuals.py
@@ -28,6 +28,7 @@ class TestIndividuals:
def test_method_enroll_many(self, client: Finch) -> None:
individual = client.hris.benefits.individuals.enroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(EnrolledIndividualBenefitResponse, individual, path=["response"])
@@ -35,6 +36,7 @@ def test_method_enroll_many(self, client: Finch) -> None:
def test_method_enroll_many_with_all_params(self, client: Finch) -> None:
individual = client.hris.benefits.individuals.enroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
individuals=[
{
"configuration": {
@@ -67,6 +69,7 @@ def test_method_enroll_many_with_all_params(self, client: Finch) -> None:
def test_raw_response_enroll_many(self, client: Finch) -> None:
response = client.hris.benefits.individuals.with_raw_response.enroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -78,6 +81,7 @@ def test_raw_response_enroll_many(self, client: Finch) -> None:
def test_streaming_response_enroll_many(self, client: Finch) -> None:
with client.hris.benefits.individuals.with_streaming_response.enroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -92,19 +96,22 @@ def test_path_params_enroll_many(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
client.hris.benefits.individuals.with_raw_response.enroll_many(
benefit_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_enrolled_ids(self, client: Finch) -> None:
individual = client.hris.benefits.individuals.enrolled_ids(
- "benefit_id",
+ benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(IndividualEnrolledIDsResponse, individual, path=["response"])
@parametrize
def test_raw_response_enrolled_ids(self, client: Finch) -> None:
response = client.hris.benefits.individuals.with_raw_response.enrolled_ids(
- "benefit_id",
+ benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -115,7 +122,8 @@ def test_raw_response_enrolled_ids(self, client: Finch) -> None:
@parametrize
def test_streaming_response_enrolled_ids(self, client: Finch) -> None:
with client.hris.benefits.individuals.with_streaming_response.enrolled_ids(
- "benefit_id",
+ benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -129,13 +137,15 @@ def test_streaming_response_enrolled_ids(self, client: Finch) -> None:
def test_path_params_enrolled_ids(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
client.hris.benefits.individuals.with_raw_response.enrolled_ids(
- "",
+ benefit_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_retrieve_many_benefits(self, client: Finch) -> None:
individual = client.hris.benefits.individuals.retrieve_many_benefits(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(SyncSinglePage[IndividualBenefit], individual, path=["response"])
@@ -143,6 +153,7 @@ def test_method_retrieve_many_benefits(self, client: Finch) -> None:
def test_method_retrieve_many_benefits_with_all_params(self, client: Finch) -> None:
individual = client.hris.benefits.individuals.retrieve_many_benefits(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
individual_ids="d675d2b7-6d7b-41a8-b2d3-001eb3fb88f6,d02a6346-1f08-4312-a064-49ff3cafaa7a",
)
assert_matches_type(SyncSinglePage[IndividualBenefit], individual, path=["response"])
@@ -151,6 +162,7 @@ def test_method_retrieve_many_benefits_with_all_params(self, client: Finch) -> N
def test_raw_response_retrieve_many_benefits(self, client: Finch) -> None:
response = client.hris.benefits.individuals.with_raw_response.retrieve_many_benefits(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -162,6 +174,7 @@ def test_raw_response_retrieve_many_benefits(self, client: Finch) -> None:
def test_streaming_response_retrieve_many_benefits(self, client: Finch) -> None:
with client.hris.benefits.individuals.with_streaming_response.retrieve_many_benefits(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -176,12 +189,14 @@ def test_path_params_retrieve_many_benefits(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
client.hris.benefits.individuals.with_raw_response.retrieve_many_benefits(
benefit_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_unenroll_many(self, client: Finch) -> None:
individual = client.hris.benefits.individuals.unenroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(UnenrolledIndividualBenefitResponse, individual, path=["response"])
@@ -189,6 +204,7 @@ def test_method_unenroll_many(self, client: Finch) -> None:
def test_method_unenroll_many_with_all_params(self, client: Finch) -> None:
individual = client.hris.benefits.individuals.unenroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
individual_ids=["string"],
)
assert_matches_type(UnenrolledIndividualBenefitResponse, individual, path=["response"])
@@ -197,6 +213,7 @@ def test_method_unenroll_many_with_all_params(self, client: Finch) -> None:
def test_raw_response_unenroll_many(self, client: Finch) -> None:
response = client.hris.benefits.individuals.with_raw_response.unenroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -208,6 +225,7 @@ def test_raw_response_unenroll_many(self, client: Finch) -> None:
def test_streaming_response_unenroll_many(self, client: Finch) -> None:
with client.hris.benefits.individuals.with_streaming_response.unenroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -222,6 +240,7 @@ def test_path_params_unenroll_many(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
client.hris.benefits.individuals.with_raw_response.unenroll_many(
benefit_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -234,6 +253,7 @@ class TestAsyncIndividuals:
async def test_method_enroll_many(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.benefits.individuals.enroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(EnrolledIndividualBenefitResponse, individual, path=["response"])
@@ -241,6 +261,7 @@ async def test_method_enroll_many(self, async_client: AsyncFinch) -> None:
async def test_method_enroll_many_with_all_params(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.benefits.individuals.enroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
individuals=[
{
"configuration": {
@@ -273,6 +294,7 @@ async def test_method_enroll_many_with_all_params(self, async_client: AsyncFinch
async def test_raw_response_enroll_many(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.benefits.individuals.with_raw_response.enroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -284,6 +306,7 @@ async def test_raw_response_enroll_many(self, async_client: AsyncFinch) -> None:
async def test_streaming_response_enroll_many(self, async_client: AsyncFinch) -> None:
async with async_client.hris.benefits.individuals.with_streaming_response.enroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -298,19 +321,22 @@ async def test_path_params_enroll_many(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
await async_client.hris.benefits.individuals.with_raw_response.enroll_many(
benefit_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_enrolled_ids(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.benefits.individuals.enrolled_ids(
- "benefit_id",
+ benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(IndividualEnrolledIDsResponse, individual, path=["response"])
@parametrize
async def test_raw_response_enrolled_ids(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.benefits.individuals.with_raw_response.enrolled_ids(
- "benefit_id",
+ benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -321,7 +347,8 @@ async def test_raw_response_enrolled_ids(self, async_client: AsyncFinch) -> None
@parametrize
async def test_streaming_response_enrolled_ids(self, async_client: AsyncFinch) -> None:
async with async_client.hris.benefits.individuals.with_streaming_response.enrolled_ids(
- "benefit_id",
+ benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -335,13 +362,15 @@ async def test_streaming_response_enrolled_ids(self, async_client: AsyncFinch) -
async def test_path_params_enrolled_ids(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
await async_client.hris.benefits.individuals.with_raw_response.enrolled_ids(
- "",
+ benefit_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_retrieve_many_benefits(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.benefits.individuals.retrieve_many_benefits(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(AsyncSinglePage[IndividualBenefit], individual, path=["response"])
@@ -349,6 +378,7 @@ async def test_method_retrieve_many_benefits(self, async_client: AsyncFinch) ->
async def test_method_retrieve_many_benefits_with_all_params(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.benefits.individuals.retrieve_many_benefits(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
individual_ids="d675d2b7-6d7b-41a8-b2d3-001eb3fb88f6,d02a6346-1f08-4312-a064-49ff3cafaa7a",
)
assert_matches_type(AsyncSinglePage[IndividualBenefit], individual, path=["response"])
@@ -357,6 +387,7 @@ async def test_method_retrieve_many_benefits_with_all_params(self, async_client:
async def test_raw_response_retrieve_many_benefits(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.benefits.individuals.with_raw_response.retrieve_many_benefits(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -368,6 +399,7 @@ async def test_raw_response_retrieve_many_benefits(self, async_client: AsyncFinc
async def test_streaming_response_retrieve_many_benefits(self, async_client: AsyncFinch) -> None:
async with async_client.hris.benefits.individuals.with_streaming_response.retrieve_many_benefits(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -382,12 +414,14 @@ async def test_path_params_retrieve_many_benefits(self, async_client: AsyncFinch
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
await async_client.hris.benefits.individuals.with_raw_response.retrieve_many_benefits(
benefit_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_unenroll_many(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.benefits.individuals.unenroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(UnenrolledIndividualBenefitResponse, individual, path=["response"])
@@ -395,6 +429,7 @@ async def test_method_unenroll_many(self, async_client: AsyncFinch) -> None:
async def test_method_unenroll_many_with_all_params(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.benefits.individuals.unenroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
individual_ids=["string"],
)
assert_matches_type(UnenrolledIndividualBenefitResponse, individual, path=["response"])
@@ -403,6 +438,7 @@ async def test_method_unenroll_many_with_all_params(self, async_client: AsyncFin
async def test_raw_response_unenroll_many(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.benefits.individuals.with_raw_response.unenroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -414,6 +450,7 @@ async def test_raw_response_unenroll_many(self, async_client: AsyncFinch) -> Non
async def test_streaming_response_unenroll_many(self, async_client: AsyncFinch) -> None:
async with async_client.hris.benefits.individuals.with_streaming_response.unenroll_many(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -428,4 +465,5 @@ async def test_path_params_unenroll_many(self, async_client: AsyncFinch) -> None
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
await async_client.hris.benefits.individuals.with_raw_response.unenroll_many(
benefit_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
diff --git a/tests/api_resources/hris/company/pay_statement_item/test_rules.py b/tests/api_resources/hris/company/pay_statement_item/test_rules.py
index 340a7d99..3f548af3 100644
--- a/tests/api_resources/hris/company/pay_statement_item/test_rules.py
+++ b/tests/api_resources/hris/company/pay_statement_item/test_rules.py
@@ -25,12 +25,15 @@ class TestRules:
@parametrize
def test_method_create(self, client: Finch) -> None:
- rule = client.hris.company.pay_statement_item.rules.create()
+ rule = client.hris.company.pay_statement_item.rules.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(RuleCreateResponse, rule, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: Finch) -> None:
rule = client.hris.company.pay_statement_item.rules.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
attributes={"metadata": {"foo": "bar"}},
conditions=[
{
@@ -47,7 +50,9 @@ def test_method_create_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_create(self, client: Finch) -> None:
- response = client.hris.company.pay_statement_item.rules.with_raw_response.create()
+ response = client.hris.company.pay_statement_item.rules.with_raw_response.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -56,7 +61,9 @@ def test_raw_response_create(self, client: Finch) -> None:
@parametrize
def test_streaming_response_create(self, client: Finch) -> None:
- with client.hris.company.pay_statement_item.rules.with_streaming_response.create() as response:
+ with client.hris.company.pay_statement_item.rules.with_streaming_response.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -69,6 +76,7 @@ def test_streaming_response_create(self, client: Finch) -> None:
def test_method_update(self, client: Finch) -> None:
rule = client.hris.company.pay_statement_item.rules.update(
rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(RuleUpdateResponse, rule, path=["response"])
@@ -76,6 +84,7 @@ def test_method_update(self, client: Finch) -> None:
def test_method_update_with_all_params(self, client: Finch) -> None:
rule = client.hris.company.pay_statement_item.rules.update(
rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
optional_property={},
)
assert_matches_type(RuleUpdateResponse, rule, path=["response"])
@@ -84,6 +93,7 @@ def test_method_update_with_all_params(self, client: Finch) -> None:
def test_raw_response_update(self, client: Finch) -> None:
response = client.hris.company.pay_statement_item.rules.with_raw_response.update(
rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -95,6 +105,7 @@ def test_raw_response_update(self, client: Finch) -> None:
def test_streaming_response_update(self, client: Finch) -> None:
with client.hris.company.pay_statement_item.rules.with_streaming_response.update(
rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -109,16 +120,21 @@ def test_path_params_update(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"):
client.hris.company.pay_statement_item.rules.with_raw_response.update(
rule_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_list(self, client: Finch) -> None:
- rule = client.hris.company.pay_statement_item.rules.list()
+ rule = client.hris.company.pay_statement_item.rules.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(SyncResponsesPage[RuleListResponse], rule, path=["response"])
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
- response = client.hris.company.pay_statement_item.rules.with_raw_response.list()
+ response = client.hris.company.pay_statement_item.rules.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -127,7 +143,9 @@ def test_raw_response_list(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
- with client.hris.company.pay_statement_item.rules.with_streaming_response.list() as response:
+ with client.hris.company.pay_statement_item.rules.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -139,14 +157,16 @@ def test_streaming_response_list(self, client: Finch) -> None:
@parametrize
def test_method_delete(self, client: Finch) -> None:
rule = client.hris.company.pay_statement_item.rules.delete(
- "rule_id",
+ rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(RuleDeleteResponse, rule, path=["response"])
@parametrize
def test_raw_response_delete(self, client: Finch) -> None:
response = client.hris.company.pay_statement_item.rules.with_raw_response.delete(
- "rule_id",
+ rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -157,7 +177,8 @@ def test_raw_response_delete(self, client: Finch) -> None:
@parametrize
def test_streaming_response_delete(self, client: Finch) -> None:
with client.hris.company.pay_statement_item.rules.with_streaming_response.delete(
- "rule_id",
+ rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -171,7 +192,8 @@ def test_streaming_response_delete(self, client: Finch) -> None:
def test_path_params_delete(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"):
client.hris.company.pay_statement_item.rules.with_raw_response.delete(
- "",
+ rule_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -182,12 +204,15 @@ class TestAsyncRules:
@parametrize
async def test_method_create(self, async_client: AsyncFinch) -> None:
- rule = await async_client.hris.company.pay_statement_item.rules.create()
+ rule = await async_client.hris.company.pay_statement_item.rules.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(RuleCreateResponse, rule, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> None:
rule = await async_client.hris.company.pay_statement_item.rules.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
attributes={"metadata": {"foo": "bar"}},
conditions=[
{
@@ -204,7 +229,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) ->
@parametrize
async def test_raw_response_create(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.company.pay_statement_item.rules.with_raw_response.create()
+ response = await async_client.hris.company.pay_statement_item.rules.with_raw_response.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -213,7 +240,9 @@ async def test_raw_response_create(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_create(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.company.pay_statement_item.rules.with_streaming_response.create() as response:
+ async with async_client.hris.company.pay_statement_item.rules.with_streaming_response.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -226,6 +255,7 @@ async def test_streaming_response_create(self, async_client: AsyncFinch) -> None
async def test_method_update(self, async_client: AsyncFinch) -> None:
rule = await async_client.hris.company.pay_statement_item.rules.update(
rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(RuleUpdateResponse, rule, path=["response"])
@@ -233,6 +263,7 @@ async def test_method_update(self, async_client: AsyncFinch) -> None:
async def test_method_update_with_all_params(self, async_client: AsyncFinch) -> None:
rule = await async_client.hris.company.pay_statement_item.rules.update(
rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
optional_property={},
)
assert_matches_type(RuleUpdateResponse, rule, path=["response"])
@@ -241,6 +272,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncFinch) ->
async def test_raw_response_update(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.company.pay_statement_item.rules.with_raw_response.update(
rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -252,6 +284,7 @@ async def test_raw_response_update(self, async_client: AsyncFinch) -> None:
async def test_streaming_response_update(self, async_client: AsyncFinch) -> None:
async with async_client.hris.company.pay_statement_item.rules.with_streaming_response.update(
rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -266,16 +299,21 @@ async def test_path_params_update(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"):
await async_client.hris.company.pay_statement_item.rules.with_raw_response.update(
rule_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
- rule = await async_client.hris.company.pay_statement_item.rules.list()
+ rule = await async_client.hris.company.pay_statement_item.rules.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(AsyncResponsesPage[RuleListResponse], rule, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.company.pay_statement_item.rules.with_raw_response.list()
+ response = await async_client.hris.company.pay_statement_item.rules.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -284,7 +322,9 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.company.pay_statement_item.rules.with_streaming_response.list() as response:
+ async with async_client.hris.company.pay_statement_item.rules.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -296,14 +336,16 @@ async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_method_delete(self, async_client: AsyncFinch) -> None:
rule = await async_client.hris.company.pay_statement_item.rules.delete(
- "rule_id",
+ rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(RuleDeleteResponse, rule, path=["response"])
@parametrize
async def test_raw_response_delete(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.company.pay_statement_item.rules.with_raw_response.delete(
- "rule_id",
+ rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -314,7 +356,8 @@ async def test_raw_response_delete(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncFinch) -> None:
async with async_client.hris.company.pay_statement_item.rules.with_streaming_response.delete(
- "rule_id",
+ rule_id="rule_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -328,5 +371,6 @@ async def test_streaming_response_delete(self, async_client: AsyncFinch) -> None
async def test_path_params_delete(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"):
await async_client.hris.company.pay_statement_item.rules.with_raw_response.delete(
- "",
+ rule_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
diff --git a/tests/api_resources/hris/company/test_pay_statement_item.py b/tests/api_resources/hris/company/test_pay_statement_item.py
index c270ce8e..ffd7a060 100644
--- a/tests/api_resources/hris/company/test_pay_statement_item.py
+++ b/tests/api_resources/hris/company/test_pay_statement_item.py
@@ -21,12 +21,15 @@ class TestPayStatementItem:
@parametrize
def test_method_list(self, client: Finch) -> None:
- pay_statement_item = client.hris.company.pay_statement_item.list()
+ pay_statement_item = client.hris.company.pay_statement_item.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(SyncResponsesPage[PayStatementItemListResponse], pay_statement_item, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Finch) -> None:
pay_statement_item = client.hris.company.pay_statement_item.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
categories=["earnings"],
end_date=parse_date("2024-07-01"),
name="name",
@@ -37,7 +40,9 @@ def test_method_list_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
- response = client.hris.company.pay_statement_item.with_raw_response.list()
+ response = client.hris.company.pay_statement_item.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -46,7 +51,9 @@ def test_raw_response_list(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
- with client.hris.company.pay_statement_item.with_streaming_response.list() as response:
+ with client.hris.company.pay_statement_item.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -63,12 +70,15 @@ class TestAsyncPayStatementItem:
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
- pay_statement_item = await async_client.hris.company.pay_statement_item.list()
+ pay_statement_item = await async_client.hris.company.pay_statement_item.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(AsyncResponsesPage[PayStatementItemListResponse], pay_statement_item, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> None:
pay_statement_item = await async_client.hris.company.pay_statement_item.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
categories=["earnings"],
end_date=parse_date("2024-07-01"),
name="name",
@@ -79,7 +89,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> No
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.company.pay_statement_item.with_raw_response.list()
+ response = await async_client.hris.company.pay_statement_item.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -88,7 +100,9 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.company.pay_statement_item.with_streaming_response.list() as response:
+ async with async_client.hris.company.pay_statement_item.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/hris/test_benefits.py b/tests/api_resources/hris/test_benefits.py
index a9fe0954..98ff9475 100644
--- a/tests/api_resources/hris/test_benefits.py
+++ b/tests/api_resources/hris/test_benefits.py
@@ -25,12 +25,15 @@ class TestBenefits:
@parametrize
def test_method_create(self, client: Finch) -> None:
- benefit = client.hris.benefits.create()
+ benefit = client.hris.benefits.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(CreateCompanyBenefitsResponse, benefit, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: Finch) -> None:
benefit = client.hris.benefits.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
company_contribution={
"tiers": [
{
@@ -48,7 +51,9 @@ def test_method_create_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_create(self, client: Finch) -> None:
- response = client.hris.benefits.with_raw_response.create()
+ response = client.hris.benefits.with_raw_response.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -57,7 +62,9 @@ def test_raw_response_create(self, client: Finch) -> None:
@parametrize
def test_streaming_response_create(self, client: Finch) -> None:
- with client.hris.benefits.with_streaming_response.create() as response:
+ with client.hris.benefits.with_streaming_response.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -69,14 +76,16 @@ def test_streaming_response_create(self, client: Finch) -> None:
@parametrize
def test_method_retrieve(self, client: Finch) -> None:
benefit = client.hris.benefits.retrieve(
- "benefit_id",
+ benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(CompanyBenefit, benefit, path=["response"])
@parametrize
def test_raw_response_retrieve(self, client: Finch) -> None:
response = client.hris.benefits.with_raw_response.retrieve(
- "benefit_id",
+ benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -87,7 +96,8 @@ def test_raw_response_retrieve(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve(self, client: Finch) -> None:
with client.hris.benefits.with_streaming_response.retrieve(
- "benefit_id",
+ benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -101,13 +111,15 @@ def test_streaming_response_retrieve(self, client: Finch) -> None:
def test_path_params_retrieve(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
client.hris.benefits.with_raw_response.retrieve(
- "",
+ benefit_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_update(self, client: Finch) -> None:
benefit = client.hris.benefits.update(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(UpdateCompanyBenefitResponse, benefit, path=["response"])
@@ -115,6 +127,7 @@ def test_method_update(self, client: Finch) -> None:
def test_method_update_with_all_params(self, client: Finch) -> None:
benefit = client.hris.benefits.update(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
description="description",
)
assert_matches_type(UpdateCompanyBenefitResponse, benefit, path=["response"])
@@ -123,6 +136,7 @@ def test_method_update_with_all_params(self, client: Finch) -> None:
def test_raw_response_update(self, client: Finch) -> None:
response = client.hris.benefits.with_raw_response.update(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -134,6 +148,7 @@ def test_raw_response_update(self, client: Finch) -> None:
def test_streaming_response_update(self, client: Finch) -> None:
with client.hris.benefits.with_streaming_response.update(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -148,16 +163,21 @@ def test_path_params_update(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
client.hris.benefits.with_raw_response.update(
benefit_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_list(self, client: Finch) -> None:
- benefit = client.hris.benefits.list()
+ benefit = client.hris.benefits.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(SyncSinglePage[CompanyBenefit], benefit, path=["response"])
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
- response = client.hris.benefits.with_raw_response.list()
+ response = client.hris.benefits.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -166,7 +186,9 @@ def test_raw_response_list(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
- with client.hris.benefits.with_streaming_response.list() as response:
+ with client.hris.benefits.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -177,12 +199,16 @@ def test_streaming_response_list(self, client: Finch) -> None:
@parametrize
def test_method_list_supported_benefits(self, client: Finch) -> None:
- benefit = client.hris.benefits.list_supported_benefits()
+ benefit = client.hris.benefits.list_supported_benefits(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(SyncSinglePage[SupportedBenefit], benefit, path=["response"])
@parametrize
def test_raw_response_list_supported_benefits(self, client: Finch) -> None:
- response = client.hris.benefits.with_raw_response.list_supported_benefits()
+ response = client.hris.benefits.with_raw_response.list_supported_benefits(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -191,7 +217,9 @@ def test_raw_response_list_supported_benefits(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list_supported_benefits(self, client: Finch) -> None:
- with client.hris.benefits.with_streaming_response.list_supported_benefits() as response:
+ with client.hris.benefits.with_streaming_response.list_supported_benefits(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -208,12 +236,15 @@ class TestAsyncBenefits:
@parametrize
async def test_method_create(self, async_client: AsyncFinch) -> None:
- benefit = await async_client.hris.benefits.create()
+ benefit = await async_client.hris.benefits.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(CreateCompanyBenefitsResponse, benefit, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncFinch) -> None:
benefit = await async_client.hris.benefits.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
company_contribution={
"tiers": [
{
@@ -231,7 +262,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) ->
@parametrize
async def test_raw_response_create(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.benefits.with_raw_response.create()
+ response = await async_client.hris.benefits.with_raw_response.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -240,7 +273,9 @@ async def test_raw_response_create(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_create(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.benefits.with_streaming_response.create() as response:
+ async with async_client.hris.benefits.with_streaming_response.create(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -252,14 +287,16 @@ async def test_streaming_response_create(self, async_client: AsyncFinch) -> None
@parametrize
async def test_method_retrieve(self, async_client: AsyncFinch) -> None:
benefit = await async_client.hris.benefits.retrieve(
- "benefit_id",
+ benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(CompanyBenefit, benefit, path=["response"])
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.benefits.with_raw_response.retrieve(
- "benefit_id",
+ benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -270,7 +307,8 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None:
async with async_client.hris.benefits.with_streaming_response.retrieve(
- "benefit_id",
+ benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -284,13 +322,15 @@ async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> No
async def test_path_params_retrieve(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
await async_client.hris.benefits.with_raw_response.retrieve(
- "",
+ benefit_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_update(self, async_client: AsyncFinch) -> None:
benefit = await async_client.hris.benefits.update(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(UpdateCompanyBenefitResponse, benefit, path=["response"])
@@ -298,6 +338,7 @@ async def test_method_update(self, async_client: AsyncFinch) -> None:
async def test_method_update_with_all_params(self, async_client: AsyncFinch) -> None:
benefit = await async_client.hris.benefits.update(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
description="description",
)
assert_matches_type(UpdateCompanyBenefitResponse, benefit, path=["response"])
@@ -306,6 +347,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncFinch) ->
async def test_raw_response_update(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.benefits.with_raw_response.update(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -317,6 +359,7 @@ async def test_raw_response_update(self, async_client: AsyncFinch) -> None:
async def test_streaming_response_update(self, async_client: AsyncFinch) -> None:
async with async_client.hris.benefits.with_streaming_response.update(
benefit_id="benefit_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -331,16 +374,21 @@ async def test_path_params_update(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
await async_client.hris.benefits.with_raw_response.update(
benefit_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
- benefit = await async_client.hris.benefits.list()
+ benefit = await async_client.hris.benefits.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(AsyncSinglePage[CompanyBenefit], benefit, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.benefits.with_raw_response.list()
+ response = await async_client.hris.benefits.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -349,7 +397,9 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.benefits.with_streaming_response.list() as response:
+ async with async_client.hris.benefits.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -360,12 +410,16 @@ async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_method_list_supported_benefits(self, async_client: AsyncFinch) -> None:
- benefit = await async_client.hris.benefits.list_supported_benefits()
+ benefit = await async_client.hris.benefits.list_supported_benefits(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(AsyncSinglePage[SupportedBenefit], benefit, path=["response"])
@parametrize
async def test_raw_response_list_supported_benefits(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.benefits.with_raw_response.list_supported_benefits()
+ response = await async_client.hris.benefits.with_raw_response.list_supported_benefits(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -374,7 +428,9 @@ async def test_raw_response_list_supported_benefits(self, async_client: AsyncFin
@parametrize
async def test_streaming_response_list_supported_benefits(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.benefits.with_streaming_response.list_supported_benefits() as response:
+ async with async_client.hris.benefits.with_streaming_response.list_supported_benefits(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/hris/test_company.py b/tests/api_resources/hris/test_company.py
index fb206fda..a9bb1b24 100644
--- a/tests/api_resources/hris/test_company.py
+++ b/tests/api_resources/hris/test_company.py
@@ -19,12 +19,16 @@ class TestCompany:
@parametrize
def test_method_retrieve(self, client: Finch) -> None:
- company = client.hris.company.retrieve()
+ company = client.hris.company.retrieve(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(Company, company, path=["response"])
@parametrize
def test_raw_response_retrieve(self, client: Finch) -> None:
- response = client.hris.company.with_raw_response.retrieve()
+ response = client.hris.company.with_raw_response.retrieve(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -33,7 +37,9 @@ def test_raw_response_retrieve(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve(self, client: Finch) -> None:
- with client.hris.company.with_streaming_response.retrieve() as response:
+ with client.hris.company.with_streaming_response.retrieve(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -50,12 +56,16 @@ class TestAsyncCompany:
@parametrize
async def test_method_retrieve(self, async_client: AsyncFinch) -> None:
- company = await async_client.hris.company.retrieve()
+ company = await async_client.hris.company.retrieve(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(Company, company, path=["response"])
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.company.with_raw_response.retrieve()
+ response = await async_client.hris.company.with_raw_response.retrieve(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -64,7 +74,9 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.company.with_streaming_response.retrieve() as response:
+ async with async_client.hris.company.with_streaming_response.retrieve(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/hris/test_directory.py b/tests/api_resources/hris/test_directory.py
index 37505168..dd649d95 100644
--- a/tests/api_resources/hris/test_directory.py
+++ b/tests/api_resources/hris/test_directory.py
@@ -22,12 +22,15 @@ class TestDirectory:
@parametrize
def test_method_list(self, client: Finch) -> None:
- directory = client.hris.directory.list()
+ directory = client.hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(SyncIndividualsPage[IndividualInDirectory], directory, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Finch) -> None:
directory = client.hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
limit=0,
offset=0,
)
@@ -35,7 +38,9 @@ def test_method_list_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
- response = client.hris.directory.with_raw_response.list()
+ response = client.hris.directory.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -44,7 +49,9 @@ def test_raw_response_list(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
- with client.hris.directory.with_streaming_response.list() as response:
+ with client.hris.directory.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -56,7 +63,9 @@ def test_streaming_response_list(self, client: Finch) -> None:
@parametrize
def test_method_list_individuals(self, client: Finch) -> None:
with pytest.warns(DeprecationWarning):
- directory = client.hris.directory.list_individuals()
+ directory = client.hris.directory.list_individuals(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(SyncIndividualsPage[IndividualInDirectory], directory, path=["response"])
@@ -64,6 +73,7 @@ def test_method_list_individuals(self, client: Finch) -> None:
def test_method_list_individuals_with_all_params(self, client: Finch) -> None:
with pytest.warns(DeprecationWarning):
directory = client.hris.directory.list_individuals(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
limit=0,
offset=0,
)
@@ -73,7 +83,9 @@ def test_method_list_individuals_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_list_individuals(self, client: Finch) -> None:
with pytest.warns(DeprecationWarning):
- response = client.hris.directory.with_raw_response.list_individuals()
+ response = client.hris.directory.with_raw_response.list_individuals(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -83,7 +95,9 @@ def test_raw_response_list_individuals(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list_individuals(self, client: Finch) -> None:
with pytest.warns(DeprecationWarning):
- with client.hris.directory.with_streaming_response.list_individuals() as response:
+ with client.hris.directory.with_streaming_response.list_individuals(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -100,12 +114,15 @@ class TestAsyncDirectory:
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
- directory = await async_client.hris.directory.list()
+ directory = await async_client.hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(AsyncIndividualsPage[IndividualInDirectory], directory, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> None:
directory = await async_client.hris.directory.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
limit=0,
offset=0,
)
@@ -113,7 +130,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> No
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.directory.with_raw_response.list()
+ response = await async_client.hris.directory.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -122,7 +141,9 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.directory.with_streaming_response.list() as response:
+ async with async_client.hris.directory.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -134,7 +155,9 @@ async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_method_list_individuals(self, async_client: AsyncFinch) -> None:
with pytest.warns(DeprecationWarning):
- directory = await async_client.hris.directory.list_individuals()
+ directory = await async_client.hris.directory.list_individuals(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(AsyncIndividualsPage[IndividualInDirectory], directory, path=["response"])
@@ -142,6 +165,7 @@ async def test_method_list_individuals(self, async_client: AsyncFinch) -> None:
async def test_method_list_individuals_with_all_params(self, async_client: AsyncFinch) -> None:
with pytest.warns(DeprecationWarning):
directory = await async_client.hris.directory.list_individuals(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
limit=0,
offset=0,
)
@@ -151,7 +175,9 @@ async def test_method_list_individuals_with_all_params(self, async_client: Async
@parametrize
async def test_raw_response_list_individuals(self, async_client: AsyncFinch) -> None:
with pytest.warns(DeprecationWarning):
- response = await async_client.hris.directory.with_raw_response.list_individuals()
+ response = await async_client.hris.directory.with_raw_response.list_individuals(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -161,7 +187,9 @@ async def test_raw_response_list_individuals(self, async_client: AsyncFinch) ->
@parametrize
async def test_streaming_response_list_individuals(self, async_client: AsyncFinch) -> None:
with pytest.warns(DeprecationWarning):
- async with async_client.hris.directory.with_streaming_response.list_individuals() as response:
+ async with async_client.hris.directory.with_streaming_response.list_individuals(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/hris/test_documents.py b/tests/api_resources/hris/test_documents.py
index 2b9d7077..c488ee9f 100644
--- a/tests/api_resources/hris/test_documents.py
+++ b/tests/api_resources/hris/test_documents.py
@@ -9,7 +9,10 @@
from finch import Finch, AsyncFinch
from tests.utils import assert_matches_type
-from finch.types.hris import DocumentListResponse, DocumentRetreiveResponse
+from finch.types.hris import (
+ DocumentListResponse,
+ DocumentRetreiveResponse,
+)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -19,12 +22,15 @@ class TestDocuments:
@parametrize
def test_method_list(self, client: Finch) -> None:
- document = client.hris.documents.list()
+ document = client.hris.documents.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(DocumentListResponse, document, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Finch) -> None:
document = client.hris.documents.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
individual_ids=["string"],
limit=0,
offset=0,
@@ -34,7 +40,9 @@ def test_method_list_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
- response = client.hris.documents.with_raw_response.list()
+ response = client.hris.documents.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -43,7 +51,9 @@ def test_raw_response_list(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
- with client.hris.documents.with_streaming_response.list() as response:
+ with client.hris.documents.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -55,14 +65,16 @@ def test_streaming_response_list(self, client: Finch) -> None:
@parametrize
def test_method_retreive(self, client: Finch) -> None:
document = client.hris.documents.retreive(
- "document_id",
+ document_id="document_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(DocumentRetreiveResponse, document, path=["response"])
@parametrize
def test_raw_response_retreive(self, client: Finch) -> None:
response = client.hris.documents.with_raw_response.retreive(
- "document_id",
+ document_id="document_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -73,7 +85,8 @@ def test_raw_response_retreive(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retreive(self, client: Finch) -> None:
with client.hris.documents.with_streaming_response.retreive(
- "document_id",
+ document_id="document_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -87,7 +100,8 @@ def test_streaming_response_retreive(self, client: Finch) -> None:
def test_path_params_retreive(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `document_id` but received ''"):
client.hris.documents.with_raw_response.retreive(
- "",
+ document_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -98,12 +112,15 @@ class TestAsyncDocuments:
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
- document = await async_client.hris.documents.list()
+ document = await async_client.hris.documents.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(DocumentListResponse, document, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> None:
document = await async_client.hris.documents.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
individual_ids=["string"],
limit=0,
offset=0,
@@ -113,7 +130,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> No
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.documents.with_raw_response.list()
+ response = await async_client.hris.documents.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -122,7 +141,9 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.documents.with_streaming_response.list() as response:
+ async with async_client.hris.documents.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -134,14 +155,16 @@ async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_method_retreive(self, async_client: AsyncFinch) -> None:
document = await async_client.hris.documents.retreive(
- "document_id",
+ document_id="document_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(DocumentRetreiveResponse, document, path=["response"])
@parametrize
async def test_raw_response_retreive(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.documents.with_raw_response.retreive(
- "document_id",
+ document_id="document_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -152,7 +175,8 @@ async def test_raw_response_retreive(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_retreive(self, async_client: AsyncFinch) -> None:
async with async_client.hris.documents.with_streaming_response.retreive(
- "document_id",
+ document_id="document_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -166,5 +190,6 @@ async def test_streaming_response_retreive(self, async_client: AsyncFinch) -> No
async def test_path_params_retreive(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `document_id` but received ''"):
await async_client.hris.documents.with_raw_response.retreive(
- "",
+ document_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
diff --git a/tests/api_resources/hris/test_employments.py b/tests/api_resources/hris/test_employments.py
index f6514da2..cea3b00b 100644
--- a/tests/api_resources/hris/test_employments.py
+++ b/tests/api_resources/hris/test_employments.py
@@ -21,6 +21,7 @@ class TestEmployments:
@parametrize
def test_method_retrieve_many(self, client: Finch) -> None:
employment = client.hris.employments.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"individual_id": "individual_id"}],
)
assert_matches_type(SyncResponsesPage[EmploymentDataResponse], employment, path=["response"])
@@ -28,6 +29,7 @@ def test_method_retrieve_many(self, client: Finch) -> None:
@parametrize
def test_raw_response_retrieve_many(self, client: Finch) -> None:
response = client.hris.employments.with_raw_response.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"individual_id": "individual_id"}],
)
@@ -39,6 +41,7 @@ def test_raw_response_retrieve_many(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve_many(self, client: Finch) -> None:
with client.hris.employments.with_streaming_response.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"individual_id": "individual_id"}],
) as response:
assert not response.is_closed
@@ -58,6 +61,7 @@ class TestAsyncEmployments:
@parametrize
async def test_method_retrieve_many(self, async_client: AsyncFinch) -> None:
employment = await async_client.hris.employments.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"individual_id": "individual_id"}],
)
assert_matches_type(AsyncResponsesPage[EmploymentDataResponse], employment, path=["response"])
@@ -65,6 +69,7 @@ async def test_method_retrieve_many(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.employments.with_raw_response.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"individual_id": "individual_id"}],
)
@@ -76,6 +81,7 @@ async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> Non
@parametrize
async def test_streaming_response_retrieve_many(self, async_client: AsyncFinch) -> None:
async with async_client.hris.employments.with_streaming_response.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"individual_id": "individual_id"}],
) as response:
assert not response.is_closed
diff --git a/tests/api_resources/hris/test_individuals.py b/tests/api_resources/hris/test_individuals.py
index 9b16cad2..523443fd 100644
--- a/tests/api_resources/hris/test_individuals.py
+++ b/tests/api_resources/hris/test_individuals.py
@@ -20,12 +20,15 @@ class TestIndividuals:
@parametrize
def test_method_retrieve_many(self, client: Finch) -> None:
- individual = client.hris.individuals.retrieve_many()
+ individual = client.hris.individuals.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(SyncResponsesPage[IndividualResponse], individual, path=["response"])
@parametrize
def test_method_retrieve_many_with_all_params(self, client: Finch) -> None:
individual = client.hris.individuals.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
options={"include": ["string"]},
requests=[{"individual_id": "individual_id"}],
)
@@ -33,7 +36,9 @@ def test_method_retrieve_many_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_retrieve_many(self, client: Finch) -> None:
- response = client.hris.individuals.with_raw_response.retrieve_many()
+ response = client.hris.individuals.with_raw_response.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -42,7 +47,9 @@ def test_raw_response_retrieve_many(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve_many(self, client: Finch) -> None:
- with client.hris.individuals.with_streaming_response.retrieve_many() as response:
+ with client.hris.individuals.with_streaming_response.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -59,12 +66,15 @@ class TestAsyncIndividuals:
@parametrize
async def test_method_retrieve_many(self, async_client: AsyncFinch) -> None:
- individual = await async_client.hris.individuals.retrieve_many()
+ individual = await async_client.hris.individuals.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(AsyncResponsesPage[IndividualResponse], individual, path=["response"])
@parametrize
async def test_method_retrieve_many_with_all_params(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.individuals.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
options={"include": ["string"]},
requests=[{"individual_id": "individual_id"}],
)
@@ -72,7 +82,9 @@ async def test_method_retrieve_many_with_all_params(self, async_client: AsyncFin
@parametrize
async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.individuals.with_raw_response.retrieve_many()
+ response = await async_client.hris.individuals.with_raw_response.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -81,7 +93,9 @@ async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> Non
@parametrize
async def test_streaming_response_retrieve_many(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.individuals.with_streaming_response.retrieve_many() as response:
+ async with async_client.hris.individuals.with_streaming_response.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/hris/test_pay_statements.py b/tests/api_resources/hris/test_pay_statements.py
index 1631e42c..30a36504 100644
--- a/tests/api_resources/hris/test_pay_statements.py
+++ b/tests/api_resources/hris/test_pay_statements.py
@@ -21,6 +21,7 @@ class TestPayStatements:
@parametrize
def test_method_retrieve_many(self, client: Finch) -> None:
pay_statement = client.hris.pay_statements.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],
)
assert_matches_type(SyncResponsesPage[PayStatementResponse], pay_statement, path=["response"])
@@ -28,6 +29,7 @@ def test_method_retrieve_many(self, client: Finch) -> None:
@parametrize
def test_raw_response_retrieve_many(self, client: Finch) -> None:
response = client.hris.pay_statements.with_raw_response.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],
)
@@ -39,6 +41,7 @@ def test_raw_response_retrieve_many(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve_many(self, client: Finch) -> None:
with client.hris.pay_statements.with_streaming_response.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],
) as response:
assert not response.is_closed
@@ -58,6 +61,7 @@ class TestAsyncPayStatements:
@parametrize
async def test_method_retrieve_many(self, async_client: AsyncFinch) -> None:
pay_statement = await async_client.hris.pay_statements.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],
)
assert_matches_type(AsyncResponsesPage[PayStatementResponse], pay_statement, path=["response"])
@@ -65,6 +69,7 @@ async def test_method_retrieve_many(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.pay_statements.with_raw_response.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],
)
@@ -76,6 +81,7 @@ async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> Non
@parametrize
async def test_streaming_response_retrieve_many(self, async_client: AsyncFinch) -> None:
async with async_client.hris.pay_statements.with_streaming_response.retrieve_many(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],
) as response:
assert not response.is_closed
diff --git a/tests/api_resources/hris/test_payments.py b/tests/api_resources/hris/test_payments.py
index 8a2ba820..e6760341 100644
--- a/tests/api_resources/hris/test_payments.py
+++ b/tests/api_resources/hris/test_payments.py
@@ -23,6 +23,7 @@ class TestPayments:
def test_method_list(self, client: Finch) -> None:
payment = client.hris.payments.list(
end_date=parse_date("2021-01-01"),
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
start_date=parse_date("2021-01-01"),
)
assert_matches_type(SyncSinglePage[Payment], payment, path=["response"])
@@ -31,6 +32,7 @@ def test_method_list(self, client: Finch) -> None:
def test_raw_response_list(self, client: Finch) -> None:
response = client.hris.payments.with_raw_response.list(
end_date=parse_date("2021-01-01"),
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
start_date=parse_date("2021-01-01"),
)
@@ -43,6 +45,7 @@ def test_raw_response_list(self, client: Finch) -> None:
def test_streaming_response_list(self, client: Finch) -> None:
with client.hris.payments.with_streaming_response.list(
end_date=parse_date("2021-01-01"),
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
start_date=parse_date("2021-01-01"),
) as response:
assert not response.is_closed
@@ -63,6 +66,7 @@ class TestAsyncPayments:
async def test_method_list(self, async_client: AsyncFinch) -> None:
payment = await async_client.hris.payments.list(
end_date=parse_date("2021-01-01"),
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
start_date=parse_date("2021-01-01"),
)
assert_matches_type(AsyncSinglePage[Payment], payment, path=["response"])
@@ -71,6 +75,7 @@ async def test_method_list(self, async_client: AsyncFinch) -> None:
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.payments.with_raw_response.list(
end_date=parse_date("2021-01-01"),
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
start_date=parse_date("2021-01-01"),
)
@@ -83,6 +88,7 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
async with async_client.hris.payments.with_streaming_response.list(
end_date=parse_date("2021-01-01"),
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
start_date=parse_date("2021-01-01"),
) as response:
assert not response.is_closed
diff --git a/tests/api_resources/payroll/test_pay_groups.py b/tests/api_resources/payroll/test_pay_groups.py
index ebf7dbd4..16ad92ef 100644
--- a/tests/api_resources/payroll/test_pay_groups.py
+++ b/tests/api_resources/payroll/test_pay_groups.py
@@ -10,7 +10,10 @@
from finch import Finch, AsyncFinch
from tests.utils import assert_matches_type
from finch.pagination import SyncSinglePage, AsyncSinglePage
-from finch.types.payroll import PayGroupListResponse, PayGroupRetrieveResponse
+from finch.types.payroll import (
+ PayGroupListResponse,
+ PayGroupRetrieveResponse,
+)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -21,14 +24,16 @@ class TestPayGroups:
@parametrize
def test_method_retrieve(self, client: Finch) -> None:
pay_group = client.payroll.pay_groups.retrieve(
- "pay_group_id",
+ pay_group_id="pay_group_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(PayGroupRetrieveResponse, pay_group, path=["response"])
@parametrize
def test_raw_response_retrieve(self, client: Finch) -> None:
response = client.payroll.pay_groups.with_raw_response.retrieve(
- "pay_group_id",
+ pay_group_id="pay_group_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -39,7 +44,8 @@ def test_raw_response_retrieve(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve(self, client: Finch) -> None:
with client.payroll.pay_groups.with_streaming_response.retrieve(
- "pay_group_id",
+ pay_group_id="pay_group_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -53,17 +59,21 @@ def test_streaming_response_retrieve(self, client: Finch) -> None:
def test_path_params_retrieve(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pay_group_id` but received ''"):
client.payroll.pay_groups.with_raw_response.retrieve(
- "",
+ pay_group_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_list(self, client: Finch) -> None:
- pay_group = client.payroll.pay_groups.list()
+ pay_group = client.payroll.pay_groups.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(SyncSinglePage[PayGroupListResponse], pay_group, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Finch) -> None:
pay_group = client.payroll.pay_groups.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
individual_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
pay_frequencies=["string"],
)
@@ -71,7 +81,9 @@ def test_method_list_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
- response = client.payroll.pay_groups.with_raw_response.list()
+ response = client.payroll.pay_groups.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -80,7 +92,9 @@ def test_raw_response_list(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
- with client.payroll.pay_groups.with_streaming_response.list() as response:
+ with client.payroll.pay_groups.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -98,14 +112,16 @@ class TestAsyncPayGroups:
@parametrize
async def test_method_retrieve(self, async_client: AsyncFinch) -> None:
pay_group = await async_client.payroll.pay_groups.retrieve(
- "pay_group_id",
+ pay_group_id="pay_group_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(PayGroupRetrieveResponse, pay_group, path=["response"])
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
response = await async_client.payroll.pay_groups.with_raw_response.retrieve(
- "pay_group_id",
+ pay_group_id="pay_group_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -116,7 +132,8 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None:
async with async_client.payroll.pay_groups.with_streaming_response.retrieve(
- "pay_group_id",
+ pay_group_id="pay_group_id",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -130,17 +147,21 @@ async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> No
async def test_path_params_retrieve(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pay_group_id` but received ''"):
await async_client.payroll.pay_groups.with_raw_response.retrieve(
- "",
+ pay_group_id="",
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
- pay_group = await async_client.payroll.pay_groups.list()
+ pay_group = await async_client.payroll.pay_groups.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert_matches_type(AsyncSinglePage[PayGroupListResponse], pay_group, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> None:
pay_group = await async_client.payroll.pay_groups.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
individual_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
pay_frequencies=["string"],
)
@@ -148,7 +169,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> No
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
- response = await async_client.payroll.pay_groups.with_raw_response.list()
+ response = await async_client.payroll.pay_groups.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -157,7 +180,9 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
- async with async_client.payroll.pay_groups.with_streaming_response.list() as response:
+ async with async_client.payroll.pay_groups.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/test_client.py b/tests/test_client.py
index 38faf941..14d3338e 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -765,7 +765,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- response = client.hris.directory.with_raw_response.list()
+ response = client.hris.directory.with_raw_response.list(entity_ids=["550e8400-e29b-41d4-a716-446655440000"])
assert response.retries_taken == failures_before_success
assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success
@@ -787,7 +787,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- response = client.hris.directory.with_raw_response.list(extra_headers={"x-stainless-retry-count": Omit()})
+ response = client.hris.directory.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"], extra_headers={"x-stainless-retry-count": Omit()}
+ )
assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0
@@ -810,7 +812,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- response = client.hris.directory.with_raw_response.list(extra_headers={"x-stainless-retry-count": "42"})
+ response = client.hris.directory.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"], extra_headers={"x-stainless-retry-count": "42"}
+ )
assert response.http_request.headers.get("x-stainless-retry-count") == "42"
@@ -833,7 +837,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- with client.hris.directory.with_streaming_response.list() as response:
+ with client.hris.directory.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"]
+ ) as response:
assert response.retries_taken == failures_before_success
assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success
@@ -1609,7 +1615,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- response = await client.hris.directory.with_raw_response.list()
+ response = await client.hris.directory.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"]
+ )
assert response.retries_taken == failures_before_success
assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success
@@ -1634,7 +1642,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- response = await client.hris.directory.with_raw_response.list(extra_headers={"x-stainless-retry-count": Omit()})
+ response = await client.hris.directory.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"], extra_headers={"x-stainless-retry-count": Omit()}
+ )
assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0
@@ -1658,7 +1668,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- response = await client.hris.directory.with_raw_response.list(extra_headers={"x-stainless-retry-count": "42"})
+ response = await client.hris.directory.with_raw_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"], extra_headers={"x-stainless-retry-count": "42"}
+ )
assert response.http_request.headers.get("x-stainless-retry-count") == "42"
@@ -1682,7 +1694,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- async with client.hris.directory.with_streaming_response.list() as response:
+ async with client.hris.directory.with_streaming_response.list(
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"]
+ ) as response:
assert response.retries_taken == failures_before_success
assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success
From 87b2d65bc501fe885839ba1d6c5942cc01d203c9 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 27 Oct 2025 20:00:46 +0000
Subject: [PATCH 19/20] feat(api): api update
---
.stats.yml | 4 +-
README.md | 48 ++------
src/finch/resources/hris/benefits/benefits.py | 20 ++--
.../resources/hris/benefits/individuals.py | 16 +--
src/finch/resources/hris/company/company.py | 6 +-
.../pay_statement_item/pay_statement_item.py | 16 +--
.../hris/company/pay_statement_item/rules.py | 16 +--
src/finch/resources/hris/directory.py | 8 +-
src/finch/resources/hris/documents.py | 8 +-
src/finch/resources/hris/employments.py | 14 +--
src/finch/resources/hris/individuals.py | 4 +-
src/finch/resources/hris/pay_statements.py | 14 +--
src/finch/resources/hris/payments.py | 18 +--
src/finch/resources/payroll/pay_groups.py | 8 +-
src/finch/types/hris/benefit_create_params.py | 2 +-
src/finch/types/hris/benefit_list_params.py | 4 +-
.../benefit_list_supported_benefits_params.py | 4 +-
.../types/hris/benefit_retrieve_params.py | 4 +-
src/finch/types/hris/benefit_update_params.py | 4 +-
.../benefits/individual_enroll_many_params.py | 2 +-
.../individual_enrolled_ids_params.py | 4 +-
...ndividual_retrieve_many_benefits_params.py | 4 +-
.../individual_unenroll_many_params.py | 4 +-
.../pay_statement_item/rule_create_params.py | 4 +-
.../pay_statement_item/rule_delete_params.py | 4 +-
.../pay_statement_item/rule_list_params.py | 4 +-
.../pay_statement_item/rule_update_params.py | 4 +-
.../company/pay_statement_item_list_params.py | 8 +-
.../types/hris/company_retrieve_params.py | 4 +-
.../hris/directory_list_individuals_params.py | 4 +-
src/finch/types/hris/directory_list_params.py | 4 +-
src/finch/types/hris/document_list_params.py | 4 +-
.../types/hris/document_retreive_params.py | 4 +-
.../hris/employment_retrieve_many_params.py | 6 +-
.../hris/individual_retrieve_many_params.py | 4 +-
.../pay_statement_retrieve_many_params.py | 6 +-
src/finch/types/hris/payment_list_params.py | 6 +-
.../types/payroll/pay_group_list_params.py | 4 +-
.../payroll/pay_group_retrieve_params.py | 4 +-
.../hris/benefits/test_individuals.py | 44 +++-----
.../company/pay_statement_item/test_rules.py | 78 ++++++-------
.../hris/company/test_pay_statement_item.py | 28 ++---
tests/api_resources/hris/test_benefits.py | 104 ++++++++----------
tests/api_resources/hris/test_company.py | 26 +++--
tests/api_resources/hris/test_directory.py | 48 ++------
tests/api_resources/hris/test_documents.py | 44 ++++----
tests/api_resources/hris/test_employments.py | 22 +++-
tests/api_resources/hris/test_individuals.py | 24 +---
.../api_resources/hris/test_pay_statements.py | 34 +++++-
tests/api_resources/hris/test_payments.py | 24 +++-
.../api_resources/payroll/test_pay_groups.py | 44 ++++----
tests/test_client.py | 30 ++---
52 files changed, 387 insertions(+), 469 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index d84cf0e8..ee607421 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 46
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-03a89ccdf10add981e714ad74c145cd3a2408bd0223108bbfe01cef4256ef7ed.yml
-openapi_spec_hash: 4179c69ca2f55a9fcfab41710a2f452c
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-0105d239fcaf84750c886dfa6c2cfbf2b2087f89a48f8827c4cbe28479ebfb13.yml
+openapi_spec_hash: 34895c3d3c137fb9f5a019ac5370afbb
config_hash: 6d3585c0032e08d723d077d660fc8448
diff --git a/README.md b/README.md
index 6d3b0743..c93e6fca 100644
--- a/README.md
+++ b/README.md
@@ -31,9 +31,7 @@ client = Finch(
access_token="My Access Token",
)
-page = client.hris.directory.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
-)
+page = client.hris.directory.list()
print(page.individuals)
```
@@ -51,9 +49,7 @@ client = AsyncFinch(
async def main() -> None:
- page = await client.hris.directory.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ page = await client.hris.directory.list()
print(page.individuals)
@@ -86,9 +82,7 @@ async def main() -> None:
access_token="My Access Token",
http_client=DefaultAioHttpClient(),
) as client:
- page = await client.hris.directory.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ page = await client.hris.directory.list()
print(page.individuals)
@@ -117,9 +111,7 @@ client = Finch()
all_directories = []
# Automatically fetches more pages as needed.
-for directory in client.hris.directory.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
-):
+for directory in client.hris.directory.list():
# Do something with directory here
all_directories.append(directory)
print(all_directories)
@@ -137,9 +129,7 @@ client = AsyncFinch()
async def main() -> None:
all_directories = []
# Iterate through items across all pages, issuing requests as needed.
- async for directory in client.hris.directory.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ):
+ async for directory in client.hris.directory.list():
all_directories.append(directory)
print(all_directories)
@@ -150,9 +140,7 @@ asyncio.run(main())
Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:
```python
-first_page = await client.hris.directory.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
-)
+first_page = await client.hris.directory.list()
if first_page.has_next_page():
print(f"will fetch next page using these details: {first_page.next_page_info()}")
next_page = await first_page.get_next_page()
@@ -164,9 +152,7 @@ if first_page.has_next_page():
Or just work directly with the returned data:
```python
-first_page = await client.hris.directory.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
-)
+first_page = await client.hris.directory.list()
print(
f"the current start offset for this page: {first_page.paging.offset}"
@@ -216,9 +202,7 @@ from finch import Finch
client = Finch()
try:
- client.hris.company.retrieve(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ client.hris.company.retrieve()
except finch.APIConnectionError as e:
print("The server could not be reached")
print(e.__cause__) # an underlying Exception, likely raised within httpx.
@@ -261,9 +245,7 @@ client = Finch(
)
# Or, configure per-request:
-client.with_options(max_retries=5).hris.directory.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
-)
+client.with_options(max_retries=5).hris.directory.list()
```
### Timeouts
@@ -286,9 +268,7 @@ client = Finch(
)
# Override per-request:
-client.with_options(timeout=5.0).hris.directory.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
-)
+client.with_options(timeout=5.0).hris.directory.list()
```
On timeout, an `APITimeoutError` is thrown.
@@ -345,9 +325,7 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
from finch import Finch
client = Finch()
-response = client.hris.directory.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
-)
+response = client.hris.directory.with_raw_response.list()
print(response.headers.get('X-My-Header'))
directory = response.parse() # get the object that `hris.directory.list()` would have returned
@@ -372,9 +350,7 @@ To stream the response body, use `.with_streaming_response` instead, which requi
As such, `.with_streaming_response` methods return a different [`APIResponse`](https://github.com/Finch-API/finch-api-python/tree/main/src/finch/_response.py) object, and the async client returns an [`AsyncAPIResponse`](https://github.com/Finch-API/finch-api-python/tree/main/src/finch/_response.py) object.
```python
-with client.hris.directory.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
-) as response:
+with client.hris.directory.with_streaming_response.list() as response:
print(response.headers.get("X-My-Header"))
for line in response.iter_lines():
diff --git a/src/finch/resources/hris/benefits/benefits.py b/src/finch/resources/hris/benefits/benefits.py
index 2383e201..9d5d0dde 100644
--- a/src/finch/resources/hris/benefits/benefits.py
+++ b/src/finch/resources/hris/benefits/benefits.py
@@ -68,7 +68,7 @@ def with_streaming_response(self) -> BenefitsWithStreamingResponse:
def create(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
company_contribution: Optional[benefit_create_params.CompanyContribution] | Omit = omit,
description: str | Omit = omit,
frequency: Optional[BenefitFrequency] | Omit = omit,
@@ -131,7 +131,7 @@ def retrieve(
self,
benefit_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -171,7 +171,7 @@ def update(
self,
benefit_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
description: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -214,7 +214,7 @@ def update(
def list(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -252,7 +252,7 @@ def list(
def list_supported_benefits(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -318,7 +318,7 @@ def with_streaming_response(self) -> AsyncBenefitsWithStreamingResponse:
async def create(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
company_contribution: Optional[benefit_create_params.CompanyContribution] | Omit = omit,
description: str | Omit = omit,
frequency: Optional[BenefitFrequency] | Omit = omit,
@@ -383,7 +383,7 @@ async def retrieve(
self,
benefit_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -425,7 +425,7 @@ async def update(
self,
benefit_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
description: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -470,7 +470,7 @@ async def update(
def list(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -508,7 +508,7 @@ def list(
def list_supported_benefits(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/finch/resources/hris/benefits/individuals.py b/src/finch/resources/hris/benefits/individuals.py
index 8cc60cec..cc8d67d3 100644
--- a/src/finch/resources/hris/benefits/individuals.py
+++ b/src/finch/resources/hris/benefits/individuals.py
@@ -52,7 +52,7 @@ def enroll_many(
self,
benefit_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
individuals: Iterable[individual_enroll_many_params.Individual] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -102,7 +102,7 @@ def enrolled_ids(
self,
benefit_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -144,7 +144,7 @@ def retrieve_many_benefits(
self,
benefit_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
individual_ids: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -195,7 +195,7 @@ def unenroll_many(
self,
benefit_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
individual_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -264,7 +264,7 @@ async def enroll_many(
self,
benefit_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
individuals: Iterable[individual_enroll_many_params.Individual] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -314,7 +314,7 @@ async def enrolled_ids(
self,
benefit_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -356,7 +356,7 @@ def retrieve_many_benefits(
self,
benefit_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
individual_ids: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -407,7 +407,7 @@ async def unenroll_many(
self,
benefit_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
individual_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
diff --git a/src/finch/resources/hris/company/company.py b/src/finch/resources/hris/company/company.py
index 254a97c5..159b6e64 100644
--- a/src/finch/resources/hris/company/company.py
+++ b/src/finch/resources/hris/company/company.py
@@ -5,7 +5,7 @@
import httpx
from .... import _legacy_response
-from ...._types import Body, Query, Headers, NotGiven, SequenceNotStr, not_given
+from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -52,7 +52,7 @@ def with_streaming_response(self) -> CompanyResourceWithStreamingResponse:
def retrieve(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -114,7 +114,7 @@ def with_streaming_response(self) -> AsyncCompanyResourceWithStreamingResponse:
async def retrieve(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py b/src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py
index 160ba7bb..8234b6df 100644
--- a/src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py
+++ b/src/finch/resources/hris/company/pay_statement_item/pay_statement_item.py
@@ -57,9 +57,9 @@ def with_streaming_response(self) -> PayStatementItemWithStreamingResponse:
def list(
self,
*,
- entity_ids: SequenceNotStr[str],
categories: List[Literal["earnings", "taxes", "employee_deductions", "employer_contributions"]] | Omit = omit,
end_date: Union[str, date] | Omit = omit,
+ entity_ids: SequenceNotStr[str] | Omit = omit,
name: str | Omit = omit,
start_date: Union[str, date] | Omit = omit,
type: str | Omit = omit,
@@ -76,14 +76,14 @@ def list(
items for the access token's connection account.
Args:
- entity_ids: The entity IDs to specify which entities' data to access.
-
categories: Comma-delimited list of pay statement item categories to filter on. If empty,
defaults to all categories.
end_date: The end date to retrieve pay statement items by via their last seen pay date in
`YYYY-MM-DD` format.
+ entity_ids: The entity IDs to specify which entities' data to access.
+
name: Case-insensitive partial match search by pay statement item name.
start_date: The start date to retrieve pay statement items by via their last seen pay date
@@ -109,9 +109,9 @@ def list(
timeout=timeout,
query=maybe_transform(
{
- "entity_ids": entity_ids,
"categories": categories,
"end_date": end_date,
+ "entity_ids": entity_ids,
"name": name,
"start_date": start_date,
"type": type,
@@ -150,9 +150,9 @@ def with_streaming_response(self) -> AsyncPayStatementItemWithStreamingResponse:
def list(
self,
*,
- entity_ids: SequenceNotStr[str],
categories: List[Literal["earnings", "taxes", "employee_deductions", "employer_contributions"]] | Omit = omit,
end_date: Union[str, date] | Omit = omit,
+ entity_ids: SequenceNotStr[str] | Omit = omit,
name: str | Omit = omit,
start_date: Union[str, date] | Omit = omit,
type: str | Omit = omit,
@@ -169,14 +169,14 @@ def list(
items for the access token's connection account.
Args:
- entity_ids: The entity IDs to specify which entities' data to access.
-
categories: Comma-delimited list of pay statement item categories to filter on. If empty,
defaults to all categories.
end_date: The end date to retrieve pay statement items by via their last seen pay date in
`YYYY-MM-DD` format.
+ entity_ids: The entity IDs to specify which entities' data to access.
+
name: Case-insensitive partial match search by pay statement item name.
start_date: The start date to retrieve pay statement items by via their last seen pay date
@@ -202,9 +202,9 @@ def list(
timeout=timeout,
query=maybe_transform(
{
- "entity_ids": entity_ids,
"categories": categories,
"end_date": end_date,
+ "entity_ids": entity_ids,
"name": name,
"start_date": start_date,
"type": type,
diff --git a/src/finch/resources/hris/company/pay_statement_item/rules.py b/src/finch/resources/hris/company/pay_statement_item/rules.py
index bdcdeaca..13bf20d0 100644
--- a/src/finch/resources/hris/company/pay_statement_item/rules.py
+++ b/src/finch/resources/hris/company/pay_statement_item/rules.py
@@ -52,7 +52,7 @@ def with_streaming_response(self) -> RulesWithStreamingResponse:
def create(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
attributes: rule_create_params.Attributes | Omit = omit,
conditions: Iterable[rule_create_params.Condition] | Omit = omit,
effective_end_date: Optional[str] | Omit = omit,
@@ -118,7 +118,7 @@ def update(
self,
rule_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
optional_property: object | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -160,7 +160,7 @@ def update(
def list(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -200,7 +200,7 @@ def delete(
self,
rule_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -261,7 +261,7 @@ def with_streaming_response(self) -> AsyncRulesWithStreamingResponse:
async def create(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
attributes: rule_create_params.Attributes | Omit = omit,
conditions: Iterable[rule_create_params.Condition] | Omit = omit,
effective_end_date: Optional[str] | Omit = omit,
@@ -327,7 +327,7 @@ async def update(
self,
rule_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
optional_property: object | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -371,7 +371,7 @@ async def update(
def list(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -411,7 +411,7 @@ async def delete(
self,
rule_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/finch/resources/hris/directory.py b/src/finch/resources/hris/directory.py
index 43c85661..32068b06 100644
--- a/src/finch/resources/hris/directory.py
+++ b/src/finch/resources/hris/directory.py
@@ -43,7 +43,7 @@ def with_streaming_response(self) -> DirectoryWithStreamingResponse:
def list(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -95,7 +95,7 @@ def list(
def list_individuals(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -157,7 +157,7 @@ def with_streaming_response(self) -> AsyncDirectoryWithStreamingResponse:
def list(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -209,7 +209,7 @@ def list(
def list_individuals(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
diff --git a/src/finch/resources/hris/documents.py b/src/finch/resources/hris/documents.py
index 56968393..e7dc7c73 100644
--- a/src/finch/resources/hris/documents.py
+++ b/src/finch/resources/hris/documents.py
@@ -44,7 +44,7 @@ def with_streaming_response(self) -> DocumentsWithStreamingResponse:
def list(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
individual_ids: SequenceNotStr[str] | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
@@ -107,7 +107,7 @@ def retreive(
self,
document_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -174,7 +174,7 @@ def with_streaming_response(self) -> AsyncDocumentsWithStreamingResponse:
async def list(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
individual_ids: SequenceNotStr[str] | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
@@ -237,7 +237,7 @@ async def retreive(
self,
document_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
diff --git a/src/finch/resources/hris/employments.py b/src/finch/resources/hris/employments.py
index e4cdb59f..6374b0b7 100644
--- a/src/finch/resources/hris/employments.py
+++ b/src/finch/resources/hris/employments.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import Body, Query, Headers, NotGiven, SequenceNotStr, not_given
+from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -43,8 +43,8 @@ def with_streaming_response(self) -> EmploymentsWithStreamingResponse:
def retrieve_many(
self,
*,
- entity_ids: SequenceNotStr[str],
requests: Iterable[employment_retrieve_many_params.Request],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -56,10 +56,10 @@ def retrieve_many(
Read individual employment and income data
Args:
- entity_ids: The entity IDs to specify which entities' data to access.
-
requests: The array of batch requests.
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -109,8 +109,8 @@ def with_streaming_response(self) -> AsyncEmploymentsWithStreamingResponse:
def retrieve_many(
self,
*,
- entity_ids: SequenceNotStr[str],
requests: Iterable[employment_retrieve_many_params.Request],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -122,10 +122,10 @@ def retrieve_many(
Read individual employment and income data
Args:
- entity_ids: The entity IDs to specify which entities' data to access.
-
requests: The array of batch requests.
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
diff --git a/src/finch/resources/hris/individuals.py b/src/finch/resources/hris/individuals.py
index b0b66f55..b4a966c0 100644
--- a/src/finch/resources/hris/individuals.py
+++ b/src/finch/resources/hris/individuals.py
@@ -43,7 +43,7 @@ def with_streaming_response(self) -> IndividualsWithStreamingResponse:
def retrieve_many(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
options: Optional[individual_retrieve_many_params.Options] | Omit = omit,
requests: Iterable[individual_retrieve_many_params.Request] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -114,7 +114,7 @@ def with_streaming_response(self) -> AsyncIndividualsWithStreamingResponse:
def retrieve_many(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
options: Optional[individual_retrieve_many_params.Options] | Omit = omit,
requests: Iterable[individual_retrieve_many_params.Request] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
diff --git a/src/finch/resources/hris/pay_statements.py b/src/finch/resources/hris/pay_statements.py
index c393f864..bcae95c8 100644
--- a/src/finch/resources/hris/pay_statements.py
+++ b/src/finch/resources/hris/pay_statements.py
@@ -7,7 +7,7 @@
import httpx
from ... import _legacy_response
-from ..._types import Body, Query, Headers, NotGiven, SequenceNotStr, not_given
+from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -43,8 +43,8 @@ def with_streaming_response(self) -> PayStatementsWithStreamingResponse:
def retrieve_many(
self,
*,
- entity_ids: SequenceNotStr[str],
requests: Iterable[pay_statement_retrieve_many_params.Request],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -59,10 +59,10 @@ def retrieve_many(
supports Benefits.
Args:
- entity_ids: The entity IDs to specify which entities' data to access.
-
requests: The array of batch requests.
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -114,8 +114,8 @@ def with_streaming_response(self) -> AsyncPayStatementsWithStreamingResponse:
def retrieve_many(
self,
*,
- entity_ids: SequenceNotStr[str],
requests: Iterable[pay_statement_retrieve_many_params.Request],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -130,10 +130,10 @@ def retrieve_many(
supports Benefits.
Args:
- entity_ids: The entity IDs to specify which entities' data to access.
-
requests: The array of batch requests.
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
diff --git a/src/finch/resources/hris/payments.py b/src/finch/resources/hris/payments.py
index e14ca481..94543492 100644
--- a/src/finch/resources/hris/payments.py
+++ b/src/finch/resources/hris/payments.py
@@ -8,7 +8,7 @@
import httpx
from ... import _legacy_response
-from ..._types import Body, Query, Headers, NotGiven, SequenceNotStr, not_given
+from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -45,8 +45,8 @@ def list(
self,
*,
end_date: Union[str, date],
- entity_ids: SequenceNotStr[str],
start_date: Union[str, date],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -61,11 +61,11 @@ def list(
end_date: The end date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
format.
- entity_ids: The entity IDs to specify which entities' data to access.
-
start_date: The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
format.
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -85,8 +85,8 @@ def list(
query=maybe_transform(
{
"end_date": end_date,
- "entity_ids": entity_ids,
"start_date": start_date,
+ "entity_ids": entity_ids,
},
payment_list_params.PaymentListParams,
),
@@ -119,8 +119,8 @@ def list(
self,
*,
end_date: Union[str, date],
- entity_ids: SequenceNotStr[str],
start_date: Union[str, date],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -135,11 +135,11 @@ def list(
end_date: The end date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
format.
- entity_ids: The entity IDs to specify which entities' data to access.
-
start_date: The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
format.
+ entity_ids: The entity IDs to specify which entities' data to access.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -159,8 +159,8 @@ def list(
query=maybe_transform(
{
"end_date": end_date,
- "entity_ids": entity_ids,
"start_date": start_date,
+ "entity_ids": entity_ids,
},
payment_list_params.PaymentListParams,
),
diff --git a/src/finch/resources/payroll/pay_groups.py b/src/finch/resources/payroll/pay_groups.py
index cc3b598f..0202884e 100644
--- a/src/finch/resources/payroll/pay_groups.py
+++ b/src/finch/resources/payroll/pay_groups.py
@@ -43,7 +43,7 @@ def retrieve(
self,
pay_group_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -82,7 +82,7 @@ def retrieve(
def list(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
individual_id: str | Omit = omit,
pay_frequencies: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -151,7 +151,7 @@ async def retrieve(
self,
pay_group_id: str,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -192,7 +192,7 @@ async def retrieve(
def list(
self,
*,
- entity_ids: SequenceNotStr[str],
+ entity_ids: SequenceNotStr[str] | Omit = omit,
individual_id: str | Omit = omit,
pay_frequencies: SequenceNotStr[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
diff --git a/src/finch/types/hris/benefit_create_params.py b/src/finch/types/hris/benefit_create_params.py
index b11837bc..e4a39b39 100644
--- a/src/finch/types/hris/benefit_create_params.py
+++ b/src/finch/types/hris/benefit_create_params.py
@@ -13,7 +13,7 @@
class BenefitCreateParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
company_contribution: Optional[CompanyContribution]
diff --git a/src/finch/types/hris/benefit_list_params.py b/src/finch/types/hris/benefit_list_params.py
index 8f0c7fd5..4dcc7014 100644
--- a/src/finch/types/hris/benefit_list_params.py
+++ b/src/finch/types/hris/benefit_list_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ..._types import SequenceNotStr
@@ -10,5 +10,5 @@
class BenefitListParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/hris/benefit_list_supported_benefits_params.py b/src/finch/types/hris/benefit_list_supported_benefits_params.py
index d24d4a1e..81ef1435 100644
--- a/src/finch/types/hris/benefit_list_supported_benefits_params.py
+++ b/src/finch/types/hris/benefit_list_supported_benefits_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ..._types import SequenceNotStr
@@ -10,5 +10,5 @@
class BenefitListSupportedBenefitsParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/hris/benefit_retrieve_params.py b/src/finch/types/hris/benefit_retrieve_params.py
index 3eb2f6d0..2a7c870a 100644
--- a/src/finch/types/hris/benefit_retrieve_params.py
+++ b/src/finch/types/hris/benefit_retrieve_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ..._types import SequenceNotStr
@@ -10,5 +10,5 @@
class BenefitRetrieveParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/hris/benefit_update_params.py b/src/finch/types/hris/benefit_update_params.py
index 667be3be..1fe5a338 100644
--- a/src/finch/types/hris/benefit_update_params.py
+++ b/src/finch/types/hris/benefit_update_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ..._types import SequenceNotStr
@@ -10,7 +10,7 @@
class BenefitUpdateParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
description: str
diff --git a/src/finch/types/hris/benefits/individual_enroll_many_params.py b/src/finch/types/hris/benefits/individual_enroll_many_params.py
index c4eb9119..1988387c 100644
--- a/src/finch/types/hris/benefits/individual_enroll_many_params.py
+++ b/src/finch/types/hris/benefits/individual_enroll_many_params.py
@@ -20,7 +20,7 @@
class IndividualEnrollManyParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
individuals: Iterable[Individual]
diff --git a/src/finch/types/hris/benefits/individual_enrolled_ids_params.py b/src/finch/types/hris/benefits/individual_enrolled_ids_params.py
index 8b3555bb..405cd23c 100644
--- a/src/finch/types/hris/benefits/individual_enrolled_ids_params.py
+++ b/src/finch/types/hris/benefits/individual_enrolled_ids_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ...._types import SequenceNotStr
@@ -10,5 +10,5 @@
class IndividualEnrolledIDsParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/hris/benefits/individual_retrieve_many_benefits_params.py b/src/finch/types/hris/benefits/individual_retrieve_many_benefits_params.py
index 5c11aea2..f56bc521 100644
--- a/src/finch/types/hris/benefits/individual_retrieve_many_benefits_params.py
+++ b/src/finch/types/hris/benefits/individual_retrieve_many_benefits_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ...._types import SequenceNotStr
@@ -10,7 +10,7 @@
class IndividualRetrieveManyBenefitsParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
individual_ids: str
diff --git a/src/finch/types/hris/benefits/individual_unenroll_many_params.py b/src/finch/types/hris/benefits/individual_unenroll_many_params.py
index 8368a083..d68a5a39 100644
--- a/src/finch/types/hris/benefits/individual_unenroll_many_params.py
+++ b/src/finch/types/hris/benefits/individual_unenroll_many_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ...._types import SequenceNotStr
@@ -10,7 +10,7 @@
class IndividualUnenrollManyParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
individual_ids: SequenceNotStr[str]
diff --git a/src/finch/types/hris/company/pay_statement_item/rule_create_params.py b/src/finch/types/hris/company/pay_statement_item/rule_create_params.py
index e4e87c2d..3b380745 100644
--- a/src/finch/types/hris/company/pay_statement_item/rule_create_params.py
+++ b/src/finch/types/hris/company/pay_statement_item/rule_create_params.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import Dict, Iterable, Optional
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, TypedDict
from ....._types import SequenceNotStr
@@ -11,7 +11,7 @@
class RuleCreateParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to create the rule for."""
attributes: Attributes
diff --git a/src/finch/types/hris/company/pay_statement_item/rule_delete_params.py b/src/finch/types/hris/company/pay_statement_item/rule_delete_params.py
index ca0dbcf9..c242816f 100644
--- a/src/finch/types/hris/company/pay_statement_item/rule_delete_params.py
+++ b/src/finch/types/hris/company/pay_statement_item/rule_delete_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ....._types import SequenceNotStr
@@ -10,5 +10,5 @@
class RuleDeleteParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to delete the rule for."""
diff --git a/src/finch/types/hris/company/pay_statement_item/rule_list_params.py b/src/finch/types/hris/company/pay_statement_item/rule_list_params.py
index cd49ff51..5786e11d 100644
--- a/src/finch/types/hris/company/pay_statement_item/rule_list_params.py
+++ b/src/finch/types/hris/company/pay_statement_item/rule_list_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ....._types import SequenceNotStr
@@ -10,5 +10,5 @@
class RuleListParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to retrieve rules for."""
diff --git a/src/finch/types/hris/company/pay_statement_item/rule_update_params.py b/src/finch/types/hris/company/pay_statement_item/rule_update_params.py
index 19dc5e58..5795a8dd 100644
--- a/src/finch/types/hris/company/pay_statement_item/rule_update_params.py
+++ b/src/finch/types/hris/company/pay_statement_item/rule_update_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, Annotated, TypedDict
+from typing_extensions import Annotated, TypedDict
from ....._types import SequenceNotStr
from ....._utils import PropertyInfo
@@ -11,7 +11,7 @@
class RuleUpdateParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to update the rule for."""
optional_property: Annotated[object, PropertyInfo(alias="optionalProperty")]
diff --git a/src/finch/types/hris/company/pay_statement_item_list_params.py b/src/finch/types/hris/company/pay_statement_item_list_params.py
index 05de54dc..88fc9e77 100644
--- a/src/finch/types/hris/company/pay_statement_item_list_params.py
+++ b/src/finch/types/hris/company/pay_statement_item_list_params.py
@@ -4,7 +4,7 @@
from typing import List, Union
from datetime import date
-from typing_extensions import Literal, Required, Annotated, TypedDict
+from typing_extensions import Literal, Annotated, TypedDict
from ...._types import SequenceNotStr
from ...._utils import PropertyInfo
@@ -13,9 +13,6 @@
class PayStatementItemListParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
- """The entity IDs to specify which entities' data to access."""
-
categories: List[Literal["earnings", "taxes", "employee_deductions", "employer_contributions"]]
"""Comma-delimited list of pay statement item categories to filter on.
@@ -28,6 +25,9 @@ class PayStatementItemListParams(TypedDict, total=False):
`YYYY-MM-DD` format.
"""
+ entity_ids: SequenceNotStr[str]
+ """The entity IDs to specify which entities' data to access."""
+
name: str
"""Case-insensitive partial match search by pay statement item name."""
diff --git a/src/finch/types/hris/company_retrieve_params.py b/src/finch/types/hris/company_retrieve_params.py
index 1c9b008b..c7d819a2 100644
--- a/src/finch/types/hris/company_retrieve_params.py
+++ b/src/finch/types/hris/company_retrieve_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ..._types import SequenceNotStr
@@ -10,5 +10,5 @@
class CompanyRetrieveParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/hris/directory_list_individuals_params.py b/src/finch/types/hris/directory_list_individuals_params.py
index d1f45447..ec734722 100644
--- a/src/finch/types/hris/directory_list_individuals_params.py
+++ b/src/finch/types/hris/directory_list_individuals_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ..._types import SequenceNotStr
@@ -10,7 +10,7 @@
class DirectoryListIndividualsParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
limit: int
diff --git a/src/finch/types/hris/directory_list_params.py b/src/finch/types/hris/directory_list_params.py
index d3e82e13..77a5e5ee 100644
--- a/src/finch/types/hris/directory_list_params.py
+++ b/src/finch/types/hris/directory_list_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ..._types import SequenceNotStr
@@ -10,7 +10,7 @@
class DirectoryListParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
limit: int
diff --git a/src/finch/types/hris/document_list_params.py b/src/finch/types/hris/document_list_params.py
index b56b5d71..ad599d1a 100644
--- a/src/finch/types/hris/document_list_params.py
+++ b/src/finch/types/hris/document_list_params.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import List
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, TypedDict
from ..._types import SequenceNotStr
@@ -11,7 +11,7 @@
class DocumentListParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
individual_ids: SequenceNotStr[str]
diff --git a/src/finch/types/hris/document_retreive_params.py b/src/finch/types/hris/document_retreive_params.py
index 275ea29f..714fdf13 100644
--- a/src/finch/types/hris/document_retreive_params.py
+++ b/src/finch/types/hris/document_retreive_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ..._types import SequenceNotStr
@@ -10,5 +10,5 @@
class DocumentRetreiveParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/hris/employment_retrieve_many_params.py b/src/finch/types/hris/employment_retrieve_many_params.py
index 69dd329e..08a6c759 100644
--- a/src/finch/types/hris/employment_retrieve_many_params.py
+++ b/src/finch/types/hris/employment_retrieve_many_params.py
@@ -11,12 +11,12 @@
class EmploymentRetrieveManyParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
- """The entity IDs to specify which entities' data to access."""
-
requests: Required[Iterable[Request]]
"""The array of batch requests."""
+ entity_ids: SequenceNotStr[str]
+ """The entity IDs to specify which entities' data to access."""
+
class Request(TypedDict, total=False):
individual_id: Required[str]
diff --git a/src/finch/types/hris/individual_retrieve_many_params.py b/src/finch/types/hris/individual_retrieve_many_params.py
index 0cb18d93..40b62fc6 100644
--- a/src/finch/types/hris/individual_retrieve_many_params.py
+++ b/src/finch/types/hris/individual_retrieve_many_params.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import Iterable, Optional
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ..._types import SequenceNotStr
@@ -11,7 +11,7 @@
class IndividualRetrieveManyParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
options: Optional[Options]
diff --git a/src/finch/types/hris/pay_statement_retrieve_many_params.py b/src/finch/types/hris/pay_statement_retrieve_many_params.py
index 63595021..8ccb1da9 100644
--- a/src/finch/types/hris/pay_statement_retrieve_many_params.py
+++ b/src/finch/types/hris/pay_statement_retrieve_many_params.py
@@ -11,12 +11,12 @@
class PayStatementRetrieveManyParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
- """The entity IDs to specify which entities' data to access."""
-
requests: Required[Iterable[Request]]
"""The array of batch requests."""
+ entity_ids: SequenceNotStr[str]
+ """The entity IDs to specify which entities' data to access."""
+
class Request(TypedDict, total=False):
payment_id: Required[str]
diff --git a/src/finch/types/hris/payment_list_params.py b/src/finch/types/hris/payment_list_params.py
index f43022bf..e4323ba8 100644
--- a/src/finch/types/hris/payment_list_params.py
+++ b/src/finch/types/hris/payment_list_params.py
@@ -19,11 +19,11 @@ class PaymentListParams(TypedDict, total=False):
format.
"""
- entity_ids: Required[SequenceNotStr[str]]
- """The entity IDs to specify which entities' data to access."""
-
start_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
"""
The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
format.
"""
+
+ entity_ids: SequenceNotStr[str]
+ """The entity IDs to specify which entities' data to access."""
diff --git a/src/finch/types/payroll/pay_group_list_params.py b/src/finch/types/payroll/pay_group_list_params.py
index 0e48056e..df574bee 100644
--- a/src/finch/types/payroll/pay_group_list_params.py
+++ b/src/finch/types/payroll/pay_group_list_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ..._types import SequenceNotStr
@@ -10,7 +10,7 @@
class PayGroupListParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
individual_id: str
diff --git a/src/finch/types/payroll/pay_group_retrieve_params.py b/src/finch/types/payroll/pay_group_retrieve_params.py
index eb229d7e..79143a38 100644
--- a/src/finch/types/payroll/pay_group_retrieve_params.py
+++ b/src/finch/types/payroll/pay_group_retrieve_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing_extensions import TypedDict
from ..._types import SequenceNotStr
@@ -10,5 +10,5 @@
class PayGroupRetrieveParams(TypedDict, total=False):
- entity_ids: Required[SequenceNotStr[str]]
+ entity_ids: SequenceNotStr[str]
"""The entity IDs to specify which entities' data to access."""
diff --git a/tests/api_resources/hris/benefits/test_individuals.py b/tests/api_resources/hris/benefits/test_individuals.py
index ccb6cd08..2da502e6 100644
--- a/tests/api_resources/hris/benefits/test_individuals.py
+++ b/tests/api_resources/hris/benefits/test_individuals.py
@@ -28,7 +28,6 @@ class TestIndividuals:
def test_method_enroll_many(self, client: Finch) -> None:
individual = client.hris.benefits.individuals.enroll_many(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(EnrolledIndividualBenefitResponse, individual, path=["response"])
@@ -69,7 +68,6 @@ def test_method_enroll_many_with_all_params(self, client: Finch) -> None:
def test_raw_response_enroll_many(self, client: Finch) -> None:
response = client.hris.benefits.individuals.with_raw_response.enroll_many(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -81,7 +79,6 @@ def test_raw_response_enroll_many(self, client: Finch) -> None:
def test_streaming_response_enroll_many(self, client: Finch) -> None:
with client.hris.benefits.individuals.with_streaming_response.enroll_many(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -96,11 +93,17 @@ def test_path_params_enroll_many(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
client.hris.benefits.individuals.with_raw_response.enroll_many(
benefit_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_enrolled_ids(self, client: Finch) -> None:
+ individual = client.hris.benefits.individuals.enrolled_ids(
+ benefit_id="benefit_id",
+ )
+ assert_matches_type(IndividualEnrolledIDsResponse, individual, path=["response"])
+
+ @parametrize
+ def test_method_enrolled_ids_with_all_params(self, client: Finch) -> None:
individual = client.hris.benefits.individuals.enrolled_ids(
benefit_id="benefit_id",
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
@@ -111,7 +114,6 @@ def test_method_enrolled_ids(self, client: Finch) -> None:
def test_raw_response_enrolled_ids(self, client: Finch) -> None:
response = client.hris.benefits.individuals.with_raw_response.enrolled_ids(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -123,7 +125,6 @@ def test_raw_response_enrolled_ids(self, client: Finch) -> None:
def test_streaming_response_enrolled_ids(self, client: Finch) -> None:
with client.hris.benefits.individuals.with_streaming_response.enrolled_ids(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -138,14 +139,12 @@ def test_path_params_enrolled_ids(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
client.hris.benefits.individuals.with_raw_response.enrolled_ids(
benefit_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_retrieve_many_benefits(self, client: Finch) -> None:
individual = client.hris.benefits.individuals.retrieve_many_benefits(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(SyncSinglePage[IndividualBenefit], individual, path=["response"])
@@ -162,7 +161,6 @@ def test_method_retrieve_many_benefits_with_all_params(self, client: Finch) -> N
def test_raw_response_retrieve_many_benefits(self, client: Finch) -> None:
response = client.hris.benefits.individuals.with_raw_response.retrieve_many_benefits(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -174,7 +172,6 @@ def test_raw_response_retrieve_many_benefits(self, client: Finch) -> None:
def test_streaming_response_retrieve_many_benefits(self, client: Finch) -> None:
with client.hris.benefits.individuals.with_streaming_response.retrieve_many_benefits(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -189,14 +186,12 @@ def test_path_params_retrieve_many_benefits(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
client.hris.benefits.individuals.with_raw_response.retrieve_many_benefits(
benefit_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_unenroll_many(self, client: Finch) -> None:
individual = client.hris.benefits.individuals.unenroll_many(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(UnenrolledIndividualBenefitResponse, individual, path=["response"])
@@ -213,7 +208,6 @@ def test_method_unenroll_many_with_all_params(self, client: Finch) -> None:
def test_raw_response_unenroll_many(self, client: Finch) -> None:
response = client.hris.benefits.individuals.with_raw_response.unenroll_many(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -225,7 +219,6 @@ def test_raw_response_unenroll_many(self, client: Finch) -> None:
def test_streaming_response_unenroll_many(self, client: Finch) -> None:
with client.hris.benefits.individuals.with_streaming_response.unenroll_many(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -240,7 +233,6 @@ def test_path_params_unenroll_many(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
client.hris.benefits.individuals.with_raw_response.unenroll_many(
benefit_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -253,7 +245,6 @@ class TestAsyncIndividuals:
async def test_method_enroll_many(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.benefits.individuals.enroll_many(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(EnrolledIndividualBenefitResponse, individual, path=["response"])
@@ -294,7 +285,6 @@ async def test_method_enroll_many_with_all_params(self, async_client: AsyncFinch
async def test_raw_response_enroll_many(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.benefits.individuals.with_raw_response.enroll_many(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -306,7 +296,6 @@ async def test_raw_response_enroll_many(self, async_client: AsyncFinch) -> None:
async def test_streaming_response_enroll_many(self, async_client: AsyncFinch) -> None:
async with async_client.hris.benefits.individuals.with_streaming_response.enroll_many(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -321,11 +310,17 @@ async def test_path_params_enroll_many(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
await async_client.hris.benefits.individuals.with_raw_response.enroll_many(
benefit_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_enrolled_ids(self, async_client: AsyncFinch) -> None:
+ individual = await async_client.hris.benefits.individuals.enrolled_ids(
+ benefit_id="benefit_id",
+ )
+ assert_matches_type(IndividualEnrolledIDsResponse, individual, path=["response"])
+
+ @parametrize
+ async def test_method_enrolled_ids_with_all_params(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.benefits.individuals.enrolled_ids(
benefit_id="benefit_id",
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
@@ -336,7 +331,6 @@ async def test_method_enrolled_ids(self, async_client: AsyncFinch) -> None:
async def test_raw_response_enrolled_ids(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.benefits.individuals.with_raw_response.enrolled_ids(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -348,7 +342,6 @@ async def test_raw_response_enrolled_ids(self, async_client: AsyncFinch) -> None
async def test_streaming_response_enrolled_ids(self, async_client: AsyncFinch) -> None:
async with async_client.hris.benefits.individuals.with_streaming_response.enrolled_ids(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -363,14 +356,12 @@ async def test_path_params_enrolled_ids(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
await async_client.hris.benefits.individuals.with_raw_response.enrolled_ids(
benefit_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_retrieve_many_benefits(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.benefits.individuals.retrieve_many_benefits(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(AsyncSinglePage[IndividualBenefit], individual, path=["response"])
@@ -387,7 +378,6 @@ async def test_method_retrieve_many_benefits_with_all_params(self, async_client:
async def test_raw_response_retrieve_many_benefits(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.benefits.individuals.with_raw_response.retrieve_many_benefits(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -399,7 +389,6 @@ async def test_raw_response_retrieve_many_benefits(self, async_client: AsyncFinc
async def test_streaming_response_retrieve_many_benefits(self, async_client: AsyncFinch) -> None:
async with async_client.hris.benefits.individuals.with_streaming_response.retrieve_many_benefits(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -414,14 +403,12 @@ async def test_path_params_retrieve_many_benefits(self, async_client: AsyncFinch
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
await async_client.hris.benefits.individuals.with_raw_response.retrieve_many_benefits(
benefit_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_unenroll_many(self, async_client: AsyncFinch) -> None:
individual = await async_client.hris.benefits.individuals.unenroll_many(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(UnenrolledIndividualBenefitResponse, individual, path=["response"])
@@ -438,7 +425,6 @@ async def test_method_unenroll_many_with_all_params(self, async_client: AsyncFin
async def test_raw_response_unenroll_many(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.benefits.individuals.with_raw_response.unenroll_many(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -450,7 +436,6 @@ async def test_raw_response_unenroll_many(self, async_client: AsyncFinch) -> Non
async def test_streaming_response_unenroll_many(self, async_client: AsyncFinch) -> None:
async with async_client.hris.benefits.individuals.with_streaming_response.unenroll_many(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -465,5 +450,4 @@ async def test_path_params_unenroll_many(self, async_client: AsyncFinch) -> None
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
await async_client.hris.benefits.individuals.with_raw_response.unenroll_many(
benefit_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
diff --git a/tests/api_resources/hris/company/pay_statement_item/test_rules.py b/tests/api_resources/hris/company/pay_statement_item/test_rules.py
index 3f548af3..39af7a0f 100644
--- a/tests/api_resources/hris/company/pay_statement_item/test_rules.py
+++ b/tests/api_resources/hris/company/pay_statement_item/test_rules.py
@@ -25,9 +25,7 @@ class TestRules:
@parametrize
def test_method_create(self, client: Finch) -> None:
- rule = client.hris.company.pay_statement_item.rules.create(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ rule = client.hris.company.pay_statement_item.rules.create()
assert_matches_type(RuleCreateResponse, rule, path=["response"])
@parametrize
@@ -50,9 +48,7 @@ def test_method_create_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_create(self, client: Finch) -> None:
- response = client.hris.company.pay_statement_item.rules.with_raw_response.create(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = client.hris.company.pay_statement_item.rules.with_raw_response.create()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -61,9 +57,7 @@ def test_raw_response_create(self, client: Finch) -> None:
@parametrize
def test_streaming_response_create(self, client: Finch) -> None:
- with client.hris.company.pay_statement_item.rules.with_streaming_response.create(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ with client.hris.company.pay_statement_item.rules.with_streaming_response.create() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -76,7 +70,6 @@ def test_streaming_response_create(self, client: Finch) -> None:
def test_method_update(self, client: Finch) -> None:
rule = client.hris.company.pay_statement_item.rules.update(
rule_id="rule_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(RuleUpdateResponse, rule, path=["response"])
@@ -93,7 +86,6 @@ def test_method_update_with_all_params(self, client: Finch) -> None:
def test_raw_response_update(self, client: Finch) -> None:
response = client.hris.company.pay_statement_item.rules.with_raw_response.update(
rule_id="rule_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -105,7 +97,6 @@ def test_raw_response_update(self, client: Finch) -> None:
def test_streaming_response_update(self, client: Finch) -> None:
with client.hris.company.pay_statement_item.rules.with_streaming_response.update(
rule_id="rule_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -120,11 +111,15 @@ def test_path_params_update(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"):
client.hris.company.pay_statement_item.rules.with_raw_response.update(
rule_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_list(self, client: Finch) -> None:
+ rule = client.hris.company.pay_statement_item.rules.list()
+ assert_matches_type(SyncResponsesPage[RuleListResponse], rule, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Finch) -> None:
rule = client.hris.company.pay_statement_item.rules.list(
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -132,9 +127,7 @@ def test_method_list(self, client: Finch) -> None:
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
- response = client.hris.company.pay_statement_item.rules.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = client.hris.company.pay_statement_item.rules.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -143,9 +136,7 @@ def test_raw_response_list(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
- with client.hris.company.pay_statement_item.rules.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ with client.hris.company.pay_statement_item.rules.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -156,6 +147,13 @@ def test_streaming_response_list(self, client: Finch) -> None:
@parametrize
def test_method_delete(self, client: Finch) -> None:
+ rule = client.hris.company.pay_statement_item.rules.delete(
+ rule_id="rule_id",
+ )
+ assert_matches_type(RuleDeleteResponse, rule, path=["response"])
+
+ @parametrize
+ def test_method_delete_with_all_params(self, client: Finch) -> None:
rule = client.hris.company.pay_statement_item.rules.delete(
rule_id="rule_id",
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
@@ -166,7 +164,6 @@ def test_method_delete(self, client: Finch) -> None:
def test_raw_response_delete(self, client: Finch) -> None:
response = client.hris.company.pay_statement_item.rules.with_raw_response.delete(
rule_id="rule_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -178,7 +175,6 @@ def test_raw_response_delete(self, client: Finch) -> None:
def test_streaming_response_delete(self, client: Finch) -> None:
with client.hris.company.pay_statement_item.rules.with_streaming_response.delete(
rule_id="rule_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -193,7 +189,6 @@ def test_path_params_delete(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"):
client.hris.company.pay_statement_item.rules.with_raw_response.delete(
rule_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -204,9 +199,7 @@ class TestAsyncRules:
@parametrize
async def test_method_create(self, async_client: AsyncFinch) -> None:
- rule = await async_client.hris.company.pay_statement_item.rules.create(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ rule = await async_client.hris.company.pay_statement_item.rules.create()
assert_matches_type(RuleCreateResponse, rule, path=["response"])
@parametrize
@@ -229,9 +222,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) ->
@parametrize
async def test_raw_response_create(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.company.pay_statement_item.rules.with_raw_response.create(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = await async_client.hris.company.pay_statement_item.rules.with_raw_response.create()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -240,9 +231,7 @@ async def test_raw_response_create(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_create(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.company.pay_statement_item.rules.with_streaming_response.create(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ async with async_client.hris.company.pay_statement_item.rules.with_streaming_response.create() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -255,7 +244,6 @@ async def test_streaming_response_create(self, async_client: AsyncFinch) -> None
async def test_method_update(self, async_client: AsyncFinch) -> None:
rule = await async_client.hris.company.pay_statement_item.rules.update(
rule_id="rule_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(RuleUpdateResponse, rule, path=["response"])
@@ -272,7 +260,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncFinch) ->
async def test_raw_response_update(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.company.pay_statement_item.rules.with_raw_response.update(
rule_id="rule_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -284,7 +271,6 @@ async def test_raw_response_update(self, async_client: AsyncFinch) -> None:
async def test_streaming_response_update(self, async_client: AsyncFinch) -> None:
async with async_client.hris.company.pay_statement_item.rules.with_streaming_response.update(
rule_id="rule_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -299,11 +285,15 @@ async def test_path_params_update(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"):
await async_client.hris.company.pay_statement_item.rules.with_raw_response.update(
rule_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
+ rule = await async_client.hris.company.pay_statement_item.rules.list()
+ assert_matches_type(AsyncResponsesPage[RuleListResponse], rule, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> None:
rule = await async_client.hris.company.pay_statement_item.rules.list(
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -311,9 +301,7 @@ async def test_method_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.company.pay_statement_item.rules.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = await async_client.hris.company.pay_statement_item.rules.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -322,9 +310,7 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.company.pay_statement_item.rules.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ async with async_client.hris.company.pay_statement_item.rules.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -335,6 +321,13 @@ async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_method_delete(self, async_client: AsyncFinch) -> None:
+ rule = await async_client.hris.company.pay_statement_item.rules.delete(
+ rule_id="rule_id",
+ )
+ assert_matches_type(RuleDeleteResponse, rule, path=["response"])
+
+ @parametrize
+ async def test_method_delete_with_all_params(self, async_client: AsyncFinch) -> None:
rule = await async_client.hris.company.pay_statement_item.rules.delete(
rule_id="rule_id",
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
@@ -345,7 +338,6 @@ async def test_method_delete(self, async_client: AsyncFinch) -> None:
async def test_raw_response_delete(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.company.pay_statement_item.rules.with_raw_response.delete(
rule_id="rule_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -357,7 +349,6 @@ async def test_raw_response_delete(self, async_client: AsyncFinch) -> None:
async def test_streaming_response_delete(self, async_client: AsyncFinch) -> None:
async with async_client.hris.company.pay_statement_item.rules.with_streaming_response.delete(
rule_id="rule_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -372,5 +363,4 @@ async def test_path_params_delete(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"):
await async_client.hris.company.pay_statement_item.rules.with_raw_response.delete(
rule_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
diff --git a/tests/api_resources/hris/company/test_pay_statement_item.py b/tests/api_resources/hris/company/test_pay_statement_item.py
index ffd7a060..42989f22 100644
--- a/tests/api_resources/hris/company/test_pay_statement_item.py
+++ b/tests/api_resources/hris/company/test_pay_statement_item.py
@@ -21,17 +21,15 @@ class TestPayStatementItem:
@parametrize
def test_method_list(self, client: Finch) -> None:
- pay_statement_item = client.hris.company.pay_statement_item.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ pay_statement_item = client.hris.company.pay_statement_item.list()
assert_matches_type(SyncResponsesPage[PayStatementItemListResponse], pay_statement_item, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Finch) -> None:
pay_statement_item = client.hris.company.pay_statement_item.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
categories=["earnings"],
end_date=parse_date("2024-07-01"),
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
name="name",
start_date=parse_date("2024-01-01"),
type="base_compensation",
@@ -40,9 +38,7 @@ def test_method_list_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
- response = client.hris.company.pay_statement_item.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = client.hris.company.pay_statement_item.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -51,9 +47,7 @@ def test_raw_response_list(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
- with client.hris.company.pay_statement_item.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ with client.hris.company.pay_statement_item.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -70,17 +64,15 @@ class TestAsyncPayStatementItem:
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
- pay_statement_item = await async_client.hris.company.pay_statement_item.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ pay_statement_item = await async_client.hris.company.pay_statement_item.list()
assert_matches_type(AsyncResponsesPage[PayStatementItemListResponse], pay_statement_item, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> None:
pay_statement_item = await async_client.hris.company.pay_statement_item.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
categories=["earnings"],
end_date=parse_date("2024-07-01"),
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
name="name",
start_date=parse_date("2024-01-01"),
type="base_compensation",
@@ -89,9 +81,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> No
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.company.pay_statement_item.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = await async_client.hris.company.pay_statement_item.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -100,9 +90,7 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.company.pay_statement_item.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ async with async_client.hris.company.pay_statement_item.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/hris/test_benefits.py b/tests/api_resources/hris/test_benefits.py
index 98ff9475..68d8da38 100644
--- a/tests/api_resources/hris/test_benefits.py
+++ b/tests/api_resources/hris/test_benefits.py
@@ -25,9 +25,7 @@ class TestBenefits:
@parametrize
def test_method_create(self, client: Finch) -> None:
- benefit = client.hris.benefits.create(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ benefit = client.hris.benefits.create()
assert_matches_type(CreateCompanyBenefitsResponse, benefit, path=["response"])
@parametrize
@@ -51,9 +49,7 @@ def test_method_create_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_create(self, client: Finch) -> None:
- response = client.hris.benefits.with_raw_response.create(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = client.hris.benefits.with_raw_response.create()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -62,9 +58,7 @@ def test_raw_response_create(self, client: Finch) -> None:
@parametrize
def test_streaming_response_create(self, client: Finch) -> None:
- with client.hris.benefits.with_streaming_response.create(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ with client.hris.benefits.with_streaming_response.create() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -75,6 +69,13 @@ def test_streaming_response_create(self, client: Finch) -> None:
@parametrize
def test_method_retrieve(self, client: Finch) -> None:
+ benefit = client.hris.benefits.retrieve(
+ benefit_id="benefit_id",
+ )
+ assert_matches_type(CompanyBenefit, benefit, path=["response"])
+
+ @parametrize
+ def test_method_retrieve_with_all_params(self, client: Finch) -> None:
benefit = client.hris.benefits.retrieve(
benefit_id="benefit_id",
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
@@ -85,7 +86,6 @@ def test_method_retrieve(self, client: Finch) -> None:
def test_raw_response_retrieve(self, client: Finch) -> None:
response = client.hris.benefits.with_raw_response.retrieve(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -97,7 +97,6 @@ def test_raw_response_retrieve(self, client: Finch) -> None:
def test_streaming_response_retrieve(self, client: Finch) -> None:
with client.hris.benefits.with_streaming_response.retrieve(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -112,14 +111,12 @@ def test_path_params_retrieve(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
client.hris.benefits.with_raw_response.retrieve(
benefit_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_update(self, client: Finch) -> None:
benefit = client.hris.benefits.update(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(UpdateCompanyBenefitResponse, benefit, path=["response"])
@@ -136,7 +133,6 @@ def test_method_update_with_all_params(self, client: Finch) -> None:
def test_raw_response_update(self, client: Finch) -> None:
response = client.hris.benefits.with_raw_response.update(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -148,7 +144,6 @@ def test_raw_response_update(self, client: Finch) -> None:
def test_streaming_response_update(self, client: Finch) -> None:
with client.hris.benefits.with_streaming_response.update(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -163,11 +158,15 @@ def test_path_params_update(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
client.hris.benefits.with_raw_response.update(
benefit_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_list(self, client: Finch) -> None:
+ benefit = client.hris.benefits.list()
+ assert_matches_type(SyncSinglePage[CompanyBenefit], benefit, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Finch) -> None:
benefit = client.hris.benefits.list(
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -175,9 +174,7 @@ def test_method_list(self, client: Finch) -> None:
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
- response = client.hris.benefits.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = client.hris.benefits.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -186,9 +183,7 @@ def test_raw_response_list(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
- with client.hris.benefits.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ with client.hris.benefits.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -199,6 +194,11 @@ def test_streaming_response_list(self, client: Finch) -> None:
@parametrize
def test_method_list_supported_benefits(self, client: Finch) -> None:
+ benefit = client.hris.benefits.list_supported_benefits()
+ assert_matches_type(SyncSinglePage[SupportedBenefit], benefit, path=["response"])
+
+ @parametrize
+ def test_method_list_supported_benefits_with_all_params(self, client: Finch) -> None:
benefit = client.hris.benefits.list_supported_benefits(
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -206,9 +206,7 @@ def test_method_list_supported_benefits(self, client: Finch) -> None:
@parametrize
def test_raw_response_list_supported_benefits(self, client: Finch) -> None:
- response = client.hris.benefits.with_raw_response.list_supported_benefits(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = client.hris.benefits.with_raw_response.list_supported_benefits()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -217,9 +215,7 @@ def test_raw_response_list_supported_benefits(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list_supported_benefits(self, client: Finch) -> None:
- with client.hris.benefits.with_streaming_response.list_supported_benefits(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ with client.hris.benefits.with_streaming_response.list_supported_benefits() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -236,9 +232,7 @@ class TestAsyncBenefits:
@parametrize
async def test_method_create(self, async_client: AsyncFinch) -> None:
- benefit = await async_client.hris.benefits.create(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ benefit = await async_client.hris.benefits.create()
assert_matches_type(CreateCompanyBenefitsResponse, benefit, path=["response"])
@parametrize
@@ -262,9 +256,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncFinch) ->
@parametrize
async def test_raw_response_create(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.benefits.with_raw_response.create(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = await async_client.hris.benefits.with_raw_response.create()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -273,9 +265,7 @@ async def test_raw_response_create(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_create(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.benefits.with_streaming_response.create(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ async with async_client.hris.benefits.with_streaming_response.create() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -286,6 +276,13 @@ async def test_streaming_response_create(self, async_client: AsyncFinch) -> None
@parametrize
async def test_method_retrieve(self, async_client: AsyncFinch) -> None:
+ benefit = await async_client.hris.benefits.retrieve(
+ benefit_id="benefit_id",
+ )
+ assert_matches_type(CompanyBenefit, benefit, path=["response"])
+
+ @parametrize
+ async def test_method_retrieve_with_all_params(self, async_client: AsyncFinch) -> None:
benefit = await async_client.hris.benefits.retrieve(
benefit_id="benefit_id",
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
@@ -296,7 +293,6 @@ async def test_method_retrieve(self, async_client: AsyncFinch) -> None:
async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.benefits.with_raw_response.retrieve(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -308,7 +304,6 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None:
async with async_client.hris.benefits.with_streaming_response.retrieve(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -323,14 +318,12 @@ async def test_path_params_retrieve(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
await async_client.hris.benefits.with_raw_response.retrieve(
benefit_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_update(self, async_client: AsyncFinch) -> None:
benefit = await async_client.hris.benefits.update(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert_matches_type(UpdateCompanyBenefitResponse, benefit, path=["response"])
@@ -347,7 +340,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncFinch) ->
async def test_raw_response_update(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.benefits.with_raw_response.update(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -359,7 +351,6 @@ async def test_raw_response_update(self, async_client: AsyncFinch) -> None:
async def test_streaming_response_update(self, async_client: AsyncFinch) -> None:
async with async_client.hris.benefits.with_streaming_response.update(
benefit_id="benefit_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -374,11 +365,15 @@ async def test_path_params_update(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `benefit_id` but received ''"):
await async_client.hris.benefits.with_raw_response.update(
benefit_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
+ benefit = await async_client.hris.benefits.list()
+ assert_matches_type(AsyncSinglePage[CompanyBenefit], benefit, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> None:
benefit = await async_client.hris.benefits.list(
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -386,9 +381,7 @@ async def test_method_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.benefits.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = await async_client.hris.benefits.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -397,9 +390,7 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.benefits.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ async with async_client.hris.benefits.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -410,6 +401,11 @@ async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_method_list_supported_benefits(self, async_client: AsyncFinch) -> None:
+ benefit = await async_client.hris.benefits.list_supported_benefits()
+ assert_matches_type(AsyncSinglePage[SupportedBenefit], benefit, path=["response"])
+
+ @parametrize
+ async def test_method_list_supported_benefits_with_all_params(self, async_client: AsyncFinch) -> None:
benefit = await async_client.hris.benefits.list_supported_benefits(
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -417,9 +413,7 @@ async def test_method_list_supported_benefits(self, async_client: AsyncFinch) ->
@parametrize
async def test_raw_response_list_supported_benefits(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.benefits.with_raw_response.list_supported_benefits(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = await async_client.hris.benefits.with_raw_response.list_supported_benefits()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -428,9 +422,7 @@ async def test_raw_response_list_supported_benefits(self, async_client: AsyncFin
@parametrize
async def test_streaming_response_list_supported_benefits(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.benefits.with_streaming_response.list_supported_benefits(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ async with async_client.hris.benefits.with_streaming_response.list_supported_benefits() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/hris/test_company.py b/tests/api_resources/hris/test_company.py
index a9bb1b24..6c8491ea 100644
--- a/tests/api_resources/hris/test_company.py
+++ b/tests/api_resources/hris/test_company.py
@@ -19,6 +19,11 @@ class TestCompany:
@parametrize
def test_method_retrieve(self, client: Finch) -> None:
+ company = client.hris.company.retrieve()
+ assert_matches_type(Company, company, path=["response"])
+
+ @parametrize
+ def test_method_retrieve_with_all_params(self, client: Finch) -> None:
company = client.hris.company.retrieve(
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -26,9 +31,7 @@ def test_method_retrieve(self, client: Finch) -> None:
@parametrize
def test_raw_response_retrieve(self, client: Finch) -> None:
- response = client.hris.company.with_raw_response.retrieve(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = client.hris.company.with_raw_response.retrieve()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -37,9 +40,7 @@ def test_raw_response_retrieve(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve(self, client: Finch) -> None:
- with client.hris.company.with_streaming_response.retrieve(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ with client.hris.company.with_streaming_response.retrieve() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -56,6 +57,11 @@ class TestAsyncCompany:
@parametrize
async def test_method_retrieve(self, async_client: AsyncFinch) -> None:
+ company = await async_client.hris.company.retrieve()
+ assert_matches_type(Company, company, path=["response"])
+
+ @parametrize
+ async def test_method_retrieve_with_all_params(self, async_client: AsyncFinch) -> None:
company = await async_client.hris.company.retrieve(
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -63,9 +69,7 @@ async def test_method_retrieve(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.company.with_raw_response.retrieve(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = await async_client.hris.company.with_raw_response.retrieve()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -74,9 +78,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.company.with_streaming_response.retrieve(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ async with async_client.hris.company.with_streaming_response.retrieve() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/hris/test_directory.py b/tests/api_resources/hris/test_directory.py
index dd649d95..fdeca307 100644
--- a/tests/api_resources/hris/test_directory.py
+++ b/tests/api_resources/hris/test_directory.py
@@ -22,9 +22,7 @@ class TestDirectory:
@parametrize
def test_method_list(self, client: Finch) -> None:
- directory = client.hris.directory.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ directory = client.hris.directory.list()
assert_matches_type(SyncIndividualsPage[IndividualInDirectory], directory, path=["response"])
@parametrize
@@ -38,9 +36,7 @@ def test_method_list_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
- response = client.hris.directory.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = client.hris.directory.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -49,9 +45,7 @@ def test_raw_response_list(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
- with client.hris.directory.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ with client.hris.directory.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -63,9 +57,7 @@ def test_streaming_response_list(self, client: Finch) -> None:
@parametrize
def test_method_list_individuals(self, client: Finch) -> None:
with pytest.warns(DeprecationWarning):
- directory = client.hris.directory.list_individuals(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ directory = client.hris.directory.list_individuals()
assert_matches_type(SyncIndividualsPage[IndividualInDirectory], directory, path=["response"])
@@ -83,9 +75,7 @@ def test_method_list_individuals_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_list_individuals(self, client: Finch) -> None:
with pytest.warns(DeprecationWarning):
- response = client.hris.directory.with_raw_response.list_individuals(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = client.hris.directory.with_raw_response.list_individuals()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -95,9 +85,7 @@ def test_raw_response_list_individuals(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list_individuals(self, client: Finch) -> None:
with pytest.warns(DeprecationWarning):
- with client.hris.directory.with_streaming_response.list_individuals(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ with client.hris.directory.with_streaming_response.list_individuals() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -114,9 +102,7 @@ class TestAsyncDirectory:
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
- directory = await async_client.hris.directory.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ directory = await async_client.hris.directory.list()
assert_matches_type(AsyncIndividualsPage[IndividualInDirectory], directory, path=["response"])
@parametrize
@@ -130,9 +116,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> No
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.directory.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = await async_client.hris.directory.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -141,9 +125,7 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.directory.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ async with async_client.hris.directory.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -155,9 +137,7 @@ async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_method_list_individuals(self, async_client: AsyncFinch) -> None:
with pytest.warns(DeprecationWarning):
- directory = await async_client.hris.directory.list_individuals(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ directory = await async_client.hris.directory.list_individuals()
assert_matches_type(AsyncIndividualsPage[IndividualInDirectory], directory, path=["response"])
@@ -175,9 +155,7 @@ async def test_method_list_individuals_with_all_params(self, async_client: Async
@parametrize
async def test_raw_response_list_individuals(self, async_client: AsyncFinch) -> None:
with pytest.warns(DeprecationWarning):
- response = await async_client.hris.directory.with_raw_response.list_individuals(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = await async_client.hris.directory.with_raw_response.list_individuals()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -187,9 +165,7 @@ async def test_raw_response_list_individuals(self, async_client: AsyncFinch) ->
@parametrize
async def test_streaming_response_list_individuals(self, async_client: AsyncFinch) -> None:
with pytest.warns(DeprecationWarning):
- async with async_client.hris.directory.with_streaming_response.list_individuals(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ async with async_client.hris.directory.with_streaming_response.list_individuals() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/hris/test_documents.py b/tests/api_resources/hris/test_documents.py
index c488ee9f..3048f109 100644
--- a/tests/api_resources/hris/test_documents.py
+++ b/tests/api_resources/hris/test_documents.py
@@ -22,9 +22,7 @@ class TestDocuments:
@parametrize
def test_method_list(self, client: Finch) -> None:
- document = client.hris.documents.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ document = client.hris.documents.list()
assert_matches_type(DocumentListResponse, document, path=["response"])
@parametrize
@@ -40,9 +38,7 @@ def test_method_list_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
- response = client.hris.documents.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = client.hris.documents.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -51,9 +47,7 @@ def test_raw_response_list(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
- with client.hris.documents.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ with client.hris.documents.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -64,6 +58,13 @@ def test_streaming_response_list(self, client: Finch) -> None:
@parametrize
def test_method_retreive(self, client: Finch) -> None:
+ document = client.hris.documents.retreive(
+ document_id="document_id",
+ )
+ assert_matches_type(DocumentRetreiveResponse, document, path=["response"])
+
+ @parametrize
+ def test_method_retreive_with_all_params(self, client: Finch) -> None:
document = client.hris.documents.retreive(
document_id="document_id",
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
@@ -74,7 +75,6 @@ def test_method_retreive(self, client: Finch) -> None:
def test_raw_response_retreive(self, client: Finch) -> None:
response = client.hris.documents.with_raw_response.retreive(
document_id="document_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -86,7 +86,6 @@ def test_raw_response_retreive(self, client: Finch) -> None:
def test_streaming_response_retreive(self, client: Finch) -> None:
with client.hris.documents.with_streaming_response.retreive(
document_id="document_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -101,7 +100,6 @@ def test_path_params_retreive(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `document_id` but received ''"):
client.hris.documents.with_raw_response.retreive(
document_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@@ -112,9 +110,7 @@ class TestAsyncDocuments:
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
- document = await async_client.hris.documents.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ document = await async_client.hris.documents.list()
assert_matches_type(DocumentListResponse, document, path=["response"])
@parametrize
@@ -130,9 +126,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> No
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.documents.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = await async_client.hris.documents.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -141,9 +135,7 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.documents.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ async with async_client.hris.documents.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -154,6 +146,13 @@ async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_method_retreive(self, async_client: AsyncFinch) -> None:
+ document = await async_client.hris.documents.retreive(
+ document_id="document_id",
+ )
+ assert_matches_type(DocumentRetreiveResponse, document, path=["response"])
+
+ @parametrize
+ async def test_method_retreive_with_all_params(self, async_client: AsyncFinch) -> None:
document = await async_client.hris.documents.retreive(
document_id="document_id",
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
@@ -164,7 +163,6 @@ async def test_method_retreive(self, async_client: AsyncFinch) -> None:
async def test_raw_response_retreive(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.documents.with_raw_response.retreive(
document_id="document_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -176,7 +174,6 @@ async def test_raw_response_retreive(self, async_client: AsyncFinch) -> None:
async def test_streaming_response_retreive(self, async_client: AsyncFinch) -> None:
async with async_client.hris.documents.with_streaming_response.retreive(
document_id="document_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -191,5 +188,4 @@ async def test_path_params_retreive(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `document_id` but received ''"):
await async_client.hris.documents.with_raw_response.retreive(
document_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
diff --git a/tests/api_resources/hris/test_employments.py b/tests/api_resources/hris/test_employments.py
index cea3b00b..45064af7 100644
--- a/tests/api_resources/hris/test_employments.py
+++ b/tests/api_resources/hris/test_employments.py
@@ -21,15 +21,21 @@ class TestEmployments:
@parametrize
def test_method_retrieve_many(self, client: Finch) -> None:
employment = client.hris.employments.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"individual_id": "individual_id"}],
)
assert_matches_type(SyncResponsesPage[EmploymentDataResponse], employment, path=["response"])
+ @parametrize
+ def test_method_retrieve_many_with_all_params(self, client: Finch) -> None:
+ employment = client.hris.employments.retrieve_many(
+ requests=[{"individual_id": "individual_id"}],
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
+ assert_matches_type(SyncResponsesPage[EmploymentDataResponse], employment, path=["response"])
+
@parametrize
def test_raw_response_retrieve_many(self, client: Finch) -> None:
response = client.hris.employments.with_raw_response.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"individual_id": "individual_id"}],
)
@@ -41,7 +47,6 @@ def test_raw_response_retrieve_many(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve_many(self, client: Finch) -> None:
with client.hris.employments.with_streaming_response.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"individual_id": "individual_id"}],
) as response:
assert not response.is_closed
@@ -61,15 +66,21 @@ class TestAsyncEmployments:
@parametrize
async def test_method_retrieve_many(self, async_client: AsyncFinch) -> None:
employment = await async_client.hris.employments.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"individual_id": "individual_id"}],
)
assert_matches_type(AsyncResponsesPage[EmploymentDataResponse], employment, path=["response"])
+ @parametrize
+ async def test_method_retrieve_many_with_all_params(self, async_client: AsyncFinch) -> None:
+ employment = await async_client.hris.employments.retrieve_many(
+ requests=[{"individual_id": "individual_id"}],
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
+ assert_matches_type(AsyncResponsesPage[EmploymentDataResponse], employment, path=["response"])
+
@parametrize
async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.employments.with_raw_response.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"individual_id": "individual_id"}],
)
@@ -81,7 +92,6 @@ async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> Non
@parametrize
async def test_streaming_response_retrieve_many(self, async_client: AsyncFinch) -> None:
async with async_client.hris.employments.with_streaming_response.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"individual_id": "individual_id"}],
) as response:
assert not response.is_closed
diff --git a/tests/api_resources/hris/test_individuals.py b/tests/api_resources/hris/test_individuals.py
index 523443fd..c2160896 100644
--- a/tests/api_resources/hris/test_individuals.py
+++ b/tests/api_resources/hris/test_individuals.py
@@ -20,9 +20,7 @@ class TestIndividuals:
@parametrize
def test_method_retrieve_many(self, client: Finch) -> None:
- individual = client.hris.individuals.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ individual = client.hris.individuals.retrieve_many()
assert_matches_type(SyncResponsesPage[IndividualResponse], individual, path=["response"])
@parametrize
@@ -36,9 +34,7 @@ def test_method_retrieve_many_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_retrieve_many(self, client: Finch) -> None:
- response = client.hris.individuals.with_raw_response.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = client.hris.individuals.with_raw_response.retrieve_many()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -47,9 +43,7 @@ def test_raw_response_retrieve_many(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve_many(self, client: Finch) -> None:
- with client.hris.individuals.with_streaming_response.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ with client.hris.individuals.with_streaming_response.retrieve_many() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -66,9 +60,7 @@ class TestAsyncIndividuals:
@parametrize
async def test_method_retrieve_many(self, async_client: AsyncFinch) -> None:
- individual = await async_client.hris.individuals.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ individual = await async_client.hris.individuals.retrieve_many()
assert_matches_type(AsyncResponsesPage[IndividualResponse], individual, path=["response"])
@parametrize
@@ -82,9 +74,7 @@ async def test_method_retrieve_many_with_all_params(self, async_client: AsyncFin
@parametrize
async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> None:
- response = await async_client.hris.individuals.with_raw_response.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = await async_client.hris.individuals.with_raw_response.retrieve_many()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -93,9 +83,7 @@ async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> Non
@parametrize
async def test_streaming_response_retrieve_many(self, async_client: AsyncFinch) -> None:
- async with async_client.hris.individuals.with_streaming_response.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ async with async_client.hris.individuals.with_streaming_response.retrieve_many() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/hris/test_pay_statements.py b/tests/api_resources/hris/test_pay_statements.py
index 30a36504..906a3b44 100644
--- a/tests/api_resources/hris/test_pay_statements.py
+++ b/tests/api_resources/hris/test_pay_statements.py
@@ -21,15 +21,27 @@ class TestPayStatements:
@parametrize
def test_method_retrieve_many(self, client: Finch) -> None:
pay_statement = client.hris.pay_statements.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],
)
assert_matches_type(SyncResponsesPage[PayStatementResponse], pay_statement, path=["response"])
+ @parametrize
+ def test_method_retrieve_many_with_all_params(self, client: Finch) -> None:
+ pay_statement = client.hris.pay_statements.retrieve_many(
+ requests=[
+ {
+ "payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ "limit": 50,
+ "offset": 0,
+ }
+ ],
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
+ assert_matches_type(SyncResponsesPage[PayStatementResponse], pay_statement, path=["response"])
+
@parametrize
def test_raw_response_retrieve_many(self, client: Finch) -> None:
response = client.hris.pay_statements.with_raw_response.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],
)
@@ -41,7 +53,6 @@ def test_raw_response_retrieve_many(self, client: Finch) -> None:
@parametrize
def test_streaming_response_retrieve_many(self, client: Finch) -> None:
with client.hris.pay_statements.with_streaming_response.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],
) as response:
assert not response.is_closed
@@ -61,15 +72,27 @@ class TestAsyncPayStatements:
@parametrize
async def test_method_retrieve_many(self, async_client: AsyncFinch) -> None:
pay_statement = await async_client.hris.pay_statements.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],
)
assert_matches_type(AsyncResponsesPage[PayStatementResponse], pay_statement, path=["response"])
+ @parametrize
+ async def test_method_retrieve_many_with_all_params(self, async_client: AsyncFinch) -> None:
+ pay_statement = await async_client.hris.pay_statements.retrieve_many(
+ requests=[
+ {
+ "payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ "limit": 50,
+ "offset": 0,
+ }
+ ],
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
+ assert_matches_type(AsyncResponsesPage[PayStatementResponse], pay_statement, path=["response"])
+
@parametrize
async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.pay_statements.with_raw_response.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],
)
@@ -81,7 +104,6 @@ async def test_raw_response_retrieve_many(self, async_client: AsyncFinch) -> Non
@parametrize
async def test_streaming_response_retrieve_many(self, async_client: AsyncFinch) -> None:
async with async_client.hris.pay_statements.with_streaming_response.retrieve_many(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
requests=[{"payment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}],
) as response:
assert not response.is_closed
diff --git a/tests/api_resources/hris/test_payments.py b/tests/api_resources/hris/test_payments.py
index e6760341..9a7e047e 100644
--- a/tests/api_resources/hris/test_payments.py
+++ b/tests/api_resources/hris/test_payments.py
@@ -23,16 +23,23 @@ class TestPayments:
def test_method_list(self, client: Finch) -> None:
payment = client.hris.payments.list(
end_date=parse_date("2021-01-01"),
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
start_date=parse_date("2021-01-01"),
)
assert_matches_type(SyncSinglePage[Payment], payment, path=["response"])
+ @parametrize
+ def test_method_list_with_all_params(self, client: Finch) -> None:
+ payment = client.hris.payments.list(
+ end_date=parse_date("2021-01-01"),
+ start_date=parse_date("2021-01-01"),
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
+ assert_matches_type(SyncSinglePage[Payment], payment, path=["response"])
+
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
response = client.hris.payments.with_raw_response.list(
end_date=parse_date("2021-01-01"),
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
start_date=parse_date("2021-01-01"),
)
@@ -45,7 +52,6 @@ def test_raw_response_list(self, client: Finch) -> None:
def test_streaming_response_list(self, client: Finch) -> None:
with client.hris.payments.with_streaming_response.list(
end_date=parse_date("2021-01-01"),
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
start_date=parse_date("2021-01-01"),
) as response:
assert not response.is_closed
@@ -66,16 +72,23 @@ class TestAsyncPayments:
async def test_method_list(self, async_client: AsyncFinch) -> None:
payment = await async_client.hris.payments.list(
end_date=parse_date("2021-01-01"),
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
start_date=parse_date("2021-01-01"),
)
assert_matches_type(AsyncSinglePage[Payment], payment, path=["response"])
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> None:
+ payment = await async_client.hris.payments.list(
+ end_date=parse_date("2021-01-01"),
+ start_date=parse_date("2021-01-01"),
+ entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
+ )
+ assert_matches_type(AsyncSinglePage[Payment], payment, path=["response"])
+
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
response = await async_client.hris.payments.with_raw_response.list(
end_date=parse_date("2021-01-01"),
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
start_date=parse_date("2021-01-01"),
)
@@ -88,7 +101,6 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
async with async_client.hris.payments.with_streaming_response.list(
end_date=parse_date("2021-01-01"),
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
start_date=parse_date("2021-01-01"),
) as response:
assert not response.is_closed
diff --git a/tests/api_resources/payroll/test_pay_groups.py b/tests/api_resources/payroll/test_pay_groups.py
index 16ad92ef..af65951f 100644
--- a/tests/api_resources/payroll/test_pay_groups.py
+++ b/tests/api_resources/payroll/test_pay_groups.py
@@ -23,6 +23,13 @@ class TestPayGroups:
@parametrize
def test_method_retrieve(self, client: Finch) -> None:
+ pay_group = client.payroll.pay_groups.retrieve(
+ pay_group_id="pay_group_id",
+ )
+ assert_matches_type(PayGroupRetrieveResponse, pay_group, path=["response"])
+
+ @parametrize
+ def test_method_retrieve_with_all_params(self, client: Finch) -> None:
pay_group = client.payroll.pay_groups.retrieve(
pay_group_id="pay_group_id",
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
@@ -33,7 +40,6 @@ def test_method_retrieve(self, client: Finch) -> None:
def test_raw_response_retrieve(self, client: Finch) -> None:
response = client.payroll.pay_groups.with_raw_response.retrieve(
pay_group_id="pay_group_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -45,7 +51,6 @@ def test_raw_response_retrieve(self, client: Finch) -> None:
def test_streaming_response_retrieve(self, client: Finch) -> None:
with client.payroll.pay_groups.with_streaming_response.retrieve(
pay_group_id="pay_group_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -60,14 +65,11 @@ def test_path_params_retrieve(self, client: Finch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pay_group_id` but received ''"):
client.payroll.pay_groups.with_raw_response.retrieve(
pay_group_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
def test_method_list(self, client: Finch) -> None:
- pay_group = client.payroll.pay_groups.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ pay_group = client.payroll.pay_groups.list()
assert_matches_type(SyncSinglePage[PayGroupListResponse], pay_group, path=["response"])
@parametrize
@@ -81,9 +83,7 @@ def test_method_list_with_all_params(self, client: Finch) -> None:
@parametrize
def test_raw_response_list(self, client: Finch) -> None:
- response = client.payroll.pay_groups.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = client.payroll.pay_groups.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -92,9 +92,7 @@ def test_raw_response_list(self, client: Finch) -> None:
@parametrize
def test_streaming_response_list(self, client: Finch) -> None:
- with client.payroll.pay_groups.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ with client.payroll.pay_groups.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -111,6 +109,13 @@ class TestAsyncPayGroups:
@parametrize
async def test_method_retrieve(self, async_client: AsyncFinch) -> None:
+ pay_group = await async_client.payroll.pay_groups.retrieve(
+ pay_group_id="pay_group_id",
+ )
+ assert_matches_type(PayGroupRetrieveResponse, pay_group, path=["response"])
+
+ @parametrize
+ async def test_method_retrieve_with_all_params(self, async_client: AsyncFinch) -> None:
pay_group = await async_client.payroll.pay_groups.retrieve(
pay_group_id="pay_group_id",
entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
@@ -121,7 +126,6 @@ async def test_method_retrieve(self, async_client: AsyncFinch) -> None:
async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
response = await async_client.payroll.pay_groups.with_raw_response.retrieve(
pay_group_id="pay_group_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
assert response.is_closed is True
@@ -133,7 +137,6 @@ async def test_raw_response_retrieve(self, async_client: AsyncFinch) -> None:
async def test_streaming_response_retrieve(self, async_client: AsyncFinch) -> None:
async with async_client.payroll.pay_groups.with_streaming_response.retrieve(
pay_group_id="pay_group_id",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -148,14 +151,11 @@ async def test_path_params_retrieve(self, async_client: AsyncFinch) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pay_group_id` but received ''"):
await async_client.payroll.pay_groups.with_raw_response.retrieve(
pay_group_id="",
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
)
@parametrize
async def test_method_list(self, async_client: AsyncFinch) -> None:
- pay_group = await async_client.payroll.pay_groups.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ pay_group = await async_client.payroll.pay_groups.list()
assert_matches_type(AsyncSinglePage[PayGroupListResponse], pay_group, path=["response"])
@parametrize
@@ -169,9 +169,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncFinch) -> No
@parametrize
async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
- response = await async_client.payroll.pay_groups.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- )
+ response = await async_client.payroll.pay_groups.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -180,9 +178,7 @@ async def test_raw_response_list(self, async_client: AsyncFinch) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncFinch) -> None:
- async with async_client.payroll.pay_groups.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"],
- ) as response:
+ async with async_client.payroll.pay_groups.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/test_client.py b/tests/test_client.py
index 14d3338e..38faf941 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -765,7 +765,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- response = client.hris.directory.with_raw_response.list(entity_ids=["550e8400-e29b-41d4-a716-446655440000"])
+ response = client.hris.directory.with_raw_response.list()
assert response.retries_taken == failures_before_success
assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success
@@ -787,9 +787,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- response = client.hris.directory.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"], extra_headers={"x-stainless-retry-count": Omit()}
- )
+ response = client.hris.directory.with_raw_response.list(extra_headers={"x-stainless-retry-count": Omit()})
assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0
@@ -812,9 +810,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- response = client.hris.directory.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"], extra_headers={"x-stainless-retry-count": "42"}
- )
+ response = client.hris.directory.with_raw_response.list(extra_headers={"x-stainless-retry-count": "42"})
assert response.http_request.headers.get("x-stainless-retry-count") == "42"
@@ -837,9 +833,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- with client.hris.directory.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"]
- ) as response:
+ with client.hris.directory.with_streaming_response.list() as response:
assert response.retries_taken == failures_before_success
assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success
@@ -1615,9 +1609,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- response = await client.hris.directory.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"]
- )
+ response = await client.hris.directory.with_raw_response.list()
assert response.retries_taken == failures_before_success
assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success
@@ -1642,9 +1634,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- response = await client.hris.directory.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"], extra_headers={"x-stainless-retry-count": Omit()}
- )
+ response = await client.hris.directory.with_raw_response.list(extra_headers={"x-stainless-retry-count": Omit()})
assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0
@@ -1668,9 +1658,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- response = await client.hris.directory.with_raw_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"], extra_headers={"x-stainless-retry-count": "42"}
- )
+ response = await client.hris.directory.with_raw_response.list(extra_headers={"x-stainless-retry-count": "42"})
assert response.http_request.headers.get("x-stainless-retry-count") == "42"
@@ -1694,9 +1682,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
respx_mock.get("/employer/directory").mock(side_effect=retry_handler)
- async with client.hris.directory.with_streaming_response.list(
- entity_ids=["550e8400-e29b-41d4-a716-446655440000"]
- ) as response:
+ async with client.hris.directory.with_streaming_response.list() as response:
assert response.retries_taken == failures_before_success
assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success
From 417412ea66d422ca1c2aaf3d7732ac74d360b31b Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Mon, 27 Oct 2025 20:01:09 +0000
Subject: [PATCH 20/20] release: 1.37.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 30 ++++++++++++++++++++++++++++++
pyproject.toml | 2 +-
src/finch/_version.py | 2 +-
4 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index f29e96b8..36116e17 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "1.36.0"
+ ".": "1.37.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index be9676dc..371f8167 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,35 @@
# Changelog
+## 1.37.0 (2025-10-27)
+
+Full Changelog: [v1.36.0...v1.37.0](https://github.com/Finch-API/finch-api-python/compare/v1.36.0...v1.37.0)
+
+### Features
+
+* **api:** api update ([87b2d65](https://github.com/Finch-API/finch-api-python/commit/87b2d65bc501fe885839ba1d6c5942cc01d203c9))
+* **api:** api update ([831b170](https://github.com/Finch-API/finch-api-python/commit/831b170668e868574307830fc6eb419d4c281cc2))
+* **api:** api update ([93a72d4](https://github.com/Finch-API/finch-api-python/commit/93a72d479f74907ce25e4117a225e76082ef6c9e))
+* **api:** api update ([b676295](https://github.com/Finch-API/finch-api-python/commit/b676295b15b012c8388ca679ab9815e34ce457df))
+* **api:** api update ([3b99127](https://github.com/Finch-API/finch-api-python/commit/3b9912772396d97b16f2b5dec275ffd5c46fc4ea))
+* **api:** api update ([9885ba4](https://github.com/Finch-API/finch-api-python/commit/9885ba4aba34ab023117ed8cb03bf38bb8baaef2))
+* **api:** api update ([8d08d1b](https://github.com/Finch-API/finch-api-python/commit/8d08d1b5226654243854f230bb34727ec5ac430b))
+* **api:** api update ([647e7c6](https://github.com/Finch-API/finch-api-python/commit/647e7c62de07d1b7ee16e76592f3594b7bba373d))
+* **api:** api update ([e014b8b](https://github.com/Finch-API/finch-api-python/commit/e014b8be6ee16d732b597dd93bcd5f0573c87254))
+
+
+### Bug Fixes
+
+* **compat:** compat with `pydantic<2.8.0` when using additional fields ([2d12ad9](https://github.com/Finch-API/finch-api-python/commit/2d12ad9207864192d9166bdf21d61effeabc6ae9))
+
+
+### Chores
+
+* bump `httpx-aiohttp` version to 0.1.9 ([993af10](https://github.com/Finch-API/finch-api-python/commit/993af10b90d38c53229108e40f1ebb657003d9d6))
+* do not install brew dependencies in ./scripts/bootstrap by default ([d9ac7ed](https://github.com/Finch-API/finch-api-python/commit/d9ac7edae7fdda865513b488caa03bd305b29b58))
+* **internal:** detect missing future annotations with ruff ([c1e5e28](https://github.com/Finch-API/finch-api-python/commit/c1e5e2841ec38f9d290169abd6320fb0b8438f2f))
+* **internal:** update pydantic dependency ([1e72324](https://github.com/Finch-API/finch-api-python/commit/1e723242d8a86affd25c23a009318ed4da5e3374))
+* **types:** change optional parameter type from NotGiven to Omit ([ae486ab](https://github.com/Finch-API/finch-api-python/commit/ae486abd5198b2aa15615108ef70281b1194666c))
+
## 1.36.0 (2025-09-08)
Full Changelog: [v1.35.0...v1.36.0](https://github.com/Finch-API/finch-api-python/compare/v1.35.0...v1.36.0)
diff --git a/pyproject.toml b/pyproject.toml
index 741f7e13..1662b037 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "finch-api"
-version = "1.36.0"
+version = "1.37.0"
description = "The official Python library for the Finch API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/finch/_version.py b/src/finch/_version.py
index 02127b56..d2d9b5da 100644
--- a/src/finch/_version.py
+++ b/src/finch/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "finch"
-__version__ = "1.36.0" # x-release-please-version
+__version__ = "1.37.0" # x-release-please-version