diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f371d275..bd34dce0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.106.0" + ".": "0.107.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 2092285e..d3e6ead4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 168 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-1d44bb7fad99487af1161eb24dfd5369440eda7e80ed237cbc1acc6802a7d212.yml -openapi_spec_hash: 1b6b6215b60094b76b91c56b925a251a -config_hash: e68a052fd109c0885732114753abc739 +configured_endpoints: 169 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-1a0e3a42c88b88140af0f9ad05ab0026fc87f0a500d6879c86b93dfa7f923810.yml +openapi_spec_hash: 2b4db6185c6e4ab3626461a448c97d4b +config_hash: 7a6a0c0bab3306093c6c171cd7407a45 diff --git a/CHANGELOG.md b/CHANGELOG.md index 80d15415..d481f1cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 0.107.0 (2025-09-30) + +Full Changelog: [v0.106.0...v0.107.0](https://github.com/lithic-com/lithic-python/compare/v0.106.0...v0.107.0) + +### Features + +* **api:** adds support for Auth Rule features ([7e0277a](https://github.com/lithic-com/lithic-python/commit/7e0277acc1907cdc6936beea74dabefa1eb196c0)) + + +### Chores + +* do not install brew dependencies in ./scripts/bootstrap by default ([91d6a3d](https://github.com/lithic-com/lithic-python/commit/91d6a3dc2cd34db41af8489e54fb7947dac54821)) +* **docs:** small updates to doc strings on a few endpoints ([29d124d](https://github.com/lithic-com/lithic-python/commit/29d124db71e0d20a196a8d909549a5eaa99e7fcc)) +* improve example values ([296dbed](https://github.com/lithic-com/lithic-python/commit/296dbed7ed5259a5fa277f6e7eefbcb633e1fb7c)) +* **internal:** fix formatting ([b2d5995](https://github.com/lithic-com/lithic-python/commit/b2d5995f96e25e9cfa46d2df75ccbce9862941a9)) +* **internal:** update pydantic dependency ([a9450be](https://github.com/lithic-com/lithic-python/commit/a9450be775514765b362ea0870b0a4f79ac79571)) +* **types:** change optional parameter type from NotGiven to Omit ([8a9d613](https://github.com/lithic-com/lithic-python/commit/8a9d613f03e41acec74c4dfbf393649ee320536f)) +* update more places to use Omit ([16eb50e](https://github.com/lithic-com/lithic-python/commit/16eb50e2bbb397ff778f10b74d739ad1e4125da1)) + ## 0.106.0 (2025-09-10) Full Changelog: [v0.105.0...v0.106.0](https://github.com/lithic-com/lithic-python/compare/v0.105.0...v0.106.0) diff --git a/api.md b/api.md index 01ee9fcc..28aa2a57 100644 --- a/api.md +++ b/api.md @@ -96,6 +96,7 @@ from lithic.types.auth_rules import ( V2DraftResponse, V2PromoteResponse, V2ReportResponse, + V2RetrieveFeaturesResponse, V2RetrieveReportResponse, ) ``` @@ -111,6 +112,7 @@ Methods: - client.auth_rules.v2.draft(auth_rule_token, \*\*params) -> V2DraftResponse - client.auth_rules.v2.promote(auth_rule_token) -> V2PromoteResponse - client.auth_rules.v2.report(auth_rule_token) -> V2ReportResponse +- client.auth_rules.v2.retrieve_features(auth_rule_token, \*\*params) -> V2RetrieveFeaturesResponse - client.auth_rules.v2.retrieve_report(auth_rule_token, \*\*params) -> V2RetrieveReportResponse ### Backtests diff --git a/pyproject.toml b/pyproject.toml index 45f5eb31..5b975b6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "lithic" -version = "0.106.0" +version = "0.107.0" description = "The official Python library for the lithic API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/requirements-dev.lock b/requirements-dev.lock index af3573f5..536db4b5 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 lithic -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 afc9481d..b7ae71e8 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 lithic -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/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 diff --git a/src/lithic/__init__.py b/src/lithic/__init__.py index 30958967..207c4678 100644 --- a/src/lithic/__init__.py +++ b/src/lithic/__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 ( ENVIRONMENTS, @@ -49,7 +49,9 @@ "ProxiesTypes", "NotGiven", "NOT_GIVEN", + "not_given", "Omit", + "omit", "LithicError", "APIError", "APIStatusError", diff --git a/src/lithic/_base_client.py b/src/lithic/_base_client.py index 94f2e8a0..ddcf4528 100644 --- a/src/lithic/_base_client.py +++ b/src/lithic/_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/lithic/_client.py b/src/lithic/_client.py index f440a529..b93276e7 100644 --- a/src/lithic/_client.py +++ b/src/lithic/_client.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import TYPE_CHECKING, Any, Dict, Union, Mapping, cast +from typing import TYPE_CHECKING, Any, Dict, Mapping, cast from typing_extensions import Self, Literal, override import httpx @@ -11,7 +11,6 @@ from . import _exceptions, _legacy_response from ._qs import Querystring from ._types import ( - NOT_GIVEN, Body, Omit, Query, @@ -21,6 +20,7 @@ Transport, ProxiesTypes, RequestOptions, + not_given, ) from ._utils import is_given, get_async_library from ._compat import cached_property @@ -127,9 +127,9 @@ def __init__( *, api_key: str | None = None, webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, - base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + environment: Literal["production", "sandbox"] | NotGiven = not_given, + base_url: str | httpx.URL | 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, @@ -351,7 +351,7 @@ def funding_events(self) -> FundingEvents: from .resources.funding_events import FundingEvents return FundingEvents(self) - + @cached_property def webhooks(self) -> webhooks.Webhooks: from .resources.webhooks import Webhooks @@ -412,9 +412,9 @@ def copy( webhook_secret: str | None = None, environment: Literal["production", "sandbox"] | 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, @@ -468,7 +468,7 @@ def api_status( 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, ) -> APIStatus: """Status of api""" return self.get( @@ -525,9 +525,9 @@ def __init__( *, api_key: str | None = None, webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, - base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + environment: Literal["production", "sandbox"] | NotGiven = not_given, + base_url: str | httpx.URL | 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, @@ -767,7 +767,7 @@ def account_activity(self) -> AsyncAccountActivity: from .resources.account_activity import AsyncAccountActivity return AsyncAccountActivity(self) - + @cached_property def webhooks(self) -> webhooks.AsyncWebhooks: from .resources.webhooks import AsyncWebhooks @@ -810,9 +810,9 @@ def copy( webhook_secret: str | None = None, environment: Literal["production", "sandbox"] | 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, @@ -866,7 +866,7 @@ async def api_status( 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, ) -> APIStatus: """Status of api""" return await self.get( diff --git a/src/lithic/_models.py b/src/lithic/_models.py index 3a6017ef..6a3cd1d2 100644 --- a/src/lithic/_models.py +++ b/src/lithic/_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, diff --git a/src/lithic/_qs.py b/src/lithic/_qs.py index 274320ca..ada6fd3f 100644 --- a/src/lithic/_qs.py +++ b/src/lithic/_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/lithic/_types.py b/src/lithic/_types.py index 933af6d5..e385ccbe 100644 --- a/src/lithic/_types.py +++ b/src/lithic/_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/lithic/_utils/_transform.py b/src/lithic/_utils/_transform.py index c19124f0..52075492 100644 --- a/src/lithic/_utils/_transform.py +++ b/src/lithic/_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/lithic/_utils/_utils.py b/src/lithic/_utils/_utils.py index f0818595..50d59269 100644 --- a/src/lithic/_utils/_utils.py +++ b/src/lithic/_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/lithic/_version.py b/src/lithic/_version.py index 030af9e3..47b14d42 100644 --- a/src/lithic/_version.py +++ b/src/lithic/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "lithic" -__version__ = "0.106.0" # x-release-please-version +__version__ = "0.107.0" # x-release-please-version diff --git a/src/lithic/resources/account_activity.py b/src/lithic/resources/account_activity.py index b2074015..dd9a6aa1 100644 --- a/src/lithic/resources/account_activity.py +++ b/src/lithic/resources/account_activity.py @@ -10,7 +10,7 @@ from .. import _legacy_response from ..types import account_activity_list_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 from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -46,9 +46,9 @@ def with_streaming_response(self) -> AccountActivityWithStreamingResponse: def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + begin: Union[str, datetime] | Omit = omit, + business_account_token: str | Omit = omit, category: Literal[ "ACH", "BALANCE_OR_FUNDING", @@ -64,21 +64,20 @@ def list( "MANAGEMENT_DISBURSEMENT", "PROGRAM_FUNDING", ] - | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - financial_account_token: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["DECLINED", "EXPIRED", "PENDING", "RETURNED", "REVERSED", "SETTLED", "VOIDED"] - | NotGiven = NOT_GIVEN, + | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + financial_account_token: str | Omit = omit, + page_size: int | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["DECLINED", "EXPIRED", "PENDING", "RETURNED", "REVERSED", "SETTLED", "VOIDED"] | 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, ) -> SyncCursorPage[AccountActivityListResponse]: """ Retrieve a list of transactions across all public accounts. @@ -157,7 +156,7 @@ def retrieve_transaction( 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, ) -> AccountActivityRetrieveTransactionResponse: """ Retrieve a single transaction @@ -210,9 +209,9 @@ def with_streaming_response(self) -> AsyncAccountActivityWithStreamingResponse: def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + begin: Union[str, datetime] | Omit = omit, + business_account_token: str | Omit = omit, category: Literal[ "ACH", "BALANCE_OR_FUNDING", @@ -228,21 +227,20 @@ def list( "MANAGEMENT_DISBURSEMENT", "PROGRAM_FUNDING", ] - | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - financial_account_token: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["DECLINED", "EXPIRED", "PENDING", "RETURNED", "REVERSED", "SETTLED", "VOIDED"] - | NotGiven = NOT_GIVEN, + | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + financial_account_token: str | Omit = omit, + page_size: int | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["DECLINED", "EXPIRED", "PENDING", "RETURNED", "REVERSED", "SETTLED", "VOIDED"] | 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[AccountActivityListResponse, AsyncCursorPage[AccountActivityListResponse]]: """ Retrieve a list of transactions across all public accounts. @@ -321,7 +319,7 @@ async def retrieve_transaction( 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, ) -> AccountActivityRetrieveTransactionResponse: """ Retrieve a single transaction diff --git a/src/lithic/resources/account_holders.py b/src/lithic/resources/account_holders.py index 2e4e5506..bd371f9b 100644 --- a/src/lithic/resources/account_holders.py +++ b/src/lithic/resources/account_holders.py @@ -17,7 +17,7 @@ account_holder_simulate_enrollment_review_params, account_holder_simulate_enrollment_document_review_params, ) -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 is_given, required_args, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -67,17 +67,16 @@ def create( nature_of_business: str, tos_timestamp: str, workflow: Literal["KYB_BASIC", "KYB_BYO"], - beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity] - | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - kyb_passed_timestamp: str | NotGiven = NOT_GIVEN, - website_url: str | NotGiven = NOT_GIVEN, + beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity] | Omit = omit, + external_id: str | Omit = omit, + kyb_passed_timestamp: str | Omit = omit, + website_url: 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, ) -> AccountHolderCreateResponse: """ Create an account holder and initiate the appropriate onboarding workflow. @@ -146,19 +145,19 @@ def create( *, business_entity: account_holder_create_params.KYBDelegatedBusinessEntity, beneficial_owner_individuals: Iterable[account_holder_create_params.KYBDelegatedBeneficialOwnerIndividual] - | NotGiven = NOT_GIVEN, - control_person: account_holder_create_params.KYBDelegatedControlPerson | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - nature_of_business: str | NotGiven = NOT_GIVEN, - tos_timestamp: str | NotGiven = NOT_GIVEN, - website_url: str | NotGiven = NOT_GIVEN, - workflow: Literal["KYB_DELEGATED"] | NotGiven = NOT_GIVEN, + | Omit = omit, + control_person: account_holder_create_params.KYBDelegatedControlPerson | Omit = omit, + external_id: str | Omit = omit, + nature_of_business: str | Omit = omit, + tos_timestamp: str | Omit = omit, + website_url: str | Omit = omit, + workflow: Literal["KYB_DELEGATED"] | 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, ) -> AccountHolderCreateResponse: """ Create an account holder and initiate the appropriate onboarding workflow. @@ -220,14 +219,14 @@ def create( individual: account_holder_create_params.KYCIndividual, tos_timestamp: str, workflow: Literal["KYC_BASIC", "KYC_BYO"], - external_id: str | NotGiven = NOT_GIVEN, - kyc_passed_timestamp: str | NotGiven = NOT_GIVEN, + external_id: str | Omit = omit, + kyc_passed_timestamp: 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, ) -> AccountHolderCreateResponse: """ Create an account holder and initiate the appropriate onboarding workflow. @@ -278,14 +277,14 @@ def create( last_name: str, phone_number: str, workflow: Literal["KYC_EXEMPT"], - business_account_token: str | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, + business_account_token: str | Omit = omit, + external_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, ) -> AccountHolderCreateResponse: """ Create an account holder and initiate the appropriate onboarding workflow. @@ -348,40 +347,39 @@ def create( *, beneficial_owner_individuals: Iterable[account_holder_create_params.KYBBeneficialOwnerIndividual] | Iterable[account_holder_create_params.KYBDelegatedBeneficialOwnerIndividual] - | NotGiven = NOT_GIVEN, + | Omit = omit, business_entity: account_holder_create_params.KYBBusinessEntity | account_holder_create_params.KYBDelegatedBusinessEntity - | NotGiven = NOT_GIVEN, + | Omit = omit, control_person: account_holder_create_params.KYBControlPerson | account_holder_create_params.KYBDelegatedControlPerson - | NotGiven = NOT_GIVEN, - nature_of_business: str | NotGiven = NOT_GIVEN, - tos_timestamp: str | NotGiven = NOT_GIVEN, + | Omit = omit, + nature_of_business: str | Omit = omit, + tos_timestamp: str | Omit = omit, workflow: Literal["KYB_BASIC", "KYB_BYO"] | Literal["KYB_DELEGATED"] | Literal["KYC_BASIC", "KYC_BYO"] | Literal["KYC_EXEMPT"] - | NotGiven = NOT_GIVEN, - beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity] - | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - kyb_passed_timestamp: str | NotGiven = NOT_GIVEN, - website_url: str | NotGiven = NOT_GIVEN, - individual: account_holder_create_params.KYCIndividual | NotGiven = NOT_GIVEN, - kyc_passed_timestamp: str | NotGiven = NOT_GIVEN, - address: Address | NotGiven = NOT_GIVEN, - email: str | NotGiven = NOT_GIVEN, - first_name: str | NotGiven = NOT_GIVEN, - kyc_exemption_type: Literal["AUTHORIZED_USER", "PREPAID_CARD_USER"] | NotGiven = NOT_GIVEN, - last_name: str | NotGiven = NOT_GIVEN, - phone_number: str | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, + | Omit = omit, + beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity] | Omit = omit, + external_id: str | Omit = omit, + kyb_passed_timestamp: str | Omit = omit, + website_url: str | Omit = omit, + individual: account_holder_create_params.KYCIndividual | Omit = omit, + kyc_passed_timestamp: str | Omit = omit, + address: Address | Omit = omit, + email: str | Omit = omit, + first_name: str | Omit = omit, + kyc_exemption_type: Literal["AUTHORIZED_USER", "PREPAID_CARD_USER"] | Omit = omit, + last_name: str | Omit = omit, + phone_number: str | Omit = omit, + business_account_token: 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, ) -> AccountHolderCreateResponse: if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT: timeout = 300 @@ -426,7 +424,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, ) -> AccountHolder: """ Get an Individual or Business Account Holder and/or their KYC or KYB evaluation @@ -459,20 +457,20 @@ def update( account_holder_token: str, *, beneficial_owner_entities: Iterable[account_holder_update_params.KYBPatchRequestBeneficialOwnerEntity] - | NotGiven = NOT_GIVEN, + | Omit = omit, beneficial_owner_individuals: Iterable[account_holder_update_params.KYBPatchRequestBeneficialOwnerIndividual] - | NotGiven = NOT_GIVEN, - business_entity: account_holder_update_params.KYBPatchRequestBusinessEntity | NotGiven = NOT_GIVEN, - control_person: account_holder_update_params.KYBPatchRequestControlPerson | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - nature_of_business: str | NotGiven = NOT_GIVEN, - website_url: str | NotGiven = NOT_GIVEN, + | Omit = omit, + business_entity: account_holder_update_params.KYBPatchRequestBusinessEntity | Omit = omit, + control_person: account_holder_update_params.KYBPatchRequestControlPerson | Omit = omit, + external_id: str | Omit = omit, + nature_of_business: str | Omit = omit, + website_url: 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, ) -> AccountHolderUpdateResponse: """ Update the information associated with a particular account holder (including @@ -531,14 +529,14 @@ def update( self, account_holder_token: str, *, - external_id: str | NotGiven = NOT_GIVEN, - individual: account_holder_update_params.KYCPatchRequestIndividual | NotGiven = NOT_GIVEN, + external_id: str | Omit = omit, + individual: account_holder_update_params.KYCPatchRequestIndividual | 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, ) -> AccountHolderUpdateResponse: """ Update the information associated with a particular account holder (including @@ -574,19 +572,19 @@ def update( self, account_holder_token: str, *, - address: AddressUpdateParam | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - email: str | NotGiven = NOT_GIVEN, - first_name: str | NotGiven = NOT_GIVEN, - last_name: str | NotGiven = NOT_GIVEN, - legal_business_name: str | NotGiven = NOT_GIVEN, - phone_number: str | NotGiven = NOT_GIVEN, + address: AddressUpdateParam | Omit = omit, + business_account_token: str | Omit = omit, + email: str | Omit = omit, + first_name: str | Omit = omit, + last_name: str | Omit = omit, + legal_business_name: str | Omit = omit, + phone_number: 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, ) -> AccountHolderUpdateResponse: """ Update the information associated with a particular account holder (including @@ -635,28 +633,28 @@ def update( account_holder_token: str, *, beneficial_owner_entities: Iterable[account_holder_update_params.KYBPatchRequestBeneficialOwnerEntity] - | NotGiven = NOT_GIVEN, + | Omit = omit, beneficial_owner_individuals: Iterable[account_holder_update_params.KYBPatchRequestBeneficialOwnerIndividual] - | NotGiven = NOT_GIVEN, - business_entity: account_holder_update_params.KYBPatchRequestBusinessEntity | NotGiven = NOT_GIVEN, - control_person: account_holder_update_params.KYBPatchRequestControlPerson | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - nature_of_business: str | NotGiven = NOT_GIVEN, - website_url: str | NotGiven = NOT_GIVEN, - individual: account_holder_update_params.KYCPatchRequestIndividual | NotGiven = NOT_GIVEN, - address: AddressUpdateParam | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - email: str | NotGiven = NOT_GIVEN, - first_name: str | NotGiven = NOT_GIVEN, - last_name: str | NotGiven = NOT_GIVEN, - legal_business_name: str | NotGiven = NOT_GIVEN, - phone_number: str | NotGiven = NOT_GIVEN, + | Omit = omit, + business_entity: account_holder_update_params.KYBPatchRequestBusinessEntity | Omit = omit, + control_person: account_holder_update_params.KYBPatchRequestControlPerson | Omit = omit, + external_id: str | Omit = omit, + nature_of_business: str | Omit = omit, + website_url: str | Omit = omit, + individual: account_holder_update_params.KYCPatchRequestIndividual | Omit = omit, + address: AddressUpdateParam | Omit = omit, + business_account_token: str | Omit = omit, + email: str | Omit = omit, + first_name: str | Omit = omit, + last_name: str | Omit = omit, + legal_business_name: str | Omit = omit, + phone_number: 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, ) -> AccountHolderUpdateResponse: if not account_holder_token: raise ValueError( @@ -698,23 +696,23 @@ def update( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - email: str | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - first_name: str | NotGiven = NOT_GIVEN, - last_name: str | NotGiven = NOT_GIVEN, - legal_business_name: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - phone_number: str | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + email: str | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + external_id: str | Omit = omit, + first_name: str | Omit = omit, + last_name: str | Omit = omit, + legal_business_name: str | Omit = omit, + limit: int | Omit = omit, + phone_number: str | Omit = omit, + starting_after: 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[AccountHolder]: """ Get a list of individual or business account holders and their KYC or KYB @@ -796,7 +794,7 @@ def list_documents( 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, ) -> AccountHolderListDocumentsResponse: """ Retrieve the status of account holder document uploads, or retrieve the upload @@ -846,7 +844,7 @@ def retrieve_document( 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, ) -> Document: """ Check the status of an account holder document upload, or retrieve the upload @@ -892,7 +890,7 @@ def simulate_enrollment_document_review( *, document_upload_token: str, status: Literal["UPLOADED", "ACCEPTED", "REJECTED", "PARTIAL_APPROVAL"], - accepted_entity_status_reasons: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + accepted_entity_status_reasons: SequenceNotStr[str] | Omit = omit, status_reason: Literal[ "DOCUMENT_MISSING_REQUIRED_DATA", "DOCUMENT_UPLOAD_TOO_BLURRY", @@ -906,13 +904,13 @@ def simulate_enrollment_document_review( "UNKNOWN_FAILURE_REASON", "UNKNOWN_ERROR", ] - | NotGiven = NOT_GIVEN, + | 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, ) -> Document: """ Simulates a review for an account holder document upload. @@ -955,8 +953,8 @@ def simulate_enrollment_document_review( def simulate_enrollment_review( self, *, - account_holder_token: str | NotGiven = NOT_GIVEN, - status: Literal["ACCEPTED", "REJECTED"] | NotGiven = NOT_GIVEN, + account_holder_token: str | Omit = omit, + status: Literal["ACCEPTED", "REJECTED"] | Omit = omit, status_reasons: List[ Literal[ "PRIMARY_BUSINESS_ENTITY_ID_VERIFICATION_FAILURE", @@ -978,13 +976,13 @@ def simulate_enrollment_review( "BENEFICIAL_OWNER_INDIVIDUAL_NAME_VERIFICATION_FAILURE", ] ] - | NotGiven = NOT_GIVEN, + | 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, ) -> AccountHolderSimulateEnrollmentReviewResponse: """Simulates an enrollment review for an account holder. @@ -1054,7 +1052,7 @@ def upload_document( 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, ) -> Document: """ Use this endpoint to identify which type of supported government-issued @@ -1139,17 +1137,16 @@ async def create( nature_of_business: str, tos_timestamp: str, workflow: Literal["KYB_BASIC", "KYB_BYO"], - beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity] - | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - kyb_passed_timestamp: str | NotGiven = NOT_GIVEN, - website_url: str | NotGiven = NOT_GIVEN, + beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity] | Omit = omit, + external_id: str | Omit = omit, + kyb_passed_timestamp: str | Omit = omit, + website_url: 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, ) -> AccountHolderCreateResponse: """ Create an account holder and initiate the appropriate onboarding workflow. @@ -1218,19 +1215,19 @@ async def create( *, business_entity: account_holder_create_params.KYBDelegatedBusinessEntity, beneficial_owner_individuals: Iterable[account_holder_create_params.KYBDelegatedBeneficialOwnerIndividual] - | NotGiven = NOT_GIVEN, - control_person: account_holder_create_params.KYBDelegatedControlPerson | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - nature_of_business: str | NotGiven = NOT_GIVEN, - tos_timestamp: str | NotGiven = NOT_GIVEN, - website_url: str | NotGiven = NOT_GIVEN, - workflow: Literal["KYB_DELEGATED"] | NotGiven = NOT_GIVEN, + | Omit = omit, + control_person: account_holder_create_params.KYBDelegatedControlPerson | Omit = omit, + external_id: str | Omit = omit, + nature_of_business: str | Omit = omit, + tos_timestamp: str | Omit = omit, + website_url: str | Omit = omit, + workflow: Literal["KYB_DELEGATED"] | 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, ) -> AccountHolderCreateResponse: """ Create an account holder and initiate the appropriate onboarding workflow. @@ -1292,14 +1289,14 @@ async def create( individual: account_holder_create_params.KYCIndividual, tos_timestamp: str, workflow: Literal["KYC_BASIC", "KYC_BYO"], - external_id: str | NotGiven = NOT_GIVEN, - kyc_passed_timestamp: str | NotGiven = NOT_GIVEN, + external_id: str | Omit = omit, + kyc_passed_timestamp: 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, ) -> AccountHolderCreateResponse: """ Create an account holder and initiate the appropriate onboarding workflow. @@ -1350,14 +1347,14 @@ async def create( last_name: str, phone_number: str, workflow: Literal["KYC_EXEMPT"], - business_account_token: str | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, + business_account_token: str | Omit = omit, + external_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, ) -> AccountHolderCreateResponse: """ Create an account holder and initiate the appropriate onboarding workflow. @@ -1420,40 +1417,39 @@ async def create( *, beneficial_owner_individuals: Iterable[account_holder_create_params.KYBBeneficialOwnerIndividual] | Iterable[account_holder_create_params.KYBDelegatedBeneficialOwnerIndividual] - | NotGiven = NOT_GIVEN, + | Omit = omit, business_entity: account_holder_create_params.KYBBusinessEntity | account_holder_create_params.KYBDelegatedBusinessEntity - | NotGiven = NOT_GIVEN, + | Omit = omit, control_person: account_holder_create_params.KYBControlPerson | account_holder_create_params.KYBDelegatedControlPerson - | NotGiven = NOT_GIVEN, - nature_of_business: str | NotGiven = NOT_GIVEN, - tos_timestamp: str | NotGiven = NOT_GIVEN, + | Omit = omit, + nature_of_business: str | Omit = omit, + tos_timestamp: str | Omit = omit, workflow: Literal["KYB_BASIC", "KYB_BYO"] | Literal["KYB_DELEGATED"] | Literal["KYC_BASIC", "KYC_BYO"] | Literal["KYC_EXEMPT"] - | NotGiven = NOT_GIVEN, - beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity] - | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - kyb_passed_timestamp: str | NotGiven = NOT_GIVEN, - website_url: str | NotGiven = NOT_GIVEN, - individual: account_holder_create_params.KYCIndividual | NotGiven = NOT_GIVEN, - kyc_passed_timestamp: str | NotGiven = NOT_GIVEN, - address: Address | NotGiven = NOT_GIVEN, - email: str | NotGiven = NOT_GIVEN, - first_name: str | NotGiven = NOT_GIVEN, - kyc_exemption_type: Literal["AUTHORIZED_USER", "PREPAID_CARD_USER"] | NotGiven = NOT_GIVEN, - last_name: str | NotGiven = NOT_GIVEN, - phone_number: str | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, + | Omit = omit, + beneficial_owner_entities: Iterable[account_holder_create_params.KYBBeneficialOwnerEntity] | Omit = omit, + external_id: str | Omit = omit, + kyb_passed_timestamp: str | Omit = omit, + website_url: str | Omit = omit, + individual: account_holder_create_params.KYCIndividual | Omit = omit, + kyc_passed_timestamp: str | Omit = omit, + address: Address | Omit = omit, + email: str | Omit = omit, + first_name: str | Omit = omit, + kyc_exemption_type: Literal["AUTHORIZED_USER", "PREPAID_CARD_USER"] | Omit = omit, + last_name: str | Omit = omit, + phone_number: str | Omit = omit, + business_account_token: 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, ) -> AccountHolderCreateResponse: if not is_given(timeout) and self._client.timeout == DEFAULT_TIMEOUT: timeout = 300 @@ -1498,7 +1494,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, ) -> AccountHolder: """ Get an Individual or Business Account Holder and/or their KYC or KYB evaluation @@ -1531,20 +1527,20 @@ async def update( account_holder_token: str, *, beneficial_owner_entities: Iterable[account_holder_update_params.KYBPatchRequestBeneficialOwnerEntity] - | NotGiven = NOT_GIVEN, + | Omit = omit, beneficial_owner_individuals: Iterable[account_holder_update_params.KYBPatchRequestBeneficialOwnerIndividual] - | NotGiven = NOT_GIVEN, - business_entity: account_holder_update_params.KYBPatchRequestBusinessEntity | NotGiven = NOT_GIVEN, - control_person: account_holder_update_params.KYBPatchRequestControlPerson | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - nature_of_business: str | NotGiven = NOT_GIVEN, - website_url: str | NotGiven = NOT_GIVEN, + | Omit = omit, + business_entity: account_holder_update_params.KYBPatchRequestBusinessEntity | Omit = omit, + control_person: account_holder_update_params.KYBPatchRequestControlPerson | Omit = omit, + external_id: str | Omit = omit, + nature_of_business: str | Omit = omit, + website_url: 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, ) -> AccountHolderUpdateResponse: """ Update the information associated with a particular account holder (including @@ -1603,14 +1599,14 @@ async def update( self, account_holder_token: str, *, - external_id: str | NotGiven = NOT_GIVEN, - individual: account_holder_update_params.KYCPatchRequestIndividual | NotGiven = NOT_GIVEN, + external_id: str | Omit = omit, + individual: account_holder_update_params.KYCPatchRequestIndividual | 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, ) -> AccountHolderUpdateResponse: """ Update the information associated with a particular account holder (including @@ -1646,19 +1642,19 @@ async def update( self, account_holder_token: str, *, - address: AddressUpdateParam | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - email: str | NotGiven = NOT_GIVEN, - first_name: str | NotGiven = NOT_GIVEN, - last_name: str | NotGiven = NOT_GIVEN, - legal_business_name: str | NotGiven = NOT_GIVEN, - phone_number: str | NotGiven = NOT_GIVEN, + address: AddressUpdateParam | Omit = omit, + business_account_token: str | Omit = omit, + email: str | Omit = omit, + first_name: str | Omit = omit, + last_name: str | Omit = omit, + legal_business_name: str | Omit = omit, + phone_number: 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, ) -> AccountHolderUpdateResponse: """ Update the information associated with a particular account holder (including @@ -1707,28 +1703,28 @@ async def update( account_holder_token: str, *, beneficial_owner_entities: Iterable[account_holder_update_params.KYBPatchRequestBeneficialOwnerEntity] - | NotGiven = NOT_GIVEN, + | Omit = omit, beneficial_owner_individuals: Iterable[account_holder_update_params.KYBPatchRequestBeneficialOwnerIndividual] - | NotGiven = NOT_GIVEN, - business_entity: account_holder_update_params.KYBPatchRequestBusinessEntity | NotGiven = NOT_GIVEN, - control_person: account_holder_update_params.KYBPatchRequestControlPerson | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - nature_of_business: str | NotGiven = NOT_GIVEN, - website_url: str | NotGiven = NOT_GIVEN, - individual: account_holder_update_params.KYCPatchRequestIndividual | NotGiven = NOT_GIVEN, - address: AddressUpdateParam | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - email: str | NotGiven = NOT_GIVEN, - first_name: str | NotGiven = NOT_GIVEN, - last_name: str | NotGiven = NOT_GIVEN, - legal_business_name: str | NotGiven = NOT_GIVEN, - phone_number: str | NotGiven = NOT_GIVEN, + | Omit = omit, + business_entity: account_holder_update_params.KYBPatchRequestBusinessEntity | Omit = omit, + control_person: account_holder_update_params.KYBPatchRequestControlPerson | Omit = omit, + external_id: str | Omit = omit, + nature_of_business: str | Omit = omit, + website_url: str | Omit = omit, + individual: account_holder_update_params.KYCPatchRequestIndividual | Omit = omit, + address: AddressUpdateParam | Omit = omit, + business_account_token: str | Omit = omit, + email: str | Omit = omit, + first_name: str | Omit = omit, + last_name: str | Omit = omit, + legal_business_name: str | Omit = omit, + phone_number: 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, ) -> AccountHolderUpdateResponse: if not account_holder_token: raise ValueError( @@ -1770,23 +1766,23 @@ async def update( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - email: str | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - first_name: str | NotGiven = NOT_GIVEN, - last_name: str | NotGiven = NOT_GIVEN, - legal_business_name: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - phone_number: str | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + email: str | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + external_id: str | Omit = omit, + first_name: str | Omit = omit, + last_name: str | Omit = omit, + legal_business_name: str | Omit = omit, + limit: int | Omit = omit, + phone_number: str | Omit = omit, + starting_after: 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[AccountHolder, AsyncSinglePage[AccountHolder]]: """ Get a list of individual or business account holders and their KYC or KYB @@ -1868,7 +1864,7 @@ async def list_documents( 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, ) -> AccountHolderListDocumentsResponse: """ Retrieve the status of account holder document uploads, or retrieve the upload @@ -1918,7 +1914,7 @@ async def retrieve_document( 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, ) -> Document: """ Check the status of an account holder document upload, or retrieve the upload @@ -1964,7 +1960,7 @@ async def simulate_enrollment_document_review( *, document_upload_token: str, status: Literal["UPLOADED", "ACCEPTED", "REJECTED", "PARTIAL_APPROVAL"], - accepted_entity_status_reasons: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + accepted_entity_status_reasons: SequenceNotStr[str] | Omit = omit, status_reason: Literal[ "DOCUMENT_MISSING_REQUIRED_DATA", "DOCUMENT_UPLOAD_TOO_BLURRY", @@ -1978,13 +1974,13 @@ async def simulate_enrollment_document_review( "UNKNOWN_FAILURE_REASON", "UNKNOWN_ERROR", ] - | NotGiven = NOT_GIVEN, + | 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, ) -> Document: """ Simulates a review for an account holder document upload. @@ -2027,8 +2023,8 @@ async def simulate_enrollment_document_review( async def simulate_enrollment_review( self, *, - account_holder_token: str | NotGiven = NOT_GIVEN, - status: Literal["ACCEPTED", "REJECTED"] | NotGiven = NOT_GIVEN, + account_holder_token: str | Omit = omit, + status: Literal["ACCEPTED", "REJECTED"] | Omit = omit, status_reasons: List[ Literal[ "PRIMARY_BUSINESS_ENTITY_ID_VERIFICATION_FAILURE", @@ -2050,13 +2046,13 @@ async def simulate_enrollment_review( "BENEFICIAL_OWNER_INDIVIDUAL_NAME_VERIFICATION_FAILURE", ] ] - | NotGiven = NOT_GIVEN, + | 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, ) -> AccountHolderSimulateEnrollmentReviewResponse: """Simulates an enrollment review for an account holder. @@ -2126,7 +2122,7 @@ async def upload_document( 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, ) -> Document: """ Use this endpoint to identify which type of supported government-issued diff --git a/src/lithic/resources/accounts.py b/src/lithic/resources/accounts.py index 9c2b4223..2fb57e59 100644 --- a/src/lithic/resources/accounts.py +++ b/src/lithic/resources/accounts.py @@ -10,7 +10,7 @@ from .. import _legacy_response from ..types import account_list_params, account_update_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 @@ -52,7 +52,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, ) -> Account: """ Get account configuration such as spend limits. @@ -80,11 +80,11 @@ def update( self, account_token: str, *, - comment: str | NotGiven = NOT_GIVEN, - daily_spend_limit: int | NotGiven = NOT_GIVEN, - lifetime_spend_limit: int | NotGiven = NOT_GIVEN, - monthly_spend_limit: int | NotGiven = NOT_GIVEN, - state: Literal["ACTIVE", "PAUSED", "CLOSED"] | NotGiven = NOT_GIVEN, + comment: str | Omit = omit, + daily_spend_limit: int | Omit = omit, + lifetime_spend_limit: int | Omit = omit, + monthly_spend_limit: int | Omit = omit, + state: Literal["ACTIVE", "PAUSED", "CLOSED"] | Omit = omit, substatus: Literal[ "FRAUD_IDENTIFIED", "SUSPICIOUS_ACTIVITY", @@ -95,14 +95,14 @@ def update( "INTERNAL_REVIEW", "OTHER", ] - | NotGiven = NOT_GIVEN, - verification_address: account_update_params.VerificationAddress | NotGiven = NOT_GIVEN, + | Omit = omit, + verification_address: account_update_params.VerificationAddress | 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, ) -> Account: """Update account configuration such as state or spend limits. @@ -196,17 +196,17 @@ def update( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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, ) -> SyncCursorPage[Account]: """List account configurations. @@ -266,7 +266,7 @@ def retrieve_spend_limits( 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, ) -> AccountSpendLimits: """ Get an Account's available spend limits, which is based on the spend limit @@ -324,7 +324,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, ) -> Account: """ Get account configuration such as spend limits. @@ -352,11 +352,11 @@ async def update( self, account_token: str, *, - comment: str | NotGiven = NOT_GIVEN, - daily_spend_limit: int | NotGiven = NOT_GIVEN, - lifetime_spend_limit: int | NotGiven = NOT_GIVEN, - monthly_spend_limit: int | NotGiven = NOT_GIVEN, - state: Literal["ACTIVE", "PAUSED", "CLOSED"] | NotGiven = NOT_GIVEN, + comment: str | Omit = omit, + daily_spend_limit: int | Omit = omit, + lifetime_spend_limit: int | Omit = omit, + monthly_spend_limit: int | Omit = omit, + state: Literal["ACTIVE", "PAUSED", "CLOSED"] | Omit = omit, substatus: Literal[ "FRAUD_IDENTIFIED", "SUSPICIOUS_ACTIVITY", @@ -367,14 +367,14 @@ async def update( "INTERNAL_REVIEW", "OTHER", ] - | NotGiven = NOT_GIVEN, - verification_address: account_update_params.VerificationAddress | NotGiven = NOT_GIVEN, + | Omit = omit, + verification_address: account_update_params.VerificationAddress | 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, ) -> Account: """Update account configuration such as state or spend limits. @@ -468,17 +468,17 @@ async def update( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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[Account, AsyncCursorPage[Account]]: """List account configurations. @@ -538,7 +538,7 @@ async def retrieve_spend_limits( 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, ) -> AccountSpendLimits: """ Get an Account's available spend limits, which is based on the spend limit diff --git a/src/lithic/resources/aggregate_balances.py b/src/lithic/resources/aggregate_balances.py index ff88783f..5d35dc36 100644 --- a/src/lithic/resources/aggregate_balances.py +++ b/src/lithic/resources/aggregate_balances.py @@ -8,7 +8,7 @@ from .. import _legacy_response from ..types import aggregate_balance_list_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 from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -43,13 +43,13 @@ def with_streaming_response(self) -> AggregateBalancesWithStreamingResponse: def list( self, *, - financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | NotGiven = NOT_GIVEN, + financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | 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[AggregateBalance]: """ Get the aggregated balance across all end-user accounts by financial account @@ -106,13 +106,13 @@ def with_streaming_response(self) -> AsyncAggregateBalancesWithStreamingResponse def list( self, *, - financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | NotGiven = NOT_GIVEN, + financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | 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[AggregateBalance, AsyncSinglePage[AggregateBalance]]: """ Get the aggregated balance across all end-user accounts by financial account diff --git a/src/lithic/resources/auth_rules/v2/backtests.py b/src/lithic/resources/auth_rules/v2/backtests.py index a7bd0c9e..5cade849 100644 --- a/src/lithic/resources/auth_rules/v2/backtests.py +++ b/src/lithic/resources/auth_rules/v2/backtests.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,14 +45,14 @@ def create( self, auth_rule_token: str, *, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - start: Union[str, datetime] | NotGiven = NOT_GIVEN, + end: Union[str, datetime] | Omit = omit, + start: Union[str, datetime] | 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, ) -> BacktestCreateResponse: """ Initiates a request to asynchronously generate a backtest for an Auth rule. @@ -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, ) -> BacktestResults: """ Returns the backtest results of an Auth rule (if available). @@ -191,14 +191,14 @@ async def create( self, auth_rule_token: str, *, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - start: Union[str, datetime] | NotGiven = NOT_GIVEN, + end: Union[str, datetime] | Omit = omit, + start: Union[str, datetime] | 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, ) -> BacktestCreateResponse: """ Initiates a request to asynchronously generate a backtest for an Auth rule. @@ -267,7 +267,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, ) -> BacktestResults: """ Returns the backtest results of an Auth rule (if available). diff --git a/src/lithic/resources/auth_rules/v2/v2.py b/src/lithic/resources/auth_rules/v2/v2.py index df1f0c60..78ce83f9 100644 --- a/src/lithic/resources/auth_rules/v2/v2.py +++ b/src/lithic/resources/auth_rules/v2/v2.py @@ -10,7 +10,7 @@ import httpx from .... import _legacy_response -from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, SequenceNotStr +from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given from ...._utils import maybe_transform, async_maybe_transform from .backtests import ( Backtests, @@ -32,6 +32,7 @@ v2_create_params, v2_update_params, v2_retrieve_report_params, + v2_retrieve_features_params, ) from ....types.auth_rules.v2_list_response import V2ListResponse from ....types.auth_rules.v2_apply_response import V2ApplyResponse @@ -42,6 +43,7 @@ from ....types.auth_rules.v2_promote_response import V2PromoteResponse from ....types.auth_rules.v2_retrieve_response import V2RetrieveResponse from ....types.auth_rules.v2_retrieve_report_response import V2RetrieveReportResponse +from ....types.auth_rules.v2_retrieve_features_response import V2RetrieveFeaturesResponse __all__ = ["V2", "AsyncV2"] @@ -74,19 +76,18 @@ def with_streaming_response(self) -> V2WithStreamingResponse: def create( self, *, - account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - business_account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | NotGiven = NOT_GIVEN, - name: Optional[str] | NotGiven = NOT_GIVEN, - parameters: v2_create_params.CreateAuthRuleRequestAccountTokensParameters | NotGiven = NOT_GIVEN, - type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] - | NotGiven = NOT_GIVEN, + account_tokens: SequenceNotStr[str] | Omit = omit, + business_account_tokens: SequenceNotStr[str] | Omit = omit, + event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | Omit = omit, + name: Optional[str] | Omit = omit, + parameters: v2_create_params.CreateAuthRuleRequestAccountTokensParameters | Omit = omit, + type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] | 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, ) -> V2CreateResponse: """ Creates a new V2 Auth rule in draft mode @@ -127,17 +128,16 @@ def create( self, *, card_tokens: SequenceNotStr[str], - event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | NotGiven = NOT_GIVEN, - name: Optional[str] | NotGiven = NOT_GIVEN, - parameters: v2_create_params.CreateAuthRuleRequestCardTokensParameters | NotGiven = NOT_GIVEN, - type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] - | NotGiven = NOT_GIVEN, + event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | Omit = omit, + name: Optional[str] | Omit = omit, + parameters: v2_create_params.CreateAuthRuleRequestCardTokensParameters | Omit = omit, + type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] | 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, ) -> V2CreateResponse: """ Creates a new V2 Auth rule in draft mode @@ -176,18 +176,17 @@ def create( self, *, program_level: bool, - event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | NotGiven = NOT_GIVEN, - excluded_card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - name: Optional[str] | NotGiven = NOT_GIVEN, - parameters: v2_create_params.CreateAuthRuleRequestProgramLevelParameters | NotGiven = NOT_GIVEN, - type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] - | NotGiven = NOT_GIVEN, + event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | Omit = omit, + excluded_card_tokens: SequenceNotStr[str] | Omit = omit, + name: Optional[str] | Omit = omit, + parameters: v2_create_params.CreateAuthRuleRequestProgramLevelParameters | Omit = omit, + type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] | 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, ) -> V2CreateResponse: """ Creates a new V2 Auth rule in draft mode @@ -226,25 +225,24 @@ def create( def create( self, *, - account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - business_account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | NotGiven = NOT_GIVEN, - name: Optional[str] | NotGiven = NOT_GIVEN, + account_tokens: SequenceNotStr[str] | Omit = omit, + business_account_tokens: SequenceNotStr[str] | Omit = omit, + event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | Omit = omit, + name: Optional[str] | Omit = omit, parameters: v2_create_params.CreateAuthRuleRequestAccountTokensParameters | v2_create_params.CreateAuthRuleRequestCardTokensParameters | v2_create_params.CreateAuthRuleRequestProgramLevelParameters - | NotGiven = NOT_GIVEN, - type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] - | NotGiven = NOT_GIVEN, - card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - program_level: bool | NotGiven = NOT_GIVEN, - excluded_card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + | Omit = omit, + type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] | Omit = omit, + card_tokens: SequenceNotStr[str] | Omit = omit, + program_level: bool | Omit = omit, + excluded_card_tokens: 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, ) -> V2CreateResponse: return self._post( "/v2/auth_rules", @@ -277,7 +275,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, ) -> V2RetrieveResponse: """ Fetches a V2 Auth rule by its token @@ -306,14 +304,14 @@ def update( self, auth_rule_token: str, *, - name: Optional[str] | NotGiven = NOT_GIVEN, - state: Literal["INACTIVE"] | NotGiven = NOT_GIVEN, + name: Optional[str] | Omit = omit, + state: Literal["INACTIVE"] | 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, ) -> V2UpdateResponse: """ Updates a V2 Auth rule's properties @@ -346,14 +344,14 @@ def update( self, auth_rule_token: str, *, - name: Optional[str] | NotGiven = NOT_GIVEN, - state: Literal["INACTIVE"] | NotGiven = NOT_GIVEN, + name: Optional[str] | Omit = omit, + state: Literal["INACTIVE"] | 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, ) -> V2UpdateResponse: """ Updates a V2 Auth rule's properties @@ -386,15 +384,15 @@ def update( self, auth_rule_token: str, *, - card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - name: Optional[str] | NotGiven = NOT_GIVEN, - state: Literal["INACTIVE"] | NotGiven = NOT_GIVEN, + card_tokens: SequenceNotStr[str] | Omit = omit, + name: Optional[str] | Omit = omit, + state: Literal["INACTIVE"] | 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, ) -> V2UpdateResponse: """ Updates a V2 Auth rule's properties @@ -429,16 +427,16 @@ def update( self, auth_rule_token: str, *, - excluded_card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - name: Optional[str] | NotGiven = NOT_GIVEN, - program_level: bool | NotGiven = NOT_GIVEN, - state: Literal["INACTIVE"] | NotGiven = NOT_GIVEN, + excluded_card_tokens: SequenceNotStr[str] | Omit = omit, + name: Optional[str] | Omit = omit, + program_level: bool | Omit = omit, + state: Literal["INACTIVE"] | 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, ) -> V2UpdateResponse: """ Updates a V2 Auth rule's properties @@ -474,17 +472,17 @@ def update( self, auth_rule_token: str, *, - name: Optional[str] | NotGiven = NOT_GIVEN, - state: Literal["INACTIVE"] | NotGiven = NOT_GIVEN, - card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - excluded_card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - program_level: bool | NotGiven = NOT_GIVEN, + name: Optional[str] | Omit = omit, + state: Literal["INACTIVE"] | Omit = omit, + card_tokens: SequenceNotStr[str] | Omit = omit, + excluded_card_tokens: SequenceNotStr[str] | Omit = omit, + program_level: bool | 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, ) -> V2UpdateResponse: if not auth_rule_token: raise ValueError(f"Expected a non-empty value for `auth_rule_token` but received {auth_rule_token!r}") @@ -509,20 +507,20 @@ def update( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - card_token: str | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - scope: Literal["PROGRAM", "ACCOUNT", "BUSINESS_ACCOUNT", "CARD", "ANY"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + business_account_token: str | Omit = omit, + card_token: str | Omit = omit, + ending_before: str | Omit = omit, + event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | Omit = omit, + page_size: int | Omit = omit, + scope: Literal["PROGRAM", "ACCOUNT", "BUSINESS_ACCOUNT", "CARD", "ANY"] | Omit = omit, + starting_after: 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, ) -> SyncCursorPage[V2ListResponse]: """ Lists V2 Auth rules @@ -588,7 +586,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, ) -> None: """ Deletes a V2 Auth rule @@ -618,14 +616,14 @@ def apply( self, auth_rule_token: str, *, - account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - business_account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + account_tokens: SequenceNotStr[str] | Omit = omit, + business_account_tokens: 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, ) -> V2ApplyResponse: """ Associates a V2 Auth rule with a card program, the provided account(s) or @@ -660,7 +658,7 @@ def apply( 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, ) -> V2ApplyResponse: """ Associates a V2 Auth rule with a card program, the provided account(s) or @@ -688,13 +686,13 @@ def apply( auth_rule_token: str, *, program_level: bool, - excluded_card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + excluded_card_tokens: 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, ) -> V2ApplyResponse: """ Associates a V2 Auth rule with a card program, the provided account(s) or @@ -722,17 +720,17 @@ def apply( self, auth_rule_token: str, *, - account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - business_account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - program_level: bool | NotGiven = NOT_GIVEN, - excluded_card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + account_tokens: SequenceNotStr[str] | Omit = omit, + business_account_tokens: SequenceNotStr[str] | Omit = omit, + card_tokens: SequenceNotStr[str] | Omit = omit, + program_level: bool | Omit = omit, + excluded_card_tokens: 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, ) -> V2ApplyResponse: if not auth_rule_token: raise ValueError(f"Expected a non-empty value for `auth_rule_token` but received {auth_rule_token!r}") @@ -758,13 +756,13 @@ def draft( self, auth_rule_token: str, *, - parameters: Optional[v2_draft_params.Parameters] | NotGiven = NOT_GIVEN, + parameters: Optional[v2_draft_params.Parameters] | 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, ) -> V2DraftResponse: """ Creates a new draft version of a rule that will be ran in shadow mode. @@ -803,7 +801,7 @@ def promote( 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, ) -> V2PromoteResponse: """ Promotes the draft version of an Auth rule to the currently active version such @@ -838,7 +836,7 @@ def report( 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, ) -> V2ReportResponse: """This endpoint is deprecated and will be removed in the future. @@ -913,6 +911,59 @@ def report( cast_to=V2ReportResponse, ) + def retrieve_features( + self, + auth_rule_token: str, + *, + account_token: str | Omit = omit, + card_token: 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, + ) -> V2RetrieveFeaturesResponse: + """ + Fetches the current calculated Feature values for the given Auth Rule + + This only calculates the features for the active version. + + - VelocityLimit Rules calculates the current Velocity Feature data. This + requires a `card_token` or `account_token` matching what the rule is Scoped + to. + - ConditionalBlock Rules calculates the CARD*TRANSACTION_COUNT*\\** attributes on + the rule. This requires a `card_token` + + Args: + 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 + """ + if not auth_rule_token: + raise ValueError(f"Expected a non-empty value for `auth_rule_token` but received {auth_rule_token!r}") + return self._get( + f"/v2/auth_rules/{auth_rule_token}/features", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_token": account_token, + "card_token": card_token, + }, + v2_retrieve_features_params.V2RetrieveFeaturesParams, + ), + ), + cast_to=V2RetrieveFeaturesResponse, + ) + def retrieve_report( self, auth_rule_token: str, @@ -924,7 +975,7 @@ def retrieve_report( 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, ) -> V2RetrieveReportResponse: """ Retrieves a performance report for an Auth rule containing daily statistics and @@ -1003,19 +1054,18 @@ def with_streaming_response(self) -> AsyncV2WithStreamingResponse: async def create( self, *, - account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - business_account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | NotGiven = NOT_GIVEN, - name: Optional[str] | NotGiven = NOT_GIVEN, - parameters: v2_create_params.CreateAuthRuleRequestAccountTokensParameters | NotGiven = NOT_GIVEN, - type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] - | NotGiven = NOT_GIVEN, + account_tokens: SequenceNotStr[str] | Omit = omit, + business_account_tokens: SequenceNotStr[str] | Omit = omit, + event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | Omit = omit, + name: Optional[str] | Omit = omit, + parameters: v2_create_params.CreateAuthRuleRequestAccountTokensParameters | Omit = omit, + type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] | 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, ) -> V2CreateResponse: """ Creates a new V2 Auth rule in draft mode @@ -1056,17 +1106,16 @@ async def create( self, *, card_tokens: SequenceNotStr[str], - event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | NotGiven = NOT_GIVEN, - name: Optional[str] | NotGiven = NOT_GIVEN, - parameters: v2_create_params.CreateAuthRuleRequestCardTokensParameters | NotGiven = NOT_GIVEN, - type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] - | NotGiven = NOT_GIVEN, + event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | Omit = omit, + name: Optional[str] | Omit = omit, + parameters: v2_create_params.CreateAuthRuleRequestCardTokensParameters | Omit = omit, + type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] | 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, ) -> V2CreateResponse: """ Creates a new V2 Auth rule in draft mode @@ -1105,18 +1154,17 @@ async def create( self, *, program_level: bool, - event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | NotGiven = NOT_GIVEN, - excluded_card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - name: Optional[str] | NotGiven = NOT_GIVEN, - parameters: v2_create_params.CreateAuthRuleRequestProgramLevelParameters | NotGiven = NOT_GIVEN, - type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] - | NotGiven = NOT_GIVEN, + event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | Omit = omit, + excluded_card_tokens: SequenceNotStr[str] | Omit = omit, + name: Optional[str] | Omit = omit, + parameters: v2_create_params.CreateAuthRuleRequestProgramLevelParameters | Omit = omit, + type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] | 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, ) -> V2CreateResponse: """ Creates a new V2 Auth rule in draft mode @@ -1155,25 +1203,24 @@ async def create( async def create( self, *, - account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - business_account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | NotGiven = NOT_GIVEN, - name: Optional[str] | NotGiven = NOT_GIVEN, + account_tokens: SequenceNotStr[str] | Omit = omit, + business_account_tokens: SequenceNotStr[str] | Omit = omit, + event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | Omit = omit, + name: Optional[str] | Omit = omit, parameters: v2_create_params.CreateAuthRuleRequestAccountTokensParameters | v2_create_params.CreateAuthRuleRequestCardTokensParameters | v2_create_params.CreateAuthRuleRequestProgramLevelParameters - | NotGiven = NOT_GIVEN, - type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] - | NotGiven = NOT_GIVEN, - card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - program_level: bool | NotGiven = NOT_GIVEN, - excluded_card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + | Omit = omit, + type: Literal["CONDITIONAL_BLOCK", "VELOCITY_LIMIT", "MERCHANT_LOCK", "CONDITIONAL_ACTION"] | Omit = omit, + card_tokens: SequenceNotStr[str] | Omit = omit, + program_level: bool | Omit = omit, + excluded_card_tokens: 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, ) -> V2CreateResponse: return await self._post( "/v2/auth_rules", @@ -1206,7 +1253,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, ) -> V2RetrieveResponse: """ Fetches a V2 Auth rule by its token @@ -1235,14 +1282,14 @@ async def update( self, auth_rule_token: str, *, - name: Optional[str] | NotGiven = NOT_GIVEN, - state: Literal["INACTIVE"] | NotGiven = NOT_GIVEN, + name: Optional[str] | Omit = omit, + state: Literal["INACTIVE"] | 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, ) -> V2UpdateResponse: """ Updates a V2 Auth rule's properties @@ -1275,14 +1322,14 @@ async def update( self, auth_rule_token: str, *, - name: Optional[str] | NotGiven = NOT_GIVEN, - state: Literal["INACTIVE"] | NotGiven = NOT_GIVEN, + name: Optional[str] | Omit = omit, + state: Literal["INACTIVE"] | 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, ) -> V2UpdateResponse: """ Updates a V2 Auth rule's properties @@ -1315,15 +1362,15 @@ async def update( self, auth_rule_token: str, *, - card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - name: Optional[str] | NotGiven = NOT_GIVEN, - state: Literal["INACTIVE"] | NotGiven = NOT_GIVEN, + card_tokens: SequenceNotStr[str] | Omit = omit, + name: Optional[str] | Omit = omit, + state: Literal["INACTIVE"] | 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, ) -> V2UpdateResponse: """ Updates a V2 Auth rule's properties @@ -1358,16 +1405,16 @@ async def update( self, auth_rule_token: str, *, - excluded_card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - name: Optional[str] | NotGiven = NOT_GIVEN, - program_level: bool | NotGiven = NOT_GIVEN, - state: Literal["INACTIVE"] | NotGiven = NOT_GIVEN, + excluded_card_tokens: SequenceNotStr[str] | Omit = omit, + name: Optional[str] | Omit = omit, + program_level: bool | Omit = omit, + state: Literal["INACTIVE"] | 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, ) -> V2UpdateResponse: """ Updates a V2 Auth rule's properties @@ -1403,17 +1450,17 @@ async def update( self, auth_rule_token: str, *, - name: Optional[str] | NotGiven = NOT_GIVEN, - state: Literal["INACTIVE"] | NotGiven = NOT_GIVEN, - card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - excluded_card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - program_level: bool | NotGiven = NOT_GIVEN, + name: Optional[str] | Omit = omit, + state: Literal["INACTIVE"] | Omit = omit, + card_tokens: SequenceNotStr[str] | Omit = omit, + excluded_card_tokens: SequenceNotStr[str] | Omit = omit, + program_level: bool | 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, ) -> V2UpdateResponse: if not auth_rule_token: raise ValueError(f"Expected a non-empty value for `auth_rule_token` but received {auth_rule_token!r}") @@ -1438,20 +1485,20 @@ async def update( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - card_token: str | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - scope: Literal["PROGRAM", "ACCOUNT", "BUSINESS_ACCOUNT", "CARD", "ANY"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + business_account_token: str | Omit = omit, + card_token: str | Omit = omit, + ending_before: str | Omit = omit, + event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] | Omit = omit, + page_size: int | Omit = omit, + scope: Literal["PROGRAM", "ACCOUNT", "BUSINESS_ACCOUNT", "CARD", "ANY"] | Omit = omit, + starting_after: 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[V2ListResponse, AsyncCursorPage[V2ListResponse]]: """ Lists V2 Auth rules @@ -1517,7 +1564,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, ) -> None: """ Deletes a V2 Auth rule @@ -1547,14 +1594,14 @@ async def apply( self, auth_rule_token: str, *, - account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - business_account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + account_tokens: SequenceNotStr[str] | Omit = omit, + business_account_tokens: 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, ) -> V2ApplyResponse: """ Associates a V2 Auth rule with a card program, the provided account(s) or @@ -1589,7 +1636,7 @@ async def apply( 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, ) -> V2ApplyResponse: """ Associates a V2 Auth rule with a card program, the provided account(s) or @@ -1617,13 +1664,13 @@ async def apply( auth_rule_token: str, *, program_level: bool, - excluded_card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + excluded_card_tokens: 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, ) -> V2ApplyResponse: """ Associates a V2 Auth rule with a card program, the provided account(s) or @@ -1651,17 +1698,17 @@ async def apply( self, auth_rule_token: str, *, - account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - business_account_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - program_level: bool | NotGiven = NOT_GIVEN, - excluded_card_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + account_tokens: SequenceNotStr[str] | Omit = omit, + business_account_tokens: SequenceNotStr[str] | Omit = omit, + card_tokens: SequenceNotStr[str] | Omit = omit, + program_level: bool | Omit = omit, + excluded_card_tokens: 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, ) -> V2ApplyResponse: if not auth_rule_token: raise ValueError(f"Expected a non-empty value for `auth_rule_token` but received {auth_rule_token!r}") @@ -1687,13 +1734,13 @@ async def draft( self, auth_rule_token: str, *, - parameters: Optional[v2_draft_params.Parameters] | NotGiven = NOT_GIVEN, + parameters: Optional[v2_draft_params.Parameters] | 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, ) -> V2DraftResponse: """ Creates a new draft version of a rule that will be ran in shadow mode. @@ -1732,7 +1779,7 @@ async def promote( 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, ) -> V2PromoteResponse: """ Promotes the draft version of an Auth rule to the currently active version such @@ -1767,7 +1814,7 @@ async def report( 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, ) -> V2ReportResponse: """This endpoint is deprecated and will be removed in the future. @@ -1842,6 +1889,59 @@ async def report( cast_to=V2ReportResponse, ) + async def retrieve_features( + self, + auth_rule_token: str, + *, + account_token: str | Omit = omit, + card_token: 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, + ) -> V2RetrieveFeaturesResponse: + """ + Fetches the current calculated Feature values for the given Auth Rule + + This only calculates the features for the active version. + + - VelocityLimit Rules calculates the current Velocity Feature data. This + requires a `card_token` or `account_token` matching what the rule is Scoped + to. + - ConditionalBlock Rules calculates the CARD*TRANSACTION_COUNT*\\** attributes on + the rule. This requires a `card_token` + + Args: + 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 + """ + if not auth_rule_token: + raise ValueError(f"Expected a non-empty value for `auth_rule_token` but received {auth_rule_token!r}") + return await self._get( + f"/v2/auth_rules/{auth_rule_token}/features", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "account_token": account_token, + "card_token": card_token, + }, + v2_retrieve_features_params.V2RetrieveFeaturesParams, + ), + ), + cast_to=V2RetrieveFeaturesResponse, + ) + async def retrieve_report( self, auth_rule_token: str, @@ -1853,7 +1953,7 @@ async def retrieve_report( 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, ) -> V2RetrieveReportResponse: """ Retrieves a performance report for an Auth rule containing daily statistics and @@ -1939,6 +2039,9 @@ def __init__(self, v2: V2) -> None: v2.report, # pyright: ignore[reportDeprecated], ) ) + self.retrieve_features = _legacy_response.to_raw_response_wrapper( + v2.retrieve_features, + ) self.retrieve_report = _legacy_response.to_raw_response_wrapper( v2.retrieve_report, ) @@ -1983,6 +2086,9 @@ def __init__(self, v2: AsyncV2) -> None: v2.report, # pyright: ignore[reportDeprecated], ) ) + self.retrieve_features = _legacy_response.async_to_raw_response_wrapper( + v2.retrieve_features, + ) self.retrieve_report = _legacy_response.async_to_raw_response_wrapper( v2.retrieve_report, ) @@ -2027,6 +2133,9 @@ def __init__(self, v2: V2) -> None: v2.report, # pyright: ignore[reportDeprecated], ) ) + self.retrieve_features = to_streamed_response_wrapper( + v2.retrieve_features, + ) self.retrieve_report = to_streamed_response_wrapper( v2.retrieve_report, ) @@ -2071,6 +2180,9 @@ def __init__(self, v2: AsyncV2) -> None: v2.report, # pyright: ignore[reportDeprecated], ) ) + self.retrieve_features = async_to_streamed_response_wrapper( + v2.retrieve_features, + ) self.retrieve_report = async_to_streamed_response_wrapper( v2.retrieve_report, ) diff --git a/src/lithic/resources/auth_stream_enrollment.py b/src/lithic/resources/auth_stream_enrollment.py index 330f8640..a35d6680 100644 --- a/src/lithic/resources/auth_stream_enrollment.py +++ b/src/lithic/resources/auth_stream_enrollment.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from .._types import Body, Query, Headers, NoneType, 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 @@ -43,7 +43,7 @@ def retrieve_secret( 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, ) -> AuthStreamSecret: """Retrieve the ASA HMAC secret key. @@ -70,7 +70,7 @@ def rotate_secret( 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, ) -> None: """Generate a new ASA HMAC secret key. @@ -116,7 +116,7 @@ async def retrieve_secret( 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, ) -> AuthStreamSecret: """Retrieve the ASA HMAC secret key. @@ -143,7 +143,7 @@ async def rotate_secret( 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, ) -> None: """Generate a new ASA HMAC secret key. diff --git a/src/lithic/resources/balances.py b/src/lithic/resources/balances.py index 0fc26483..b1a74b82 100644 --- a/src/lithic/resources/balances.py +++ b/src/lithic/resources/balances.py @@ -10,7 +10,7 @@ from .. import _legacy_response from ..types import balance_list_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 from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -45,16 +45,16 @@ def with_streaming_response(self) -> BalancesWithStreamingResponse: def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - balance_date: Union[str, datetime] | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + balance_date: Union[str, datetime] | Omit = omit, + business_account_token: str | Omit = omit, + financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | 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[Balance]: """ Get the balances for a program, business, or a given end-user account @@ -122,16 +122,16 @@ def with_streaming_response(self) -> AsyncBalancesWithStreamingResponse: def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - balance_date: Union[str, datetime] | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + balance_date: Union[str, datetime] | Omit = omit, + business_account_token: str | Omit = omit, + financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | 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[Balance, AsyncSinglePage[Balance]]: """ Get the balances for a program, business, or a given end-user account diff --git a/src/lithic/resources/book_transfers.py b/src/lithic/resources/book_transfers.py index b9dd9fa7..db2beb05 100644 --- a/src/lithic/resources/book_transfers.py +++ b/src/lithic/resources/book_transfers.py @@ -10,7 +10,7 @@ from .. import _legacy_response from ..types import book_transfer_list_params, book_transfer_create_params, book_transfer_reverse_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 @@ -86,16 +86,16 @@ def create( "TRANSFER", "COLLECTION", ], - token: str | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - on_closed_account: Literal["FAIL", "USE_SUSPENSE"] | NotGiven = NOT_GIVEN, + token: str | Omit = omit, + external_id: str | Omit = omit, + memo: str | Omit = omit, + on_closed_account: Literal["FAIL", "USE_SUSPENSE"] | 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, ) -> BookTransferResponse: """ Book transfer funds between two financial accounts or between a financial @@ -166,7 +166,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, ) -> BookTransferResponse: """ Get book transfer by token @@ -195,24 +195,24 @@ def retrieve( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + begin: Union[str, datetime] | Omit = omit, + business_account_token: str | Omit = omit, category: Literal["BALANCE_OR_FUNDING", "FEE", "REWARD", "ADJUSTMENT", "DERECOGNITION", "DISPUTE", "INTERNAL"] - | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - financial_account_token: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["DECLINED", "SETTLED"] | NotGiven = NOT_GIVEN, + | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + financial_account_token: str | Omit = omit, + page_size: int | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["DECLINED", "SETTLED"] | 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, ) -> SyncCursorPage[BookTransferResponse]: """List book transfers @@ -282,13 +282,13 @@ def reverse( self, book_transfer_token: str, *, - memo: str | NotGiven = NOT_GIVEN, + memo: 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, ) -> BookTransferResponse: """ Reverse a book transfer @@ -382,16 +382,16 @@ async def create( "TRANSFER", "COLLECTION", ], - token: str | NotGiven = NOT_GIVEN, - external_id: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - on_closed_account: Literal["FAIL", "USE_SUSPENSE"] | NotGiven = NOT_GIVEN, + token: str | Omit = omit, + external_id: str | Omit = omit, + memo: str | Omit = omit, + on_closed_account: Literal["FAIL", "USE_SUSPENSE"] | 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, ) -> BookTransferResponse: """ Book transfer funds between two financial accounts or between a financial @@ -462,7 +462,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, ) -> BookTransferResponse: """ Get book transfer by token @@ -491,24 +491,24 @@ async def retrieve( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + begin: Union[str, datetime] | Omit = omit, + business_account_token: str | Omit = omit, category: Literal["BALANCE_OR_FUNDING", "FEE", "REWARD", "ADJUSTMENT", "DERECOGNITION", "DISPUTE", "INTERNAL"] - | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - financial_account_token: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["DECLINED", "SETTLED"] | NotGiven = NOT_GIVEN, + | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + financial_account_token: str | Omit = omit, + page_size: int | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["DECLINED", "SETTLED"] | 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[BookTransferResponse, AsyncCursorPage[BookTransferResponse]]: """List book transfers @@ -578,13 +578,13 @@ async def reverse( self, book_transfer_token: str, *, - memo: str | NotGiven = NOT_GIVEN, + memo: 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, ) -> BookTransferResponse: """ Reverse a book transfer diff --git a/src/lithic/resources/card_programs.py b/src/lithic/resources/card_programs.py index 46a28ad7..8a9728d6 100644 --- a/src/lithic/resources/card_programs.py +++ b/src/lithic/resources/card_programs.py @@ -6,7 +6,7 @@ from .. import _legacy_response from ..types import card_program_list_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 from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -47,7 +47,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, ) -> CardProgram: """ Get card program. @@ -74,15 +74,15 @@ def retrieve( def list( self, *, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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, ) -> SyncCursorPage[CardProgram]: """ List card programs. @@ -154,7 +154,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, ) -> CardProgram: """ Get card program. @@ -181,15 +181,15 @@ async def retrieve( def list( self, *, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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[CardProgram, AsyncCursorPage[CardProgram]]: """ List card programs. diff --git a/src/lithic/resources/cards/aggregate_balances.py b/src/lithic/resources/cards/aggregate_balances.py index 07db0ecc..97db711d 100644 --- a/src/lithic/resources/cards/aggregate_balances.py +++ b/src/lithic/resources/cards/aggregate_balances.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 from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -41,14 +41,14 @@ def with_streaming_response(self) -> AggregateBalancesWithStreamingResponse: def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + business_account_token: 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[AggregateBalanceListResponse]: """ Get the aggregated card balance across all end-user accounts. @@ -109,14 +109,14 @@ def with_streaming_response(self) -> AsyncAggregateBalancesWithStreamingResponse def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + business_account_token: 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[AggregateBalanceListResponse, AsyncSinglePage[AggregateBalanceListResponse]]: """ Get the aggregated card balance across all end-user accounts. diff --git a/src/lithic/resources/cards/balances.py b/src/lithic/resources/cards/balances.py index 35fa6ff7..f27b1805 100644 --- a/src/lithic/resources/cards/balances.py +++ b/src/lithic/resources/cards/balances.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 from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -45,14 +45,14 @@ def list( self, card_token: str, *, - balance_date: Union[str, datetime] | NotGiven = NOT_GIVEN, - last_transaction_event_token: str | NotGiven = NOT_GIVEN, + balance_date: Union[str, datetime] | Omit = omit, + last_transaction_event_token: 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[BalanceListResponse]: """ Get the balances for a given card. @@ -118,14 +118,14 @@ def list( self, card_token: str, *, - balance_date: Union[str, datetime] | NotGiven = NOT_GIVEN, - last_transaction_event_token: str | NotGiven = NOT_GIVEN, + balance_date: Union[str, datetime] | Omit = omit, + last_transaction_event_token: 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[BalanceListResponse, AsyncSinglePage[BalanceListResponse]]: """ Get the balances for a given card. diff --git a/src/lithic/resources/cards/cards.py b/src/lithic/resources/cards/cards.py index 2c2714d0..645fccad 100644 --- a/src/lithic/resources/cards/cards.py +++ b/src/lithic/resources/cards/cards.py @@ -28,7 +28,7 @@ card_web_provision_params, card_convert_physical_params, ) -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, Base64FileInput +from ..._types import NOT_GIVEN, Body, Omit, Query, Headers, NotGiven, Base64FileInput, omit, not_given from ..._utils import maybe_transform, strip_not_given, async_maybe_transform from .balances import ( Balances, @@ -107,18 +107,18 @@ def create( self, *, type: Literal["MERCHANT_LOCKED", "PHYSICAL", "SINGLE_USE", "VIRTUAL", "UNLOCKED", "DIGITAL_WALLET"], - account_token: str | NotGiven = NOT_GIVEN, - card_program_token: str | NotGiven = NOT_GIVEN, - carrier: Carrier | NotGiven = NOT_GIVEN, - digital_card_art_token: str | NotGiven = NOT_GIVEN, - exp_month: str | NotGiven = NOT_GIVEN, - exp_year: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - pin: str | NotGiven = NOT_GIVEN, - product_id: str | NotGiven = NOT_GIVEN, - replacement_account_token: str | NotGiven = NOT_GIVEN, - replacement_comment: str | NotGiven = NOT_GIVEN, - replacement_for: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + card_program_token: str | Omit = omit, + carrier: Carrier | Omit = omit, + digital_card_art_token: str | Omit = omit, + exp_month: str | Omit = omit, + exp_year: str | Omit = omit, + memo: str | Omit = omit, + pin: str | Omit = omit, + product_id: str | Omit = omit, + replacement_account_token: str | Omit = omit, + replacement_comment: str | Omit = omit, + replacement_for: str | Omit = omit, replacement_substatus: Literal[ "LOST", "COMPROMISED", @@ -132,19 +132,19 @@ def create( "UNDELIVERABLE", "OTHER", ] - | NotGiven = NOT_GIVEN, - shipping_address: ShippingAddress | NotGiven = NOT_GIVEN, + | Omit = omit, + shipping_address: ShippingAddress | Omit = omit, shipping_method: Literal["2_DAY", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"] - | NotGiven = NOT_GIVEN, - spend_limit: int | NotGiven = NOT_GIVEN, - spend_limit_duration: SpendLimitDuration | NotGiven = NOT_GIVEN, - state: Literal["OPEN", "PAUSED"] | NotGiven = NOT_GIVEN, + | Omit = omit, + spend_limit: int | Omit = omit, + spend_limit_duration: SpendLimitDuration | Omit = omit, + state: Literal["OPEN", "PAUSED"] | 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, ) -> Card: """Create a new virtual or physical card. @@ -337,7 +337,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, ) -> Card: """ Get card configuration such as spend limit and state. @@ -365,15 +365,15 @@ def update( self, card_token: str, *, - comment: str | NotGiven = NOT_GIVEN, - digital_card_art_token: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - network_program_token: str | NotGiven = NOT_GIVEN, - pin: str | NotGiven = NOT_GIVEN, - pin_status: Literal["OK"] | NotGiven = NOT_GIVEN, - spend_limit: int | NotGiven = NOT_GIVEN, - spend_limit_duration: SpendLimitDuration | NotGiven = NOT_GIVEN, - state: Literal["CLOSED", "OPEN", "PAUSED"] | NotGiven = NOT_GIVEN, + comment: str | Omit = omit, + digital_card_art_token: str | Omit = omit, + memo: str | Omit = omit, + network_program_token: str | Omit = omit, + pin: str | Omit = omit, + pin_status: Literal["OK"] | Omit = omit, + spend_limit: int | Omit = omit, + spend_limit_duration: SpendLimitDuration | Omit = omit, + state: Literal["CLOSED", "OPEN", "PAUSED"] | Omit = omit, substatus: Literal[ "LOST", "COMPROMISED", @@ -387,13 +387,13 @@ def update( "UNDELIVERABLE", "OTHER", ] - | NotGiven = NOT_GIVEN, + | 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, ) -> Card: """Update the specified properties of the card. @@ -518,20 +518,20 @@ def update( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - state: Literal["CLOSED", "OPEN", "PAUSED", "PENDING_ACTIVATION", "PENDING_FULFILLMENT"] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + memo: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + state: Literal["CLOSED", "OPEN", "PAUSED", "PENDING_ACTIVATION", "PENDING_FULFILLMENT"] | 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, ) -> SyncCursorPage[NonPCICard]: """ List cards. @@ -595,16 +595,16 @@ def convert_physical( card_token: str, *, shipping_address: ShippingAddress, - carrier: Carrier | NotGiven = NOT_GIVEN, - product_id: str | NotGiven = NOT_GIVEN, + carrier: Carrier | Omit = omit, + product_id: str | Omit = omit, shipping_method: Literal["2_DAY", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"] - | NotGiven = NOT_GIVEN, + | 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, ) -> Card: """Convert a virtual card into a physical card and manufacture it. @@ -680,7 +680,7 @@ def embed( 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, ) -> str: """ Handling full card PANs and CVV codes requires that you comply with the Payment @@ -747,9 +747,9 @@ def get_embed_html( self, *, token: str, - css: str | NotGiven = NOT_GIVEN, - expiration: Union[str, datetime] | NotGiven = NOT_GIVEN, - target_origin: str | NotGiven = NOT_GIVEN, + css: str | Omit = omit, + expiration: Union[str, datetime] | Omit = omit, + target_origin: 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, @@ -790,9 +790,9 @@ def get_embed_url( self, *, token: str, - css: str | NotGiven = NOT_GIVEN, - expiration: Union[str, datetime] | NotGiven = NOT_GIVEN, - target_origin: str | NotGiven = NOT_GIVEN, + css: str | Omit = omit, + expiration: Union[str, datetime] | Omit = omit, + target_origin: str | Omit = omit, ) -> URL: """ Handling full card PANs and CVV codes requires that you comply with the Payment @@ -858,18 +858,18 @@ def provision( self, card_token: str, *, - certificate: Union[str, Base64FileInput] | NotGiven = NOT_GIVEN, - client_device_id: str | NotGiven = NOT_GIVEN, - client_wallet_account_id: str | NotGiven = NOT_GIVEN, - digital_wallet: Literal["APPLE_PAY", "GOOGLE_PAY", "SAMSUNG_PAY"] | NotGiven = NOT_GIVEN, - nonce: Union[str, Base64FileInput] | NotGiven = NOT_GIVEN, - nonce_signature: Union[str, Base64FileInput] | NotGiven = NOT_GIVEN, + certificate: Union[str, Base64FileInput] | Omit = omit, + client_device_id: str | Omit = omit, + client_wallet_account_id: str | Omit = omit, + digital_wallet: Literal["APPLE_PAY", "GOOGLE_PAY", "SAMSUNG_PAY"] | Omit = omit, + nonce: Union[str, Base64FileInput] | Omit = omit, + nonce_signature: Union[str, Base64FileInput] | 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, ) -> CardProvisionResponse: """ Allow your cardholders to directly add payment cards to the device's digital @@ -936,17 +936,17 @@ def reissue( self, card_token: str, *, - carrier: Carrier | NotGiven = NOT_GIVEN, - product_id: str | NotGiven = NOT_GIVEN, - shipping_address: ShippingAddress | NotGiven = NOT_GIVEN, + carrier: Carrier | Omit = omit, + product_id: str | Omit = omit, + shipping_address: ShippingAddress | Omit = omit, shipping_method: Literal["2_DAY", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"] - | NotGiven = NOT_GIVEN, + | 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, ) -> Card: """Initiate print and shipment of a duplicate physical card (e.g. @@ -1012,18 +1012,18 @@ def renew( card_token: str, *, shipping_address: ShippingAddress, - carrier: Carrier | NotGiven = NOT_GIVEN, - exp_month: str | NotGiven = NOT_GIVEN, - exp_year: str | NotGiven = NOT_GIVEN, - product_id: str | NotGiven = NOT_GIVEN, + carrier: Carrier | Omit = omit, + exp_month: str | Omit = omit, + exp_year: str | Omit = omit, + product_id: str | Omit = omit, shipping_method: Literal["2_DAY", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"] - | NotGiven = NOT_GIVEN, + | 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, ) -> Card: """Applies to card types `PHYSICAL` and `VIRTUAL`. @@ -1105,7 +1105,7 @@ def retrieve_spend_limits( 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, ) -> CardSpendLimits: """ Get a Card's available spend limit, which is based on the spend limit configured @@ -1141,7 +1141,7 @@ def search_by_pan( 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, ) -> Card: """Get card configuration such as spend limit and state. @@ -1175,13 +1175,13 @@ def web_provision( self, card_token: str, *, - digital_wallet: Literal["APPLE_PAY"] | NotGiven = NOT_GIVEN, + digital_wallet: Literal["APPLE_PAY"] | 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, ) -> CardWebProvisionResponse: """ Allow your cardholders to directly add payment cards to the device's digital @@ -1250,18 +1250,18 @@ async def create( self, *, type: Literal["MERCHANT_LOCKED", "PHYSICAL", "SINGLE_USE", "VIRTUAL", "UNLOCKED", "DIGITAL_WALLET"], - account_token: str | NotGiven = NOT_GIVEN, - card_program_token: str | NotGiven = NOT_GIVEN, - carrier: Carrier | NotGiven = NOT_GIVEN, - digital_card_art_token: str | NotGiven = NOT_GIVEN, - exp_month: str | NotGiven = NOT_GIVEN, - exp_year: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - pin: str | NotGiven = NOT_GIVEN, - product_id: str | NotGiven = NOT_GIVEN, - replacement_account_token: str | NotGiven = NOT_GIVEN, - replacement_comment: str | NotGiven = NOT_GIVEN, - replacement_for: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + card_program_token: str | Omit = omit, + carrier: Carrier | Omit = omit, + digital_card_art_token: str | Omit = omit, + exp_month: str | Omit = omit, + exp_year: str | Omit = omit, + memo: str | Omit = omit, + pin: str | Omit = omit, + product_id: str | Omit = omit, + replacement_account_token: str | Omit = omit, + replacement_comment: str | Omit = omit, + replacement_for: str | Omit = omit, replacement_substatus: Literal[ "LOST", "COMPROMISED", @@ -1275,19 +1275,19 @@ async def create( "UNDELIVERABLE", "OTHER", ] - | NotGiven = NOT_GIVEN, - shipping_address: ShippingAddress | NotGiven = NOT_GIVEN, + | Omit = omit, + shipping_address: ShippingAddress | Omit = omit, shipping_method: Literal["2_DAY", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"] - | NotGiven = NOT_GIVEN, - spend_limit: int | NotGiven = NOT_GIVEN, - spend_limit_duration: SpendLimitDuration | NotGiven = NOT_GIVEN, - state: Literal["OPEN", "PAUSED"] | NotGiven = NOT_GIVEN, + | Omit = omit, + spend_limit: int | Omit = omit, + spend_limit_duration: SpendLimitDuration | Omit = omit, + state: Literal["OPEN", "PAUSED"] | 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, ) -> Card: """Create a new virtual or physical card. @@ -1480,7 +1480,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, ) -> Card: """ Get card configuration such as spend limit and state. @@ -1508,15 +1508,15 @@ async def update( self, card_token: str, *, - comment: str | NotGiven = NOT_GIVEN, - digital_card_art_token: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - network_program_token: str | NotGiven = NOT_GIVEN, - pin: str | NotGiven = NOT_GIVEN, - pin_status: Literal["OK"] | NotGiven = NOT_GIVEN, - spend_limit: int | NotGiven = NOT_GIVEN, - spend_limit_duration: SpendLimitDuration | NotGiven = NOT_GIVEN, - state: Literal["CLOSED", "OPEN", "PAUSED"] | NotGiven = NOT_GIVEN, + comment: str | Omit = omit, + digital_card_art_token: str | Omit = omit, + memo: str | Omit = omit, + network_program_token: str | Omit = omit, + pin: str | Omit = omit, + pin_status: Literal["OK"] | Omit = omit, + spend_limit: int | Omit = omit, + spend_limit_duration: SpendLimitDuration | Omit = omit, + state: Literal["CLOSED", "OPEN", "PAUSED"] | Omit = omit, substatus: Literal[ "LOST", "COMPROMISED", @@ -1530,13 +1530,13 @@ async def update( "UNDELIVERABLE", "OTHER", ] - | NotGiven = NOT_GIVEN, + | 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, ) -> Card: """Update the specified properties of the card. @@ -1661,20 +1661,20 @@ async def update( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - state: Literal["CLOSED", "OPEN", "PAUSED", "PENDING_ACTIVATION", "PENDING_FULFILLMENT"] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + memo: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + state: Literal["CLOSED", "OPEN", "PAUSED", "PENDING_ACTIVATION", "PENDING_FULFILLMENT"] | 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[NonPCICard, AsyncCursorPage[NonPCICard]]: """ List cards. @@ -1738,16 +1738,16 @@ async def convert_physical( card_token: str, *, shipping_address: ShippingAddress, - carrier: Carrier | NotGiven = NOT_GIVEN, - product_id: str | NotGiven = NOT_GIVEN, + carrier: Carrier | Omit = omit, + product_id: str | Omit = omit, shipping_method: Literal["2_DAY", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"] - | NotGiven = NOT_GIVEN, + | 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, ) -> Card: """Convert a virtual card into a physical card and manufacture it. @@ -1823,7 +1823,7 @@ async def embed( 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, ) -> str: """ Handling full card PANs and CVV codes requires that you comply with the Payment @@ -1890,9 +1890,9 @@ async def get_embed_html( self, *, token: str, - css: str | NotGiven = NOT_GIVEN, - expiration: Union[str, datetime] | NotGiven = NOT_GIVEN, - target_origin: str | NotGiven = NOT_GIVEN, + css: str | Omit = omit, + expiration: Union[str, datetime] | Omit = omit, + target_origin: 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, @@ -1933,9 +1933,9 @@ def get_embed_url( self, *, token: str, - css: str | NotGiven = NOT_GIVEN, - expiration: Union[str, datetime] | NotGiven = NOT_GIVEN, - target_origin: str | NotGiven = NOT_GIVEN, + css: str | Omit = omit, + expiration: Union[str, datetime] | Omit = omit, + target_origin: str | Omit = omit, ) -> URL: """ Handling full card PANs and CVV codes requires that you comply with the Payment @@ -2001,18 +2001,18 @@ async def provision( self, card_token: str, *, - certificate: Union[str, Base64FileInput] | NotGiven = NOT_GIVEN, - client_device_id: str | NotGiven = NOT_GIVEN, - client_wallet_account_id: str | NotGiven = NOT_GIVEN, - digital_wallet: Literal["APPLE_PAY", "GOOGLE_PAY", "SAMSUNG_PAY"] | NotGiven = NOT_GIVEN, - nonce: Union[str, Base64FileInput] | NotGiven = NOT_GIVEN, - nonce_signature: Union[str, Base64FileInput] | NotGiven = NOT_GIVEN, + certificate: Union[str, Base64FileInput] | Omit = omit, + client_device_id: str | Omit = omit, + client_wallet_account_id: str | Omit = omit, + digital_wallet: Literal["APPLE_PAY", "GOOGLE_PAY", "SAMSUNG_PAY"] | Omit = omit, + nonce: Union[str, Base64FileInput] | Omit = omit, + nonce_signature: Union[str, Base64FileInput] | 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, ) -> CardProvisionResponse: """ Allow your cardholders to directly add payment cards to the device's digital @@ -2079,17 +2079,17 @@ async def reissue( self, card_token: str, *, - carrier: Carrier | NotGiven = NOT_GIVEN, - product_id: str | NotGiven = NOT_GIVEN, - shipping_address: ShippingAddress | NotGiven = NOT_GIVEN, + carrier: Carrier | Omit = omit, + product_id: str | Omit = omit, + shipping_address: ShippingAddress | Omit = omit, shipping_method: Literal["2_DAY", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"] - | NotGiven = NOT_GIVEN, + | 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, ) -> Card: """Initiate print and shipment of a duplicate physical card (e.g. @@ -2155,18 +2155,18 @@ async def renew( card_token: str, *, shipping_address: ShippingAddress, - carrier: Carrier | NotGiven = NOT_GIVEN, - exp_month: str | NotGiven = NOT_GIVEN, - exp_year: str | NotGiven = NOT_GIVEN, - product_id: str | NotGiven = NOT_GIVEN, + carrier: Carrier | Omit = omit, + exp_month: str | Omit = omit, + exp_year: str | Omit = omit, + product_id: str | Omit = omit, shipping_method: Literal["2_DAY", "EXPEDITED", "EXPRESS", "PRIORITY", "STANDARD", "STANDARD_WITH_TRACKING"] - | NotGiven = NOT_GIVEN, + | 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, ) -> Card: """Applies to card types `PHYSICAL` and `VIRTUAL`. @@ -2248,7 +2248,7 @@ async def retrieve_spend_limits( 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, ) -> CardSpendLimits: """ Get a Card's available spend limit, which is based on the spend limit configured @@ -2284,7 +2284,7 @@ async def search_by_pan( 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, ) -> Card: """Get card configuration such as spend limit and state. @@ -2318,13 +2318,13 @@ async def web_provision( self, card_token: str, *, - digital_wallet: Literal["APPLE_PAY"] | NotGiven = NOT_GIVEN, + digital_wallet: Literal["APPLE_PAY"] | 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, ) -> CardWebProvisionResponse: """ Allow your cardholders to directly add payment cards to the device's digital diff --git a/src/lithic/resources/cards/financial_transactions.py b/src/lithic/resources/cards/financial_transactions.py index be6d106b..bc97969b 100644 --- a/src/lithic/resources/cards/financial_transactions.py +++ b/src/lithic/resources/cards/financial_transactions.py @@ -9,7 +9,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 @@ -52,7 +52,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, ) -> FinancialTransaction: """ Get the card financial transaction for the provided token. @@ -84,19 +84,19 @@ def list( self, card_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - category: Literal["CARD", "TRANSFER"] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["DECLINED", "EXPIRED", "PENDING", "RETURNED", "SETTLED", "VOIDED"] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + category: Literal["CARD", "TRANSFER"] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["DECLINED", "EXPIRED", "PENDING", "RETURNED", "SETTLED", "VOIDED"] | 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[FinancialTransaction]: """ List the financial transactions for a given card. @@ -185,7 +185,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, ) -> FinancialTransaction: """ Get the card financial transaction for the provided token. @@ -217,19 +217,19 @@ def list( self, card_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - category: Literal["CARD", "TRANSFER"] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["DECLINED", "EXPIRED", "PENDING", "RETURNED", "SETTLED", "VOIDED"] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + category: Literal["CARD", "TRANSFER"] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["DECLINED", "EXPIRED", "PENDING", "RETURNED", "SETTLED", "VOIDED"] | 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[FinancialTransaction, AsyncSinglePage[FinancialTransaction]]: """ List the financial transactions for a given card. diff --git a/src/lithic/resources/credit_products/extended_credit.py b/src/lithic/resources/credit_products/extended_credit.py index 82f709d2..7b006763 100644 --- a/src/lithic/resources/credit_products/extended_credit.py +++ b/src/lithic/resources/credit_products/extended_credit.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 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, ) -> ExtendedCredit: """ Get the extended credit for a given credit product under a program @@ -100,7 +100,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, ) -> ExtendedCredit: """ Get the extended credit for a given credit product under a program diff --git a/src/lithic/resources/credit_products/prime_rates.py b/src/lithic/resources/credit_products/prime_rates.py index 15e52f63..8c256481 100644 --- a/src/lithic/resources/credit_products/prime_rates.py +++ b/src/lithic/resources/credit_products/prime_rates.py @@ -8,7 +8,7 @@ import httpx from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ..._utils import 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, ) -> None: """ Post Credit Product Prime Rate @@ -94,14 +94,14 @@ def retrieve( self, credit_product_token: str, *, - ending_before: Union[str, date] | NotGiven = NOT_GIVEN, - starting_after: Union[str, date] | NotGiven = NOT_GIVEN, + ending_before: Union[str, date] | Omit = omit, + starting_after: 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, ) -> PrimeRateRetrieveResponse: """ Get Credit Product Prime Rates @@ -175,7 +175,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, ) -> None: """ Post Credit Product Prime Rate @@ -218,14 +218,14 @@ async def retrieve( self, credit_product_token: str, *, - ending_before: Union[str, date] | NotGiven = NOT_GIVEN, - starting_after: Union[str, date] | NotGiven = NOT_GIVEN, + ending_before: Union[str, date] | Omit = omit, + starting_after: 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, ) -> PrimeRateRetrieveResponse: """ Get Credit Product Prime Rates diff --git a/src/lithic/resources/digital_card_art.py b/src/lithic/resources/digital_card_art.py index 2b6217ac..e42ac01b 100644 --- a/src/lithic/resources/digital_card_art.py +++ b/src/lithic/resources/digital_card_art.py @@ -6,7 +6,7 @@ from .. import _legacy_response from ..types import digital_card_art_list_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 from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -47,7 +47,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, ) -> DigitalCardArt: """ Get digital card art by token. @@ -76,15 +76,15 @@ def retrieve( def list( self, *, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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, ) -> SyncCursorPage[DigitalCardArt]: """ List digital card art. @@ -156,7 +156,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, ) -> DigitalCardArt: """ Get digital card art by token. @@ -185,15 +185,15 @@ async def retrieve( def list( self, *, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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[DigitalCardArt, AsyncCursorPage[DigitalCardArt]]: """ List digital card art. diff --git a/src/lithic/resources/disputes.py b/src/lithic/resources/disputes.py index 1e8cec5e..a6a50705 100644 --- a/src/lithic/resources/disputes.py +++ b/src/lithic/resources/disputes.py @@ -16,7 +16,7 @@ dispute_list_evidences_params, dispute_initiate_evidence_upload_params, ) -from .._types import NOT_GIVEN, Body, Omit, Query, Headers, NoneType, NotGiven, FileTypes, SequenceNotStr +from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, FileTypes, SequenceNotStr, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -70,14 +70,14 @@ def create( "REFUND_NOT_PROCESSED", ], transaction_token: str, - customer_filed_date: Union[str, datetime] | NotGiven = NOT_GIVEN, - customer_note: str | NotGiven = NOT_GIVEN, + customer_filed_date: Union[str, datetime] | Omit = omit, + customer_note: 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, ) -> Dispute: """ Initiate a dispute. @@ -128,7 +128,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, ) -> Dispute: """ Get dispute. @@ -156,9 +156,9 @@ def update( self, dispute_token: str, *, - amount: int | NotGiven = NOT_GIVEN, - customer_filed_date: Union[str, datetime] | NotGiven = NOT_GIVEN, - customer_note: str | NotGiven = NOT_GIVEN, + amount: int | Omit = omit, + customer_filed_date: Union[str, datetime] | Omit = omit, + customer_note: str | Omit = omit, reason: Literal[ "ATM_CASH_MISDISPENSE", "CANCELLED", @@ -175,13 +175,13 @@ def update( "RECURRING_TRANSACTION_NOT_CANCELLED", "REFUND_NOT_PROCESSED", ] - | NotGiven = NOT_GIVEN, + | 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, ) -> Dispute: """Update dispute. @@ -226,11 +226,11 @@ def update( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, status: Literal[ "ARBITRATION", "CASE_CLOSED", @@ -241,14 +241,14 @@ def list( "REPRESENTMENT", "SUBMITTED", ] - | NotGiven = NOT_GIVEN, - transaction_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + | Omit = omit, + transaction_tokens: 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, ) -> SyncCursorPage[Dispute]: """List disputes. @@ -314,7 +314,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, ) -> Dispute: """ Withdraw dispute. @@ -348,7 +348,7 @@ def delete_evidence( 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, ) -> DisputeEvidence: """Soft delete evidence for a dispute. @@ -380,13 +380,13 @@ def initiate_evidence_upload( self, dispute_token: str, *, - filename: str | NotGiven = NOT_GIVEN, + filename: 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, ) -> DisputeEvidence: """Use this endpoint to upload evidences for the dispute. @@ -424,17 +424,17 @@ def list_evidences( self, dispute_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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, ) -> SyncCursorPage[DisputeEvidence]: """ List evidence metadata for a dispute. @@ -496,7 +496,7 @@ def retrieve_evidence( 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, ) -> DisputeEvidence: """ Get a dispute's evidence metadata. @@ -586,14 +586,14 @@ async def create( "REFUND_NOT_PROCESSED", ], transaction_token: str, - customer_filed_date: Union[str, datetime] | NotGiven = NOT_GIVEN, - customer_note: str | NotGiven = NOT_GIVEN, + customer_filed_date: Union[str, datetime] | Omit = omit, + customer_note: 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, ) -> Dispute: """ Initiate a dispute. @@ -644,7 +644,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, ) -> Dispute: """ Get dispute. @@ -672,9 +672,9 @@ async def update( self, dispute_token: str, *, - amount: int | NotGiven = NOT_GIVEN, - customer_filed_date: Union[str, datetime] | NotGiven = NOT_GIVEN, - customer_note: str | NotGiven = NOT_GIVEN, + amount: int | Omit = omit, + customer_filed_date: Union[str, datetime] | Omit = omit, + customer_note: str | Omit = omit, reason: Literal[ "ATM_CASH_MISDISPENSE", "CANCELLED", @@ -691,13 +691,13 @@ async def update( "RECURRING_TRANSACTION_NOT_CANCELLED", "REFUND_NOT_PROCESSED", ] - | NotGiven = NOT_GIVEN, + | 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, ) -> Dispute: """Update dispute. @@ -742,11 +742,11 @@ async def update( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, status: Literal[ "ARBITRATION", "CASE_CLOSED", @@ -757,14 +757,14 @@ def list( "REPRESENTMENT", "SUBMITTED", ] - | NotGiven = NOT_GIVEN, - transaction_tokens: SequenceNotStr[str] | NotGiven = NOT_GIVEN, + | Omit = omit, + transaction_tokens: 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[Dispute, AsyncCursorPage[Dispute]]: """List disputes. @@ -830,7 +830,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, ) -> Dispute: """ Withdraw dispute. @@ -864,7 +864,7 @@ async def delete_evidence( 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, ) -> DisputeEvidence: """Soft delete evidence for a dispute. @@ -896,13 +896,13 @@ async def initiate_evidence_upload( self, dispute_token: str, *, - filename: str | NotGiven = NOT_GIVEN, + filename: 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, ) -> DisputeEvidence: """Use this endpoint to upload evidences for the dispute. @@ -940,17 +940,17 @@ def list_evidences( self, dispute_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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[DisputeEvidence, AsyncCursorPage[DisputeEvidence]]: """ List evidence metadata for a dispute. @@ -1012,7 +1012,7 @@ async def retrieve_evidence( 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, ) -> DisputeEvidence: """ Get a dispute's evidence metadata. diff --git a/src/lithic/resources/events/event_subscriptions.py b/src/lithic/resources/events/event_subscriptions.py index 2644dd3f..de49709b 100644 --- a/src/lithic/resources/events/event_subscriptions.py +++ b/src/lithic/resources/events/event_subscriptions.py @@ -5,7 +5,7 @@ import httpx from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ..._types import Body, Query, Headers, NoneType, 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 resend( 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, ) -> None: """ Resend an event to an event subscription. @@ -103,7 +103,7 @@ async def resend( 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, ) -> None: """ Resend an event to an event subscription. diff --git a/src/lithic/resources/events/events.py b/src/lithic/resources/events/events.py index 9c3433f4..99fdbb51 100644 --- a/src/lithic/resources/events/events.py +++ b/src/lithic/resources/events/events.py @@ -10,7 +10,7 @@ from ... import _legacy_response from ...types import event_list_params, event_list_attempts_params -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ..._utils import maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -76,7 +76,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, ) -> Event: """ Get an event. @@ -103,9 +103,9 @@ def retrieve( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, event_types: List[ Literal[ "account_holder.created", @@ -157,16 +157,16 @@ def list( "tokenization.updated", ] ] - | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - with_content: bool | NotGiven = NOT_GIVEN, + | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + with_content: bool | 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, ) -> SyncCursorPage[Event]: """List all events. @@ -227,18 +227,18 @@ def list_attempts( self, event_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["FAILED", "PENDING", "SENDING", "SUCCESS"] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["FAILED", "PENDING", "SENDING", "SUCCESS"] | 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, ) -> SyncCursorPage[MessageAttempt]: """ List all the message attempts for a given event. @@ -345,7 +345,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, ) -> Event: """ Get an event. @@ -372,9 +372,9 @@ async def retrieve( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, event_types: List[ Literal[ "account_holder.created", @@ -426,16 +426,16 @@ def list( "tokenization.updated", ] ] - | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - with_content: bool | NotGiven = NOT_GIVEN, + | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + with_content: bool | 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[Event, AsyncCursorPage[Event]]: """List all events. @@ -496,18 +496,18 @@ def list_attempts( self, event_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["FAILED", "PENDING", "SENDING", "SUCCESS"] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["FAILED", "PENDING", "SENDING", "SUCCESS"] | 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[MessageAttempt, AsyncCursorPage[MessageAttempt]]: """ List all the message attempts for a given event. diff --git a/src/lithic/resources/events/subscriptions.py b/src/lithic/resources/events/subscriptions.py index 74f03478..cfe0fe4d 100644 --- a/src/lithic/resources/events/subscriptions.py +++ b/src/lithic/resources/events/subscriptions.py @@ -9,7 +9,7 @@ import httpx from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -56,8 +56,8 @@ def create( self, *, url: str, - description: str | NotGiven = NOT_GIVEN, - disabled: bool | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + disabled: bool | Omit = omit, event_types: List[ Literal[ "account_holder.created", @@ -109,13 +109,13 @@ def create( "tokenization.updated", ] ] - | NotGiven = NOT_GIVEN, + | 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, ) -> EventSubscription: """ Create a new event subscription. @@ -164,7 +164,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, ) -> EventSubscription: """ Get an event subscription. @@ -195,8 +195,8 @@ def update( event_subscription_token: str, *, url: str, - description: str | NotGiven = NOT_GIVEN, - disabled: bool | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + disabled: bool | Omit = omit, event_types: List[ Literal[ "account_holder.created", @@ -248,13 +248,13 @@ def update( "tokenization.updated", ] ] - | NotGiven = NOT_GIVEN, + | 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, ) -> EventSubscription: """ Update an event subscription. @@ -301,15 +301,15 @@ def update( def list( self, *, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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, ) -> SyncCursorPage[EventSubscription]: """ List all the event subscriptions. @@ -360,7 +360,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, ) -> None: """ Delete an event subscription. @@ -390,18 +390,18 @@ def list_attempts( self, event_subscription_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["FAILED", "PENDING", "SENDING", "SUCCESS"] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["FAILED", "PENDING", "SENDING", "SUCCESS"] | 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, ) -> SyncCursorPage[MessageAttempt]: """ List all the message attempts for a given event subscription. @@ -460,14 +460,14 @@ def recover( self, event_subscription_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | 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, ) -> None: """ Resend all failed messages since a given time. @@ -513,14 +513,14 @@ def replay_missing( self, event_subscription_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | 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, ) -> None: """Replays messages to the endpoint. @@ -576,7 +576,7 @@ def retrieve_secret( 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, ) -> SubscriptionRetrieveSecretResponse: """ Get the secret for an event subscription. @@ -611,7 +611,7 @@ def rotate_secret( 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, ) -> None: """Rotate the secret for an event subscription. @@ -692,13 +692,13 @@ def send_simulated_example( "tokenization.two_factor_authentication_code_sent", "tokenization.updated", ] - | NotGiven = NOT_GIVEN, + | 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, ) -> None: """ Send an example message for event. @@ -755,8 +755,8 @@ async def create( self, *, url: str, - description: str | NotGiven = NOT_GIVEN, - disabled: bool | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + disabled: bool | Omit = omit, event_types: List[ Literal[ "account_holder.created", @@ -808,13 +808,13 @@ async def create( "tokenization.updated", ] ] - | NotGiven = NOT_GIVEN, + | 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, ) -> EventSubscription: """ Create a new event subscription. @@ -863,7 +863,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, ) -> EventSubscription: """ Get an event subscription. @@ -894,8 +894,8 @@ async def update( event_subscription_token: str, *, url: str, - description: str | NotGiven = NOT_GIVEN, - disabled: bool | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + disabled: bool | Omit = omit, event_types: List[ Literal[ "account_holder.created", @@ -947,13 +947,13 @@ async def update( "tokenization.updated", ] ] - | NotGiven = NOT_GIVEN, + | 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, ) -> EventSubscription: """ Update an event subscription. @@ -1000,15 +1000,15 @@ async def update( def list( self, *, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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[EventSubscription, AsyncCursorPage[EventSubscription]]: """ List all the event subscriptions. @@ -1059,7 +1059,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, ) -> None: """ Delete an event subscription. @@ -1089,18 +1089,18 @@ def list_attempts( self, event_subscription_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["FAILED", "PENDING", "SENDING", "SUCCESS"] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["FAILED", "PENDING", "SENDING", "SUCCESS"] | 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[MessageAttempt, AsyncCursorPage[MessageAttempt]]: """ List all the message attempts for a given event subscription. @@ -1159,14 +1159,14 @@ async def recover( self, event_subscription_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | 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, ) -> None: """ Resend all failed messages since a given time. @@ -1212,14 +1212,14 @@ async def replay_missing( self, event_subscription_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | 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, ) -> None: """Replays messages to the endpoint. @@ -1275,7 +1275,7 @@ async def retrieve_secret( 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, ) -> SubscriptionRetrieveSecretResponse: """ Get the secret for an event subscription. @@ -1310,7 +1310,7 @@ async def rotate_secret( 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, ) -> None: """Rotate the secret for an event subscription. @@ -1391,13 +1391,13 @@ async def send_simulated_example( "tokenization.two_factor_authentication_code_sent", "tokenization.updated", ] - | NotGiven = NOT_GIVEN, + | 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, ) -> None: """ Send an example message for event. diff --git a/src/lithic/resources/external_bank_accounts/external_bank_accounts.py b/src/lithic/resources/external_bank_accounts/external_bank_accounts.py index 3eeb7cbd..7a07ef0c 100644 --- a/src/lithic/resources/external_bank_accounts/external_bank_accounts.py +++ b/src/lithic/resources/external_bank_accounts/external_bank_accounts.py @@ -18,7 +18,7 @@ external_bank_account_retry_prenote_params, external_bank_account_retry_micro_deposits_params, ) -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 required_args, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -83,20 +83,20 @@ def create( routing_number: str, type: Literal["CHECKING", "SAVINGS"], verification_method: VerificationMethod, - account_token: str | NotGiven = NOT_GIVEN, - address: ExternalBankAccountAddressParam | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - dob: Union[str, date] | NotGiven = NOT_GIVEN, - doing_business_as: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, - verification_enforcement: bool | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + address: ExternalBankAccountAddressParam | Omit = omit, + company_id: str | Omit = omit, + dob: Union[str, date] | Omit = omit, + doing_business_as: str | Omit = omit, + name: str | Omit = omit, + user_defined_id: str | Omit = omit, + verification_enforcement: bool | 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, ) -> ExternalBankAccountCreateResponse: """ Creates an external bank account within a program or Lithic account. @@ -156,17 +156,17 @@ def create( owner_type: OwnerType, processor_token: str, verification_method: VerificationMethod, - account_token: str | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - dob: Union[str, date] | NotGiven = NOT_GIVEN, - doing_business_as: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + company_id: str | Omit = omit, + dob: Union[str, date] | Omit = omit, + doing_business_as: str | Omit = omit, + user_defined_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, ) -> ExternalBankAccountCreateResponse: """ Creates an external bank account within a program or Lithic account. @@ -213,19 +213,19 @@ def create( routing_number: str, type: Literal["CHECKING", "SAVINGS"], verification_method: Literal["EXTERNALLY_VERIFIED"], - account_token: str | NotGiven = NOT_GIVEN, - address: ExternalBankAccountAddressParam | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - dob: Union[str, date] | NotGiven = NOT_GIVEN, - doing_business_as: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + address: ExternalBankAccountAddressParam | Omit = omit, + company_id: str | Omit = omit, + dob: Union[str, date] | Omit = omit, + doing_business_as: str | Omit = omit, + name: str | Omit = omit, + user_defined_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, ) -> ExternalBankAccountCreateResponse: """ Creates an external bank account within a program or Lithic account. @@ -287,19 +287,19 @@ def create( routing_number: str, type: Literal["CHECKING", "SAVINGS"], verification_method: Literal["UNVERIFIED"], - account_token: str | NotGiven = NOT_GIVEN, - address: ExternalBankAccountAddressParam | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - dob: Union[str, date] | NotGiven = NOT_GIVEN, - doing_business_as: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + address: ExternalBankAccountAddressParam | Omit = omit, + company_id: str | Omit = omit, + dob: Union[str, date] | Omit = omit, + doing_business_as: str | Omit = omit, + name: str | Omit = omit, + user_defined_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, ) -> ExternalBankAccountCreateResponse: """ Creates an external bank account within a program or Lithic account. @@ -376,30 +376,30 @@ def create( def create( self, *, - account_number: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - currency: str | NotGiven = NOT_GIVEN, - financial_account_token: str | NotGiven = NOT_GIVEN, + account_number: str | Omit = omit, + country: str | Omit = omit, + currency: str | Omit = omit, + financial_account_token: str | Omit = omit, owner: str, owner_type: OwnerType, - routing_number: str | NotGiven = NOT_GIVEN, - type: Literal["CHECKING", "SAVINGS"] | NotGiven = NOT_GIVEN, + routing_number: str | Omit = omit, + type: Literal["CHECKING", "SAVINGS"] | Omit = omit, verification_method: VerificationMethod | Literal["EXTERNALLY_VERIFIED"] | Literal["UNVERIFIED"], - account_token: str | NotGiven = NOT_GIVEN, - address: ExternalBankAccountAddressParam | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - dob: Union[str, date] | Union[str, date] | Union[str, date] | Union[str, date] | NotGiven = NOT_GIVEN, - doing_business_as: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, - verification_enforcement: bool | NotGiven = NOT_GIVEN, - processor_token: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + address: ExternalBankAccountAddressParam | Omit = omit, + company_id: str | Omit = omit, + dob: Union[str, date] | Union[str, date] | Union[str, date] | Union[str, date] | Omit = omit, + doing_business_as: str | Omit = omit, + name: str | Omit = omit, + user_defined_id: str | Omit = omit, + verification_enforcement: bool | Omit = omit, + processor_token: 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, ) -> ExternalBankAccountCreateResponse: return self._post( "/v1/external_bank_accounts", @@ -441,7 +441,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, ) -> ExternalBankAccountRetrieveResponse: """ Get the external bank account by token. @@ -471,21 +471,21 @@ def update( self, external_bank_account_token: str, *, - address: ExternalBankAccountAddressParam | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - dob: Union[str, date] | NotGiven = NOT_GIVEN, - doing_business_as: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - owner: str | NotGiven = NOT_GIVEN, - owner_type: OwnerType | NotGiven = NOT_GIVEN, - type: Literal["CHECKING", "SAVINGS"] | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + address: ExternalBankAccountAddressParam | Omit = omit, + company_id: str | Omit = omit, + dob: Union[str, date] | Omit = omit, + doing_business_as: str | Omit = omit, + name: str | Omit = omit, + owner: str | Omit = omit, + owner_type: OwnerType | Omit = omit, + type: Literal["CHECKING", "SAVINGS"] | Omit = omit, + user_defined_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, ) -> ExternalBankAccountUpdateResponse: """ Update the external bank account by token. @@ -545,22 +545,22 @@ def update( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - account_types: List[Literal["CHECKING", "SAVINGS"]] | NotGiven = NOT_GIVEN, - countries: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - owner_types: List[OwnerType] | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - states: List[Literal["ENABLED", "CLOSED", "PAUSED"]] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + account_types: List[Literal["CHECKING", "SAVINGS"]] | Omit = omit, + countries: SequenceNotStr[str] | Omit = omit, + ending_before: str | Omit = omit, + owner_types: List[OwnerType] | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + states: List[Literal["ENABLED", "CLOSED", "PAUSED"]] | Omit = omit, verification_states: List[Literal["PENDING", "ENABLED", "FAILED_VERIFICATION", "INSUFFICIENT_FUNDS"]] - | NotGiven = NOT_GIVEN, + | 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, ) -> SyncCursorPage[ExternalBankAccountListResponse]: """ List all the external bank accounts for the provided search criteria. @@ -612,13 +612,13 @@ def retry_micro_deposits( self, external_bank_account_token: str, *, - financial_account_token: str | NotGiven = NOT_GIVEN, + financial_account_token: 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, ) -> ExternalBankAccountRetryMicroDepositsResponse: """ Retry external bank account micro deposit verification. @@ -652,13 +652,13 @@ def retry_prenote( self, external_bank_account_token: str, *, - financial_account_token: str | NotGiven = NOT_GIVEN, + financial_account_token: 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, ) -> ExternalBankAccountRetryPrenoteResponse: """ Retry external bank account prenote verification. @@ -726,20 +726,20 @@ async def create( routing_number: str, type: Literal["CHECKING", "SAVINGS"], verification_method: VerificationMethod, - account_token: str | NotGiven = NOT_GIVEN, - address: ExternalBankAccountAddressParam | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - dob: Union[str, date] | NotGiven = NOT_GIVEN, - doing_business_as: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, - verification_enforcement: bool | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + address: ExternalBankAccountAddressParam | Omit = omit, + company_id: str | Omit = omit, + dob: Union[str, date] | Omit = omit, + doing_business_as: str | Omit = omit, + name: str | Omit = omit, + user_defined_id: str | Omit = omit, + verification_enforcement: bool | 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, ) -> ExternalBankAccountCreateResponse: """ Creates an external bank account within a program or Lithic account. @@ -799,17 +799,17 @@ async def create( owner_type: OwnerType, processor_token: str, verification_method: VerificationMethod, - account_token: str | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - dob: Union[str, date] | NotGiven = NOT_GIVEN, - doing_business_as: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + company_id: str | Omit = omit, + dob: Union[str, date] | Omit = omit, + doing_business_as: str | Omit = omit, + user_defined_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, ) -> ExternalBankAccountCreateResponse: """ Creates an external bank account within a program or Lithic account. @@ -856,19 +856,19 @@ async def create( routing_number: str, type: Literal["CHECKING", "SAVINGS"], verification_method: Literal["EXTERNALLY_VERIFIED"], - account_token: str | NotGiven = NOT_GIVEN, - address: ExternalBankAccountAddressParam | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - dob: Union[str, date] | NotGiven = NOT_GIVEN, - doing_business_as: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + address: ExternalBankAccountAddressParam | Omit = omit, + company_id: str | Omit = omit, + dob: Union[str, date] | Omit = omit, + doing_business_as: str | Omit = omit, + name: str | Omit = omit, + user_defined_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, ) -> ExternalBankAccountCreateResponse: """ Creates an external bank account within a program or Lithic account. @@ -930,19 +930,19 @@ async def create( routing_number: str, type: Literal["CHECKING", "SAVINGS"], verification_method: Literal["UNVERIFIED"], - account_token: str | NotGiven = NOT_GIVEN, - address: ExternalBankAccountAddressParam | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - dob: Union[str, date] | NotGiven = NOT_GIVEN, - doing_business_as: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + address: ExternalBankAccountAddressParam | Omit = omit, + company_id: str | Omit = omit, + dob: Union[str, date] | Omit = omit, + doing_business_as: str | Omit = omit, + name: str | Omit = omit, + user_defined_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, ) -> ExternalBankAccountCreateResponse: """ Creates an external bank account within a program or Lithic account. @@ -1019,30 +1019,30 @@ async def create( async def create( self, *, - account_number: str | NotGiven = NOT_GIVEN, - country: str | NotGiven = NOT_GIVEN, - currency: str | NotGiven = NOT_GIVEN, - financial_account_token: str | NotGiven = NOT_GIVEN, + account_number: str | Omit = omit, + country: str | Omit = omit, + currency: str | Omit = omit, + financial_account_token: str | Omit = omit, owner: str, owner_type: OwnerType, - routing_number: str | NotGiven = NOT_GIVEN, - type: Literal["CHECKING", "SAVINGS"] | NotGiven = NOT_GIVEN, + routing_number: str | Omit = omit, + type: Literal["CHECKING", "SAVINGS"] | Omit = omit, verification_method: VerificationMethod | Literal["EXTERNALLY_VERIFIED"] | Literal["UNVERIFIED"], - account_token: str | NotGiven = NOT_GIVEN, - address: ExternalBankAccountAddressParam | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - dob: Union[str, date] | Union[str, date] | Union[str, date] | Union[str, date] | NotGiven = NOT_GIVEN, - doing_business_as: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, - verification_enforcement: bool | NotGiven = NOT_GIVEN, - processor_token: str | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + address: ExternalBankAccountAddressParam | Omit = omit, + company_id: str | Omit = omit, + dob: Union[str, date] | Union[str, date] | Union[str, date] | Union[str, date] | Omit = omit, + doing_business_as: str | Omit = omit, + name: str | Omit = omit, + user_defined_id: str | Omit = omit, + verification_enforcement: bool | Omit = omit, + processor_token: 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, ) -> ExternalBankAccountCreateResponse: return await self._post( "/v1/external_bank_accounts", @@ -1084,7 +1084,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, ) -> ExternalBankAccountRetrieveResponse: """ Get the external bank account by token. @@ -1114,21 +1114,21 @@ async def update( self, external_bank_account_token: str, *, - address: ExternalBankAccountAddressParam | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - dob: Union[str, date] | NotGiven = NOT_GIVEN, - doing_business_as: str | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - owner: str | NotGiven = NOT_GIVEN, - owner_type: OwnerType | NotGiven = NOT_GIVEN, - type: Literal["CHECKING", "SAVINGS"] | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + address: ExternalBankAccountAddressParam | Omit = omit, + company_id: str | Omit = omit, + dob: Union[str, date] | Omit = omit, + doing_business_as: str | Omit = omit, + name: str | Omit = omit, + owner: str | Omit = omit, + owner_type: OwnerType | Omit = omit, + type: Literal["CHECKING", "SAVINGS"] | Omit = omit, + user_defined_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, ) -> ExternalBankAccountUpdateResponse: """ Update the external bank account by token. @@ -1188,22 +1188,22 @@ async def update( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - account_types: List[Literal["CHECKING", "SAVINGS"]] | NotGiven = NOT_GIVEN, - countries: SequenceNotStr[str] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - owner_types: List[OwnerType] | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - states: List[Literal["ENABLED", "CLOSED", "PAUSED"]] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + account_types: List[Literal["CHECKING", "SAVINGS"]] | Omit = omit, + countries: SequenceNotStr[str] | Omit = omit, + ending_before: str | Omit = omit, + owner_types: List[OwnerType] | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + states: List[Literal["ENABLED", "CLOSED", "PAUSED"]] | Omit = omit, verification_states: List[Literal["PENDING", "ENABLED", "FAILED_VERIFICATION", "INSUFFICIENT_FUNDS"]] - | NotGiven = NOT_GIVEN, + | 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[ExternalBankAccountListResponse, AsyncCursorPage[ExternalBankAccountListResponse]]: """ List all the external bank accounts for the provided search criteria. @@ -1255,13 +1255,13 @@ async def retry_micro_deposits( self, external_bank_account_token: str, *, - financial_account_token: str | NotGiven = NOT_GIVEN, + financial_account_token: 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, ) -> ExternalBankAccountRetryMicroDepositsResponse: """ Retry external bank account micro deposit verification. @@ -1295,13 +1295,13 @@ async def retry_prenote( self, external_bank_account_token: str, *, - financial_account_token: str | NotGiven = NOT_GIVEN, + financial_account_token: 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, ) -> ExternalBankAccountRetryPrenoteResponse: """ Retry external bank account prenote verification. diff --git a/src/lithic/resources/external_bank_accounts/micro_deposits.py b/src/lithic/resources/external_bank_accounts/micro_deposits.py index ef707a17..ac74374b 100644 --- a/src/lithic/resources/external_bank_accounts/micro_deposits.py +++ b/src/lithic/resources/external_bank_accounts/micro_deposits.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 @@ -49,7 +49,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, ) -> MicroDepositCreateResponse: """ Verify the external bank account by providing the micro deposit amounts. @@ -109,7 +109,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, ) -> MicroDepositCreateResponse: """ Verify the external bank account by providing the micro deposit amounts. diff --git a/src/lithic/resources/external_payments.py b/src/lithic/resources/external_payments.py index 8442e121..8de28571 100644 --- a/src/lithic/resources/external_payments.py +++ b/src/lithic/resources/external_payments.py @@ -17,7 +17,7 @@ external_payment_release_params, external_payment_reverse_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 @@ -57,16 +57,16 @@ def create( effective_date: Union[str, date], financial_account_token: str, payment_type: Literal["DEPOSIT", "WITHDRAWAL"], - token: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - progress_to: Literal["SETTLED", "RELEASED"] | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + token: str | Omit = omit, + memo: str | Omit = omit, + progress_to: Literal["SETTLED", "RELEASED"] | Omit = omit, + user_defined_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, ) -> ExternalPayment: """ Create external payment @@ -111,7 +111,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, ) -> ExternalPayment: """ Get external payment @@ -140,23 +140,22 @@ def retrieve( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - category: Literal["EXTERNAL_WIRE", "EXTERNAL_ACH", "EXTERNAL_CHECK", "EXTERNAL_TRANSFER"] - | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - financial_account_token: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + business_account_token: str | Omit = omit, + category: Literal["EXTERNAL_WIRE", "EXTERNAL_ACH", "EXTERNAL_CHECK", "EXTERNAL_TRANSFER"] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + financial_account_token: str | Omit = omit, + page_size: int | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] | 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, ) -> SyncCursorPage[ExternalPayment]: """List external payments @@ -226,13 +225,13 @@ def cancel( external_payment_token: str, *, effective_date: Union[str, date], - memo: str | NotGiven = NOT_GIVEN, + memo: 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, ) -> ExternalPayment: """ Cancel external payment @@ -270,13 +269,13 @@ def release( external_payment_token: str, *, effective_date: Union[str, date], - memo: str | NotGiven = NOT_GIVEN, + memo: 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, ) -> ExternalPayment: """ Release external payment @@ -314,13 +313,13 @@ def reverse( external_payment_token: str, *, effective_date: Union[str, date], - memo: str | NotGiven = NOT_GIVEN, + memo: 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, ) -> ExternalPayment: """ Reverse external payment @@ -358,14 +357,14 @@ def settle( external_payment_token: str, *, effective_date: Union[str, date], - memo: str | NotGiven = NOT_GIVEN, - progress_to: Literal["SETTLED", "RELEASED"] | NotGiven = NOT_GIVEN, + memo: str | Omit = omit, + progress_to: Literal["SETTLED", "RELEASED"] | 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, ) -> ExternalPayment: """ Settle external payment @@ -428,16 +427,16 @@ async def create( effective_date: Union[str, date], financial_account_token: str, payment_type: Literal["DEPOSIT", "WITHDRAWAL"], - token: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - progress_to: Literal["SETTLED", "RELEASED"] | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + token: str | Omit = omit, + memo: str | Omit = omit, + progress_to: Literal["SETTLED", "RELEASED"] | Omit = omit, + user_defined_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, ) -> ExternalPayment: """ Create external payment @@ -482,7 +481,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, ) -> ExternalPayment: """ Get external payment @@ -511,23 +510,22 @@ async def retrieve( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - category: Literal["EXTERNAL_WIRE", "EXTERNAL_ACH", "EXTERNAL_CHECK", "EXTERNAL_TRANSFER"] - | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - financial_account_token: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + business_account_token: str | Omit = omit, + category: Literal["EXTERNAL_WIRE", "EXTERNAL_ACH", "EXTERNAL_CHECK", "EXTERNAL_TRANSFER"] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + financial_account_token: str | Omit = omit, + page_size: int | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] | 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[ExternalPayment, AsyncCursorPage[ExternalPayment]]: """List external payments @@ -597,13 +595,13 @@ async def cancel( external_payment_token: str, *, effective_date: Union[str, date], - memo: str | NotGiven = NOT_GIVEN, + memo: 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, ) -> ExternalPayment: """ Cancel external payment @@ -641,13 +639,13 @@ async def release( external_payment_token: str, *, effective_date: Union[str, date], - memo: str | NotGiven = NOT_GIVEN, + memo: 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, ) -> ExternalPayment: """ Release external payment @@ -685,13 +683,13 @@ async def reverse( external_payment_token: str, *, effective_date: Union[str, date], - memo: str | NotGiven = NOT_GIVEN, + memo: 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, ) -> ExternalPayment: """ Reverse external payment @@ -729,14 +727,14 @@ async def settle( external_payment_token: str, *, effective_date: Union[str, date], - memo: str | NotGiven = NOT_GIVEN, - progress_to: Literal["SETTLED", "RELEASED"] | NotGiven = NOT_GIVEN, + memo: str | Omit = omit, + progress_to: Literal["SETTLED", "RELEASED"] | 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, ) -> ExternalPayment: """ Settle external payment diff --git a/src/lithic/resources/financial_accounts/balances.py b/src/lithic/resources/financial_accounts/balances.py index 4c118fae..782be9b7 100644 --- a/src/lithic/resources/financial_accounts/balances.py +++ b/src/lithic/resources/financial_accounts/balances.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 from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -45,14 +45,14 @@ def list( self, financial_account_token: str, *, - balance_date: Union[str, datetime] | NotGiven = NOT_GIVEN, - last_transaction_event_token: str | NotGiven = NOT_GIVEN, + balance_date: Union[str, datetime] | Omit = omit, + last_transaction_event_token: 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[BalanceListResponse]: """ Get the balances for a given financial account. @@ -120,14 +120,14 @@ def list( self, financial_account_token: str, *, - balance_date: Union[str, datetime] | NotGiven = NOT_GIVEN, - last_transaction_event_token: str | NotGiven = NOT_GIVEN, + balance_date: Union[str, datetime] | Omit = omit, + last_transaction_event_token: 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[BalanceListResponse, AsyncSinglePage[BalanceListResponse]]: """ Get the balances for a given financial account. diff --git a/src/lithic/resources/financial_accounts/credit_configuration.py b/src/lithic/resources/financial_accounts/credit_configuration.py index c3fb7c88..6428ba59 100644 --- a/src/lithic/resources/financial_accounts/credit_configuration.py +++ b/src/lithic/resources/financial_accounts/credit_configuration.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 @@ -46,7 +46,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, ) -> FinancialAccountCreditConfig: """ Get an Account's credit configuration @@ -76,16 +76,16 @@ def update( self, financial_account_token: str, *, - credit_limit: int | NotGiven = NOT_GIVEN, - credit_product_token: str | NotGiven = NOT_GIVEN, - external_bank_account_token: str | NotGiven = NOT_GIVEN, - tier: str | NotGiven = NOT_GIVEN, + credit_limit: int | Omit = omit, + credit_product_token: str | Omit = omit, + external_bank_account_token: str | Omit = omit, + tier: 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, ) -> FinancialAccountCreditConfig: """ Update an account's credit configuration @@ -154,7 +154,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, ) -> FinancialAccountCreditConfig: """ Get an Account's credit configuration @@ -184,16 +184,16 @@ async def update( self, financial_account_token: str, *, - credit_limit: int | NotGiven = NOT_GIVEN, - credit_product_token: str | NotGiven = NOT_GIVEN, - external_bank_account_token: str | NotGiven = NOT_GIVEN, - tier: str | NotGiven = NOT_GIVEN, + credit_limit: int | Omit = omit, + credit_product_token: str | Omit = omit, + external_bank_account_token: str | Omit = omit, + tier: 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, ) -> FinancialAccountCreditConfig: """ Update an account's credit configuration diff --git a/src/lithic/resources/financial_accounts/financial_accounts.py b/src/lithic/resources/financial_accounts/financial_accounts.py index 7db97243..327e32f8 100644 --- a/src/lithic/resources/financial_accounts/financial_accounts.py +++ b/src/lithic/resources/financial_accounts/financial_accounts.py @@ -15,7 +15,7 @@ financial_account_update_status_params, financial_account_register_account_number_params, ) -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from .balances import ( Balances, @@ -112,14 +112,14 @@ def create( *, nickname: str, type: Literal["OPERATING"], - account_token: str | NotGiven = NOT_GIVEN, - is_for_benefit_of: bool | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + is_for_benefit_of: bool | 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, ) -> FinancialAccount: """ Create a new financial account @@ -159,7 +159,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, ) -> FinancialAccount: """ Get a financial account @@ -189,13 +189,13 @@ def update( self, financial_account_token: str, *, - nickname: str | NotGiven = NOT_GIVEN, + nickname: 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, ) -> FinancialAccount: """ Update a financial account @@ -225,15 +225,15 @@ def update( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + business_account_token: str | Omit = omit, + type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | 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[FinancialAccount]: """ Retrieve information on your financial accounts including routing and account @@ -284,7 +284,7 @@ def register_account_number( 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, ) -> None: """ Register account number @@ -325,7 +325,7 @@ def update_status( 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, ) -> FinancialAccount: """ Update financial account status @@ -408,14 +408,14 @@ async def create( *, nickname: str, type: Literal["OPERATING"], - account_token: str | NotGiven = NOT_GIVEN, - is_for_benefit_of: bool | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + is_for_benefit_of: bool | 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, ) -> FinancialAccount: """ Create a new financial account @@ -455,7 +455,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, ) -> FinancialAccount: """ Get a financial account @@ -485,13 +485,13 @@ async def update( self, financial_account_token: str, *, - nickname: str | NotGiven = NOT_GIVEN, + nickname: 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, ) -> FinancialAccount: """ Update a financial account @@ -523,15 +523,15 @@ async def update( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + business_account_token: str | Omit = omit, + type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | 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[FinancialAccount, AsyncSinglePage[FinancialAccount]]: """ Retrieve information on your financial accounts including routing and account @@ -582,7 +582,7 @@ async def register_account_number( 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, ) -> None: """ Register account number @@ -623,7 +623,7 @@ async def update_status( 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, ) -> FinancialAccount: """ Update financial account status diff --git a/src/lithic/resources/financial_accounts/financial_transactions.py b/src/lithic/resources/financial_accounts/financial_transactions.py index 167ec9fe..3df4d47c 100644 --- a/src/lithic/resources/financial_accounts/financial_transactions.py +++ b/src/lithic/resources/financial_accounts/financial_transactions.py @@ -9,7 +9,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 @@ -52,7 +52,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, ) -> FinancialTransaction: """ Get the financial transaction for the provided token. @@ -86,19 +86,19 @@ def list( self, financial_account_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - category: Literal["ACH", "CARD", "INTERNAL", "TRANSFER"] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["DECLINED", "EXPIRED", "PENDING", "RETURNED", "SETTLED", "VOIDED"] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + category: Literal["ACH", "CARD", "INTERNAL", "TRANSFER"] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["DECLINED", "EXPIRED", "PENDING", "RETURNED", "SETTLED", "VOIDED"] | 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[FinancialTransaction]: """ List the financial transactions for a given financial account. @@ -189,7 +189,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, ) -> FinancialTransaction: """ Get the financial transaction for the provided token. @@ -223,19 +223,19 @@ def list( self, financial_account_token: str, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - category: Literal["ACH", "CARD", "INTERNAL", "TRANSFER"] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["DECLINED", "EXPIRED", "PENDING", "RETURNED", "SETTLED", "VOIDED"] | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + category: Literal["ACH", "CARD", "INTERNAL", "TRANSFER"] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["DECLINED", "EXPIRED", "PENDING", "RETURNED", "SETTLED", "VOIDED"] | 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[FinancialTransaction, AsyncSinglePage[FinancialTransaction]]: """ List the financial transactions for a given financial account. diff --git a/src/lithic/resources/financial_accounts/loan_tapes.py b/src/lithic/resources/financial_accounts/loan_tapes.py index 40622728..96d40fe3 100644 --- a/src/lithic/resources/financial_accounts/loan_tapes.py +++ b/src/lithic/resources/financial_accounts/loan_tapes.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 from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,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, ) -> LoanTape: """ Get a specific loan tape for a given financial account. @@ -87,17 +87,17 @@ def list( self, financial_account_token: str, *, - begin: Union[str, date] | NotGiven = NOT_GIVEN, - end: Union[str, date] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, date] | Omit = omit, + end: Union[str, date] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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, ) -> SyncCursorPage[LoanTape]: """ List the loan tapes for a given financial account. @@ -184,7 +184,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, ) -> LoanTape: """ Get a specific loan tape for a given financial account. @@ -220,17 +220,17 @@ def list( self, financial_account_token: str, *, - begin: Union[str, date] | NotGiven = NOT_GIVEN, - end: Union[str, date] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, date] | Omit = omit, + end: Union[str, date] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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[LoanTape, AsyncCursorPage[LoanTape]]: """ List the loan tapes for a given financial account. diff --git a/src/lithic/resources/financial_accounts/statements/line_items.py b/src/lithic/resources/financial_accounts/statements/line_items.py index 9ed8a66d..64cc1d97 100644 --- a/src/lithic/resources/financial_accounts/statements/line_items.py +++ b/src/lithic/resources/financial_accounts/statements/line_items.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 from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -43,15 +43,15 @@ def list( statement_token: str, *, financial_account_token: str, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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, ) -> SyncCursorPage[Data]: """ List the line items for a given statement within a given financial account. @@ -129,15 +129,15 @@ def list( statement_token: str, *, financial_account_token: str, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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[Data, AsyncCursorPage[Data]]: """ List the line items for a given statement within a given financial account. diff --git a/src/lithic/resources/financial_accounts/statements/statements.py b/src/lithic/resources/financial_accounts/statements/statements.py index a9b27dde..08afc6ea 100644 --- a/src/lithic/resources/financial_accounts/statements/statements.py +++ b/src/lithic/resources/financial_accounts/statements/statements.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 from ...._compat import cached_property from .line_items import ( @@ -63,7 +63,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, ) -> Statement: """ Get a specific statement for a given financial account. @@ -99,18 +99,18 @@ def list( self, financial_account_token: str, *, - begin: Union[str, date] | NotGiven = NOT_GIVEN, - end: Union[str, date] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - include_initial_statements: bool | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, date] | Omit = omit, + end: Union[str, date] | Omit = omit, + ending_before: str | Omit = omit, + include_initial_statements: bool | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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, ) -> SyncCursorPage[Statement]: """ List the statements for a given financial account. @@ -204,7 +204,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, ) -> Statement: """ Get a specific statement for a given financial account. @@ -240,18 +240,18 @@ def list( self, financial_account_token: str, *, - begin: Union[str, date] | NotGiven = NOT_GIVEN, - end: Union[str, date] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - include_initial_statements: bool | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, date] | Omit = omit, + end: Union[str, date] | Omit = omit, + ending_before: str | Omit = omit, + include_initial_statements: bool | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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[Statement, AsyncCursorPage[Statement]]: """ List the statements for a given financial account. diff --git a/src/lithic/resources/fraud/transactions.py b/src/lithic/resources/fraud/transactions.py index 3ec3e274..1f3e6e2d 100644 --- a/src/lithic/resources/fraud/transactions.py +++ b/src/lithic/resources/fraud/transactions.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 @@ -49,7 +49,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, ) -> TransactionRetrieveResponse: """ Retrieve a fraud report for a specific transaction identified by its unique @@ -79,17 +79,17 @@ def report( transaction_token: str, *, fraud_status: Literal["SUSPECTED_FRAUD", "FRAUDULENT", "NOT_FRAUDULENT"], - comment: str | NotGiven = NOT_GIVEN, + comment: str | Omit = omit, fraud_type: Literal[ "FIRST_PARTY_FRAUD", "ACCOUNT_TAKEOVER", "CARD_COMPROMISED", "IDENTITY_THEFT", "CARDHOLDER_MANIPULATION" ] - | NotGiven = NOT_GIVEN, + | 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, ) -> TransactionReportResponse: """ Report fraud for a specific transaction token by providing details such as fraud @@ -189,7 +189,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, ) -> TransactionRetrieveResponse: """ Retrieve a fraud report for a specific transaction identified by its unique @@ -219,17 +219,17 @@ async def report( transaction_token: str, *, fraud_status: Literal["SUSPECTED_FRAUD", "FRAUDULENT", "NOT_FRAUDULENT"], - comment: str | NotGiven = NOT_GIVEN, + comment: str | Omit = omit, fraud_type: Literal[ "FIRST_PARTY_FRAUD", "ACCOUNT_TAKEOVER", "CARD_COMPROMISED", "IDENTITY_THEFT", "CARDHOLDER_MANIPULATION" ] - | NotGiven = NOT_GIVEN, + | 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, ) -> TransactionReportResponse: """ Report fraud for a specific transaction token by providing details such as fraud diff --git a/src/lithic/resources/funding_events.py b/src/lithic/resources/funding_events.py index 1785d641..43e63501 100644 --- a/src/lithic/resources/funding_events.py +++ b/src/lithic/resources/funding_events.py @@ -6,7 +6,7 @@ from .. import _legacy_response from ..types import funding_event_list_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 from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -49,7 +49,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, ) -> FundingEventRetrieveResponse: """ Get funding event for program by id @@ -78,15 +78,15 @@ def retrieve( def list( self, *, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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, ) -> SyncCursorPage[FundingEventListResponse]: """ Get all funding events for program @@ -137,7 +137,7 @@ def retrieve_details( 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, ) -> FundingEventRetrieveDetailsResponse: """ Get funding event details by id @@ -193,7 +193,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, ) -> FundingEventRetrieveResponse: """ Get funding event for program by id @@ -222,15 +222,15 @@ async def retrieve( def list( self, *, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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[FundingEventListResponse, AsyncCursorPage[FundingEventListResponse]]: """ Get all funding events for program @@ -281,7 +281,7 @@ async def retrieve_details( 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, ) -> FundingEventRetrieveDetailsResponse: """ Get funding event details by id diff --git a/src/lithic/resources/management_operations.py b/src/lithic/resources/management_operations.py index 37f9cfa8..3bb033e6 100644 --- a/src/lithic/resources/management_operations.py +++ b/src/lithic/resources/management_operations.py @@ -14,7 +14,7 @@ management_operation_create_params, management_operation_reverse_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 @@ -81,17 +81,17 @@ def create( "DISBURSE_REVERSAL", ], financial_account_token: str, - token: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - on_closed_account: Literal["FAIL", "USE_SUSPENSE"] | NotGiven = NOT_GIVEN, - subtype: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + token: str | Omit = omit, + memo: str | Omit = omit, + on_closed_account: Literal["FAIL", "USE_SUSPENSE"] | Omit = omit, + subtype: str | Omit = omit, + user_defined_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, ) -> ManagementOperationTransaction: """ Create management operation @@ -140,7 +140,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, ) -> ManagementOperationTransaction: """ Get management operation @@ -169,8 +169,8 @@ def retrieve( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + business_account_token: str | Omit = omit, category: Literal[ "MANAGEMENT_FEE", "MANAGEMENT_DISPUTE", @@ -178,19 +178,19 @@ def list( "MANAGEMENT_ADJUSTMENT", "MANAGEMENT_DISBURSEMENT", ] - | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - financial_account_token: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] | NotGiven = NOT_GIVEN, + | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + financial_account_token: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] | 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, ) -> SyncCursorPage[ManagementOperationTransaction]: """List management operations @@ -257,13 +257,13 @@ def reverse( management_operation_token: str, *, effective_date: Union[str, date], - memo: str | NotGiven = NOT_GIVEN, + memo: 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, ) -> ManagementOperationTransaction: """ Reverse a management operation @@ -352,17 +352,17 @@ async def create( "DISBURSE_REVERSAL", ], financial_account_token: str, - token: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - on_closed_account: Literal["FAIL", "USE_SUSPENSE"] | NotGiven = NOT_GIVEN, - subtype: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + token: str | Omit = omit, + memo: str | Omit = omit, + on_closed_account: Literal["FAIL", "USE_SUSPENSE"] | Omit = omit, + subtype: str | Omit = omit, + user_defined_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, ) -> ManagementOperationTransaction: """ Create management operation @@ -411,7 +411,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, ) -> ManagementOperationTransaction: """ Get management operation @@ -440,8 +440,8 @@ async def retrieve( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + business_account_token: str | Omit = omit, category: Literal[ "MANAGEMENT_FEE", "MANAGEMENT_DISPUTE", @@ -449,19 +449,19 @@ def list( "MANAGEMENT_ADJUSTMENT", "MANAGEMENT_DISBURSEMENT", ] - | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - financial_account_token: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] | NotGiven = NOT_GIVEN, + | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + financial_account_token: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] | 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[ManagementOperationTransaction, AsyncCursorPage[ManagementOperationTransaction]]: """List management operations @@ -528,13 +528,13 @@ async def reverse( management_operation_token: str, *, effective_date: Union[str, date], - memo: str | NotGiven = NOT_GIVEN, + memo: 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, ) -> ManagementOperationTransaction: """ Reverse a management operation diff --git a/src/lithic/resources/network_programs.py b/src/lithic/resources/network_programs.py index 4b0b8bba..2b0fb8aa 100644 --- a/src/lithic/resources/network_programs.py +++ b/src/lithic/resources/network_programs.py @@ -9,7 +9,7 @@ from .. import _legacy_response from ..types import network_program_list_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 from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,7 +50,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, ) -> NetworkProgram: """ Get network program. @@ -79,15 +79,15 @@ def retrieve( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + page_size: 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, ) -> SyncSinglePage[NetworkProgram]: """List network programs. @@ -160,7 +160,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, ) -> NetworkProgram: """ Get network program. @@ -189,15 +189,15 @@ async def retrieve( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + page_size: 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[NetworkProgram, AsyncSinglePage[NetworkProgram]]: """List network programs. diff --git a/src/lithic/resources/payments.py b/src/lithic/resources/payments.py index f0a5b99b..b197fbdf 100644 --- a/src/lithic/resources/payments.py +++ b/src/lithic/resources/payments.py @@ -17,7 +17,7 @@ payment_simulate_receipt_params, payment_simulate_release_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 @@ -64,15 +64,15 @@ def create( method: Literal["ACH_NEXT_DAY", "ACH_SAME_DAY"], method_attributes: payment_create_params.MethodAttributes, type: Literal["COLLECTION", "PAYMENT"], - token: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + token: str | Omit = omit, + memo: str | Omit = omit, + user_defined_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, ) -> PaymentCreateResponse: """ Initiates a payment between a financial account and an external bank account. @@ -120,7 +120,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, ) -> Payment: """ Get the payment by token. @@ -147,23 +147,23 @@ def retrieve( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - category: Literal["ACH"] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - financial_account_token: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["DECLINED", "PENDING", "RETURNED", "SETTLED"] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + begin: Union[str, datetime] | Omit = omit, + business_account_token: str | Omit = omit, + category: Literal["ACH"] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + financial_account_token: str | Omit = omit, + page_size: int | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["DECLINED", "PENDING", "RETURNED", "SETTLED"] | 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, ) -> SyncCursorPage[Payment]: """ List all the payments for the provided search criteria. @@ -228,7 +228,7 @@ def retry( 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, ) -> PaymentRetryResponse: """ Retry an origination which has been returned. @@ -270,14 +270,14 @@ def simulate_action( decline_reason: Literal[ "PROGRAM_TRANSACTION_LIMIT_EXCEEDED", "PROGRAM_DAILY_LIMIT_EXCEEDED", "PROGRAM_MONTHLY_LIMIT_EXCEEDED" ] - | NotGiven = NOT_GIVEN, - return_reason_code: str | NotGiven = NOT_GIVEN, + | Omit = omit, + return_reason_code: 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, ) -> PaymentSimulateActionResponse: """ Simulate payment lifecycle event @@ -322,13 +322,13 @@ def simulate_receipt( amount: int, financial_account_token: str, receipt_type: Literal["RECEIPT_CREDIT", "RECEIPT_DEBIT"], - memo: str | NotGiven = NOT_GIVEN, + memo: 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, ) -> PaymentSimulateReceiptResponse: """ Simulates a receipt of a Payment. @@ -379,7 +379,7 @@ def simulate_release( 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, ) -> PaymentSimulateReleaseResponse: """ Simulates a release of a Payment. @@ -410,13 +410,13 @@ def simulate_return( self, *, payment_token: str, - return_reason_code: str | NotGiven = NOT_GIVEN, + return_reason_code: 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, ) -> PaymentSimulateReturnResponse: """ Simulates a return of a Payment. @@ -479,15 +479,15 @@ async def create( method: Literal["ACH_NEXT_DAY", "ACH_SAME_DAY"], method_attributes: payment_create_params.MethodAttributes, type: Literal["COLLECTION", "PAYMENT"], - token: str | NotGiven = NOT_GIVEN, - memo: str | NotGiven = NOT_GIVEN, - user_defined_id: str | NotGiven = NOT_GIVEN, + token: str | Omit = omit, + memo: str | Omit = omit, + user_defined_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, ) -> PaymentCreateResponse: """ Initiates a payment between a financial account and an external bank account. @@ -535,7 +535,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, ) -> Payment: """ Get the payment by token. @@ -562,23 +562,23 @@ async def retrieve( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - business_account_token: str | NotGiven = NOT_GIVEN, - category: Literal["ACH"] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - financial_account_token: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["DECLINED", "PENDING", "RETURNED", "SETTLED"] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + begin: Union[str, datetime] | Omit = omit, + business_account_token: str | Omit = omit, + category: Literal["ACH"] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + financial_account_token: str | Omit = omit, + page_size: int | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["DECLINED", "PENDING", "RETURNED", "SETTLED"] | 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[Payment, AsyncCursorPage[Payment]]: """ List all the payments for the provided search criteria. @@ -643,7 +643,7 @@ async def retry( 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, ) -> PaymentRetryResponse: """ Retry an origination which has been returned. @@ -685,14 +685,14 @@ async def simulate_action( decline_reason: Literal[ "PROGRAM_TRANSACTION_LIMIT_EXCEEDED", "PROGRAM_DAILY_LIMIT_EXCEEDED", "PROGRAM_MONTHLY_LIMIT_EXCEEDED" ] - | NotGiven = NOT_GIVEN, - return_reason_code: str | NotGiven = NOT_GIVEN, + | Omit = omit, + return_reason_code: 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, ) -> PaymentSimulateActionResponse: """ Simulate payment lifecycle event @@ -737,13 +737,13 @@ async def simulate_receipt( amount: int, financial_account_token: str, receipt_type: Literal["RECEIPT_CREDIT", "RECEIPT_DEBIT"], - memo: str | NotGiven = NOT_GIVEN, + memo: 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, ) -> PaymentSimulateReceiptResponse: """ Simulates a receipt of a Payment. @@ -794,7 +794,7 @@ async def simulate_release( 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, ) -> PaymentSimulateReleaseResponse: """ Simulates a release of a Payment. @@ -825,13 +825,13 @@ async def simulate_return( self, *, payment_token: str, - return_reason_code: str | NotGiven = NOT_GIVEN, + return_reason_code: 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, ) -> PaymentSimulateReturnResponse: """ Simulates a return of a Payment. diff --git a/src/lithic/resources/reports/settlement/network_totals.py b/src/lithic/resources/reports/settlement/network_totals.py index 8be090d6..499594bc 100644 --- a/src/lithic/resources/reports/settlement/network_totals.py +++ b/src/lithic/resources/reports/settlement/network_totals.py @@ -9,7 +9,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 @@ -52,7 +52,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, ) -> NetworkTotalRetrieveResponse: """Retrieve a specific network total record by token. @@ -80,23 +80,23 @@ def retrieve( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - institution_id: str | NotGiven = NOT_GIVEN, - network: Literal["VISA", "MASTERCARD", "MAESTRO", "INTERLINK"] | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - report_date: Union[str, date] | NotGiven = NOT_GIVEN, - report_date_begin: Union[str, date] | NotGiven = NOT_GIVEN, - report_date_end: Union[str, date] | NotGiven = NOT_GIVEN, - settlement_institution_id: str | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + institution_id: str | Omit = omit, + network: Literal["VISA", "MASTERCARD", "MAESTRO", "INTERLINK"] | Omit = omit, + page_size: int | Omit = omit, + report_date: Union[str, date] | Omit = omit, + report_date_begin: Union[str, date] | Omit = omit, + report_date_end: Union[str, date] | Omit = omit, + settlement_institution_id: str | Omit = omit, + starting_after: 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, ) -> SyncCursorPage[NetworkTotalListResponse]: """List network total records with optional filters. @@ -196,7 +196,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, ) -> NetworkTotalRetrieveResponse: """Retrieve a specific network total record by token. @@ -224,23 +224,23 @@ async def retrieve( def list( self, *, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - institution_id: str | NotGiven = NOT_GIVEN, - network: Literal["VISA", "MASTERCARD", "MAESTRO", "INTERLINK"] | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - report_date: Union[str, date] | NotGiven = NOT_GIVEN, - report_date_begin: Union[str, date] | NotGiven = NOT_GIVEN, - report_date_end: Union[str, date] | NotGiven = NOT_GIVEN, - settlement_institution_id: str | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + begin: Union[str, datetime] | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + institution_id: str | Omit = omit, + network: Literal["VISA", "MASTERCARD", "MAESTRO", "INTERLINK"] | Omit = omit, + page_size: int | Omit = omit, + report_date: Union[str, date] | Omit = omit, + report_date_begin: Union[str, date] | Omit = omit, + report_date_end: Union[str, date] | Omit = omit, + settlement_institution_id: str | Omit = omit, + starting_after: 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[NetworkTotalListResponse, AsyncCursorPage[NetworkTotalListResponse]]: """List network total records with optional filters. diff --git a/src/lithic/resources/reports/settlement/settlement.py b/src/lithic/resources/reports/settlement/settlement.py index 184f8d51..81a34b04 100644 --- a/src/lithic/resources/reports/settlement/settlement.py +++ b/src/lithic/resources/reports/settlement/settlement.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 from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -58,15 +58,15 @@ def list_details( self, report_date: Union[str, date], *, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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, ) -> SyncCursorPage[SettlementDetail]: """ List details. @@ -119,7 +119,7 @@ def summary( 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, ) -> SettlementReport: """Get the settlement report for a specified report date. @@ -173,15 +173,15 @@ def list_details( self, report_date: Union[str, date], *, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: 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[SettlementDetail, AsyncCursorPage[SettlementDetail]]: """ List details. @@ -234,7 +234,7 @@ async def summary( 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, ) -> SettlementReport: """Get the settlement report for a specified report date. diff --git a/src/lithic/resources/responder_endpoints.py b/src/lithic/resources/responder_endpoints.py index 99cad431..720e77e6 100644 --- a/src/lithic/resources/responder_endpoints.py +++ b/src/lithic/resources/responder_endpoints.py @@ -12,7 +12,7 @@ responder_endpoint_delete_params, responder_endpoint_check_status_params, ) -from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -47,14 +47,14 @@ def with_streaming_response(self) -> ResponderEndpointsWithStreamingResponse: def create( self, *, - type: Literal["AUTH_STREAM_ACCESS", "THREE_DS_DECISIONING", "TOKENIZATION_DECISIONING"] | NotGiven = NOT_GIVEN, - url: str | NotGiven = NOT_GIVEN, + type: Literal["AUTH_STREAM_ACCESS", "THREE_DS_DECISIONING", "TOKENIZATION_DECISIONING"] | Omit = omit, + url: 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, ) -> ResponderEndpointCreateResponse: """ Enroll a responder endpoint @@ -96,7 +96,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, ) -> None: """ Disenroll a responder endpoint @@ -133,7 +133,7 @@ def check_status( 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, ) -> ResponderEndpointStatus: """ Check the status of a responder endpoint @@ -187,14 +187,14 @@ def with_streaming_response(self) -> AsyncResponderEndpointsWithStreamingRespons async def create( self, *, - type: Literal["AUTH_STREAM_ACCESS", "THREE_DS_DECISIONING", "TOKENIZATION_DECISIONING"] | NotGiven = NOT_GIVEN, - url: str | NotGiven = NOT_GIVEN, + type: Literal["AUTH_STREAM_ACCESS", "THREE_DS_DECISIONING", "TOKENIZATION_DECISIONING"] | Omit = omit, + url: 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, ) -> ResponderEndpointCreateResponse: """ Enroll a responder endpoint @@ -236,7 +236,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, ) -> None: """ Disenroll a responder endpoint @@ -275,7 +275,7 @@ async def check_status( 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, ) -> ResponderEndpointStatus: """ Check the status of a responder endpoint diff --git a/src/lithic/resources/three_ds/authentication.py b/src/lithic/resources/three_ds/authentication.py index 789b7498..ea8f5cf9 100644 --- a/src/lithic/resources/three_ds/authentication.py +++ b/src/lithic/resources/three_ds/authentication.py @@ -7,7 +7,7 @@ import httpx from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -49,7 +49,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, ) -> AuthenticationRetrieveResponse: """ Get 3DS Authentication by token @@ -81,13 +81,13 @@ def simulate( merchant: authentication_simulate_params.Merchant, pan: str, transaction: authentication_simulate_params.Transaction, - card_expiry_check: Literal["MATCH", "MISMATCH", "NOT_PRESENT"] | NotGiven = NOT_GIVEN, + card_expiry_check: Literal["MATCH", "MISMATCH", "NOT_PRESENT"] | 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, ) -> AuthenticationSimulateResponse: """ Simulates a 3DS authentication request from the payment network as if it came @@ -142,7 +142,7 @@ def simulate_otp_entry( 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, ) -> None: """Endpoint for simulating entering OTP into 3DS Challenge UI. @@ -210,7 +210,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, ) -> AuthenticationRetrieveResponse: """ Get 3DS Authentication by token @@ -242,13 +242,13 @@ async def simulate( merchant: authentication_simulate_params.Merchant, pan: str, transaction: authentication_simulate_params.Transaction, - card_expiry_check: Literal["MATCH", "MISMATCH", "NOT_PRESENT"] | NotGiven = NOT_GIVEN, + card_expiry_check: Literal["MATCH", "MISMATCH", "NOT_PRESENT"] | 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, ) -> AuthenticationSimulateResponse: """ Simulates a 3DS authentication request from the payment network as if it came @@ -303,7 +303,7 @@ async def simulate_otp_entry( 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, ) -> None: """Endpoint for simulating entering OTP into 3DS Challenge UI. diff --git a/src/lithic/resources/three_ds/decisioning.py b/src/lithic/resources/three_ds/decisioning.py index 7ad3a088..476e2cd9 100644 --- a/src/lithic/resources/three_ds/decisioning.py +++ b/src/lithic/resources/three_ds/decisioning.py @@ -5,7 +5,7 @@ import httpx from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ..._types import Body, Query, Headers, NoneType, 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 challenge_response( 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, ) -> None: """Card program's response to a 3DS Challenge Request. @@ -96,7 +96,7 @@ def retrieve_secret( 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, ) -> DecisioningRetrieveSecretResponse: """Retrieve the 3DS Decisioning HMAC secret key. @@ -123,7 +123,7 @@ def rotate_secret( 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, ) -> None: """Generate a new 3DS Decisioning HMAC secret key. @@ -171,7 +171,7 @@ async def challenge_response( 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, ) -> None: """Card program's response to a 3DS Challenge Request. @@ -219,7 +219,7 @@ async def retrieve_secret( 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, ) -> DecisioningRetrieveSecretResponse: """Retrieve the 3DS Decisioning HMAC secret key. @@ -246,7 +246,7 @@ async def rotate_secret( 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, ) -> None: """Generate a new 3DS Decisioning HMAC secret key. diff --git a/src/lithic/resources/tokenization_decisioning.py b/src/lithic/resources/tokenization_decisioning.py index 9e376c10..b52897ce 100644 --- a/src/lithic/resources/tokenization_decisioning.py +++ b/src/lithic/resources/tokenization_decisioning.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 retrieve_secret( 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, ) -> TokenizationSecret: """Retrieve the Tokenization Decisioning secret key. @@ -71,7 +71,7 @@ def rotate_secret( 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, ) -> TokenizationDecisioningRotateSecretResponse: """Generate a new Tokenization Decisioning secret key. @@ -116,7 +116,7 @@ async def retrieve_secret( 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, ) -> TokenizationSecret: """Retrieve the Tokenization Decisioning secret key. @@ -143,7 +143,7 @@ async def rotate_secret( 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, ) -> TokenizationDecisioningRotateSecretResponse: """Generate a new Tokenization Decisioning secret key. diff --git a/src/lithic/resources/tokenizations.py b/src/lithic/resources/tokenizations.py index d5ece179..66740f55 100644 --- a/src/lithic/resources/tokenizations.py +++ b/src/lithic/resources/tokenizations.py @@ -15,7 +15,7 @@ tokenization_resend_activation_code_params, tokenization_update_digital_card_art_params, ) -from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -58,7 +58,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, ) -> Tokenization: """ Get tokenization @@ -85,20 +85,20 @@ def retrieve( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - begin: Union[str, date] | NotGiven = NOT_GIVEN, - card_token: str | NotGiven = NOT_GIVEN, - end: Union[str, date] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - tokenization_channel: Literal["DIGITAL_WALLET", "MERCHANT", "ALL"] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + begin: Union[str, date] | Omit = omit, + card_token: str | Omit = omit, + end: Union[str, date] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + tokenization_channel: Literal["DIGITAL_WALLET", "MERCHANT", "ALL"] | 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, ) -> SyncCursorPage[Tokenization]: """ List card tokenizations @@ -165,7 +165,7 @@ def activate( 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, ) -> None: """This endpoint is used to ask the card network to activate a tokenization. @@ -206,7 +206,7 @@ def deactivate( 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, ) -> None: """This endpoint is used to ask the card network to deactivate a tokenization. @@ -248,7 +248,7 @@ def pause( 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, ) -> None: """This endpoint is used to ask the card network to pause a tokenization. @@ -284,14 +284,13 @@ def resend_activation_code( self, tokenization_token: str, *, - activation_method_type: Literal["EMAIL_TO_CARDHOLDER_ADDRESS", "TEXT_TO_CARDHOLDER_NUMBER"] - | NotGiven = NOT_GIVEN, + activation_method_type: Literal["EMAIL_TO_CARDHOLDER_ADDRESS", "TEXT_TO_CARDHOLDER_NUMBER"] | 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, ) -> None: """ This endpoint is used to ask the card network to send another activation code to @@ -339,17 +338,16 @@ def simulate( expiration_date: str, pan: str, tokenization_source: Literal["APPLE_PAY", "GOOGLE", "SAMSUNG_PAY", "MERCHANT"], - account_score: int | NotGiven = NOT_GIVEN, - device_score: int | NotGiven = NOT_GIVEN, - entity: str | NotGiven = NOT_GIVEN, - wallet_recommended_decision: Literal["APPROVED", "DECLINED", "REQUIRE_ADDITIONAL_AUTHENTICATION"] - | NotGiven = NOT_GIVEN, + account_score: int | Omit = omit, + device_score: int | Omit = omit, + entity: str | Omit = omit, + wallet_recommended_decision: Literal["APPROVED", "DECLINED", "REQUIRE_ADDITIONAL_AUTHENTICATION"] | 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, ) -> TokenizationSimulateResponse: """ This endpoint is used to simulate a card's tokenization in the Digital Wallet @@ -413,7 +411,7 @@ def unpause( 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, ) -> None: """This endpoint is used to ask the card network to unpause a tokenization. @@ -448,13 +446,13 @@ def update_digital_card_art( self, tokenization_token: str, *, - digital_card_art_token: str | NotGiven = NOT_GIVEN, + digital_card_art_token: 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, ) -> TokenizationUpdateDigitalCardArtResponse: """ This endpoint is used update the digital card art for a digital wallet @@ -524,7 +522,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, ) -> Tokenization: """ Get tokenization @@ -551,20 +549,20 @@ async def retrieve( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - begin: Union[str, date] | NotGiven = NOT_GIVEN, - card_token: str | NotGiven = NOT_GIVEN, - end: Union[str, date] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - tokenization_channel: Literal["DIGITAL_WALLET", "MERCHANT", "ALL"] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + begin: Union[str, date] | Omit = omit, + card_token: str | Omit = omit, + end: Union[str, date] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + starting_after: str | Omit = omit, + tokenization_channel: Literal["DIGITAL_WALLET", "MERCHANT", "ALL"] | 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[Tokenization, AsyncCursorPage[Tokenization]]: """ List card tokenizations @@ -631,7 +629,7 @@ async def activate( 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, ) -> None: """This endpoint is used to ask the card network to activate a tokenization. @@ -672,7 +670,7 @@ async def deactivate( 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, ) -> None: """This endpoint is used to ask the card network to deactivate a tokenization. @@ -714,7 +712,7 @@ async def pause( 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, ) -> None: """This endpoint is used to ask the card network to pause a tokenization. @@ -750,14 +748,13 @@ async def resend_activation_code( self, tokenization_token: str, *, - activation_method_type: Literal["EMAIL_TO_CARDHOLDER_ADDRESS", "TEXT_TO_CARDHOLDER_NUMBER"] - | NotGiven = NOT_GIVEN, + activation_method_type: Literal["EMAIL_TO_CARDHOLDER_ADDRESS", "TEXT_TO_CARDHOLDER_NUMBER"] | 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, ) -> None: """ This endpoint is used to ask the card network to send another activation code to @@ -805,17 +802,16 @@ async def simulate( expiration_date: str, pan: str, tokenization_source: Literal["APPLE_PAY", "GOOGLE", "SAMSUNG_PAY", "MERCHANT"], - account_score: int | NotGiven = NOT_GIVEN, - device_score: int | NotGiven = NOT_GIVEN, - entity: str | NotGiven = NOT_GIVEN, - wallet_recommended_decision: Literal["APPROVED", "DECLINED", "REQUIRE_ADDITIONAL_AUTHENTICATION"] - | NotGiven = NOT_GIVEN, + account_score: int | Omit = omit, + device_score: int | Omit = omit, + entity: str | Omit = omit, + wallet_recommended_decision: Literal["APPROVED", "DECLINED", "REQUIRE_ADDITIONAL_AUTHENTICATION"] | 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, ) -> TokenizationSimulateResponse: """ This endpoint is used to simulate a card's tokenization in the Digital Wallet @@ -879,7 +875,7 @@ async def unpause( 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, ) -> None: """This endpoint is used to ask the card network to unpause a tokenization. @@ -914,13 +910,13 @@ async def update_digital_card_art( self, tokenization_token: str, *, - digital_card_art_token: str | NotGiven = NOT_GIVEN, + digital_card_art_token: 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, ) -> TokenizationUpdateDigitalCardArtResponse: """ This endpoint is used update the digital card art for a digital wallet diff --git a/src/lithic/resources/transactions/enhanced_commercial_data.py b/src/lithic/resources/transactions/enhanced_commercial_data.py index e4f2d464..10325b5d 100644 --- a/src/lithic/resources/transactions/enhanced_commercial_data.py +++ b/src/lithic/resources/transactions/enhanced_commercial_data.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 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, ) -> EnhancedCommercialDataRetrieveResponse: """Get all L2/L3 enhanced commercial data associated with a transaction. @@ -100,7 +100,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, ) -> EnhancedCommercialDataRetrieveResponse: """Get all L2/L3 enhanced commercial data associated with a transaction. diff --git a/src/lithic/resources/transactions/events/enhanced_commercial_data.py b/src/lithic/resources/transactions/events/enhanced_commercial_data.py index 6b604757..5d48cdb8 100644 --- a/src/lithic/resources/transactions/events/enhanced_commercial_data.py +++ b/src/lithic/resources/transactions/events/enhanced_commercial_data.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 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, ) -> EnhancedData: """Get L2/L3 enhanced commercial data associated with a transaction event. @@ -100,7 +100,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, ) -> EnhancedData: """Get L2/L3 enhanced commercial data associated with a transaction event. diff --git a/src/lithic/resources/transactions/transactions.py b/src/lithic/resources/transactions/transactions.py index bc5cee88..3993985b 100644 --- a/src/lithic/resources/transactions/transactions.py +++ b/src/lithic/resources/transactions/transactions.py @@ -21,7 +21,7 @@ transaction_simulate_credit_authorization_params, transaction_simulate_credit_authorization_advice_params, ) -from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven +from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -96,7 +96,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, ) -> Transaction: """Get a specific card transaction. @@ -125,21 +125,21 @@ def retrieve( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - card_token: str | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["PENDING", "VOIDED", "SETTLED", "DECLINED", "EXPIRED"] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + begin: Union[str, datetime] | Omit = omit, + card_token: str | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["PENDING", "VOIDED", "SETTLED", "DECLINED", "EXPIRED"] | 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, ) -> SyncCursorPage[Transaction]: """List card transactions. @@ -213,7 +213,7 @@ def expire_authorization( 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, ) -> None: """ Expire authorization @@ -243,12 +243,12 @@ def simulate_authorization( amount: int, descriptor: str, pan: str, - mcc: str | NotGiven = NOT_GIVEN, - merchant_acceptor_id: str | NotGiven = NOT_GIVEN, - merchant_amount: int | NotGiven = NOT_GIVEN, - merchant_currency: str | NotGiven = NOT_GIVEN, - partial_approval_capable: bool | NotGiven = NOT_GIVEN, - pin: str | NotGiven = NOT_GIVEN, + mcc: str | Omit = omit, + merchant_acceptor_id: str | Omit = omit, + merchant_amount: int | Omit = omit, + merchant_currency: str | Omit = omit, + partial_approval_capable: bool | Omit = omit, + pin: str | Omit = omit, status: Literal[ "AUTHORIZATION", "BALANCE_INQUIRY", @@ -256,13 +256,13 @@ def simulate_authorization( "FINANCIAL_AUTHORIZATION", "FINANCIAL_CREDIT_AUTHORIZATION", ] - | NotGiven = NOT_GIVEN, + | 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, ) -> TransactionSimulateAuthorizationResponse: """ Simulates an authorization request from the card network as if it came from a @@ -361,7 +361,7 @@ def simulate_authorization_advice( 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, ) -> TransactionSimulateAuthorizationAdviceResponse: """ Simulates an authorization advice from the card network as if it came from a @@ -401,13 +401,13 @@ def simulate_clearing( self, *, token: str, - amount: int | NotGiven = NOT_GIVEN, + amount: 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, ) -> TransactionSimulateClearingResponse: """Clears an existing authorization, either debit or credit. @@ -461,14 +461,14 @@ def simulate_credit_authorization( amount: int, descriptor: str, pan: str, - mcc: str | NotGiven = NOT_GIVEN, - merchant_acceptor_id: str | NotGiven = NOT_GIVEN, + mcc: str | Omit = omit, + merchant_acceptor_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, ) -> TransactionSimulateCreditAuthorizationResponse: """Simulates a credit authorization advice from the card network. @@ -522,14 +522,14 @@ def simulate_credit_authorization_advice( amount: int, descriptor: str, pan: str, - mcc: str | NotGiven = NOT_GIVEN, - merchant_acceptor_id: str | NotGiven = NOT_GIVEN, + mcc: str | Omit = omit, + merchant_acceptor_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, ) -> TransactionSimulateCreditAuthorizationAdviceResponse: """Simulates a credit authorization advice from the card network. @@ -588,7 +588,7 @@ def simulate_return( 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, ) -> TransactionSimulateReturnResponse: """Returns, or refunds, an amount back to a card. @@ -636,7 +636,7 @@ def simulate_return_reversal( 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, ) -> TransactionSimulateReturnReversalResponse: """Reverses a return, i.e. @@ -670,14 +670,14 @@ def simulate_void( self, *, token: str, - amount: int | NotGiven = NOT_GIVEN, - type: Literal["AUTHORIZATION_EXPIRY", "AUTHORIZATION_REVERSAL"] | NotGiven = NOT_GIVEN, + amount: int | Omit = omit, + type: Literal["AUTHORIZATION_EXPIRY", "AUTHORIZATION_REVERSAL"] | 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, ) -> TransactionSimulateVoidResponse: """Voids a pending authorization. @@ -690,7 +690,8 @@ def simulate_void( token: The transaction token returned from the /v1/simulate/authorize response. amount: Amount (in cents) to void. Typically this will match the amount in the original - authorization, but can be less. + authorization, but can be less. Applies to authorization reversals only. An + authorization expiry will always apply to the full pending amount. type: Type of event to simulate. Defaults to `AUTHORIZATION_REVERSAL`. @@ -760,7 +761,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, ) -> Transaction: """Get a specific card transaction. @@ -789,21 +790,21 @@ async def retrieve( def list( self, *, - account_token: str | NotGiven = NOT_GIVEN, - begin: Union[str, datetime] | NotGiven = NOT_GIVEN, - card_token: str | NotGiven = NOT_GIVEN, - end: Union[str, datetime] | NotGiven = NOT_GIVEN, - ending_before: str | NotGiven = NOT_GIVEN, - page_size: int | NotGiven = NOT_GIVEN, - result: Literal["APPROVED", "DECLINED"] | NotGiven = NOT_GIVEN, - starting_after: str | NotGiven = NOT_GIVEN, - status: Literal["PENDING", "VOIDED", "SETTLED", "DECLINED", "EXPIRED"] | NotGiven = NOT_GIVEN, + account_token: str | Omit = omit, + begin: Union[str, datetime] | Omit = omit, + card_token: str | Omit = omit, + end: Union[str, datetime] | Omit = omit, + ending_before: str | Omit = omit, + page_size: int | Omit = omit, + result: Literal["APPROVED", "DECLINED"] | Omit = omit, + starting_after: str | Omit = omit, + status: Literal["PENDING", "VOIDED", "SETTLED", "DECLINED", "EXPIRED"] | 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[Transaction, AsyncCursorPage[Transaction]]: """List card transactions. @@ -877,7 +878,7 @@ async def expire_authorization( 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, ) -> None: """ Expire authorization @@ -907,12 +908,12 @@ async def simulate_authorization( amount: int, descriptor: str, pan: str, - mcc: str | NotGiven = NOT_GIVEN, - merchant_acceptor_id: str | NotGiven = NOT_GIVEN, - merchant_amount: int | NotGiven = NOT_GIVEN, - merchant_currency: str | NotGiven = NOT_GIVEN, - partial_approval_capable: bool | NotGiven = NOT_GIVEN, - pin: str | NotGiven = NOT_GIVEN, + mcc: str | Omit = omit, + merchant_acceptor_id: str | Omit = omit, + merchant_amount: int | Omit = omit, + merchant_currency: str | Omit = omit, + partial_approval_capable: bool | Omit = omit, + pin: str | Omit = omit, status: Literal[ "AUTHORIZATION", "BALANCE_INQUIRY", @@ -920,13 +921,13 @@ async def simulate_authorization( "FINANCIAL_AUTHORIZATION", "FINANCIAL_CREDIT_AUTHORIZATION", ] - | NotGiven = NOT_GIVEN, + | 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, ) -> TransactionSimulateAuthorizationResponse: """ Simulates an authorization request from the card network as if it came from a @@ -1025,7 +1026,7 @@ async def simulate_authorization_advice( 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, ) -> TransactionSimulateAuthorizationAdviceResponse: """ Simulates an authorization advice from the card network as if it came from a @@ -1065,13 +1066,13 @@ async def simulate_clearing( self, *, token: str, - amount: int | NotGiven = NOT_GIVEN, + amount: 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, ) -> TransactionSimulateClearingResponse: """Clears an existing authorization, either debit or credit. @@ -1125,14 +1126,14 @@ async def simulate_credit_authorization( amount: int, descriptor: str, pan: str, - mcc: str | NotGiven = NOT_GIVEN, - merchant_acceptor_id: str | NotGiven = NOT_GIVEN, + mcc: str | Omit = omit, + merchant_acceptor_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, ) -> TransactionSimulateCreditAuthorizationResponse: """Simulates a credit authorization advice from the card network. @@ -1186,14 +1187,14 @@ async def simulate_credit_authorization_advice( amount: int, descriptor: str, pan: str, - mcc: str | NotGiven = NOT_GIVEN, - merchant_acceptor_id: str | NotGiven = NOT_GIVEN, + mcc: str | Omit = omit, + merchant_acceptor_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, ) -> TransactionSimulateCreditAuthorizationAdviceResponse: """Simulates a credit authorization advice from the card network. @@ -1252,7 +1253,7 @@ async def simulate_return( 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, ) -> TransactionSimulateReturnResponse: """Returns, or refunds, an amount back to a card. @@ -1300,7 +1301,7 @@ async def simulate_return_reversal( 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, ) -> TransactionSimulateReturnReversalResponse: """Reverses a return, i.e. @@ -1334,14 +1335,14 @@ async def simulate_void( self, *, token: str, - amount: int | NotGiven = NOT_GIVEN, - type: Literal["AUTHORIZATION_EXPIRY", "AUTHORIZATION_REVERSAL"] | NotGiven = NOT_GIVEN, + amount: int | Omit = omit, + type: Literal["AUTHORIZATION_EXPIRY", "AUTHORIZATION_REVERSAL"] | 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, ) -> TransactionSimulateVoidResponse: """Voids a pending authorization. @@ -1354,7 +1355,8 @@ async def simulate_void( token: The transaction token returned from the /v1/simulate/authorize response. amount: Amount (in cents) to void. Typically this will match the amount in the original - authorization, but can be less. + authorization, but can be less. Applies to authorization reversals only. An + authorization expiry will always apply to the full pending amount. type: Type of event to simulate. Defaults to `AUTHORIZATION_REVERSAL`. diff --git a/src/lithic/types/auth_rules/__init__.py b/src/lithic/types/auth_rules/__init__.py index 4f7231b5..ff8112ad 100644 --- a/src/lithic/types/auth_rules/__init__.py +++ b/src/lithic/types/auth_rules/__init__.py @@ -22,9 +22,11 @@ from .merchant_lock_parameters import MerchantLockParameters as MerchantLockParameters from .auth_rule_condition_param import AuthRuleConditionParam as AuthRuleConditionParam from .v2_retrieve_report_params import V2RetrieveReportParams as V2RetrieveReportParams +from .v2_retrieve_features_params import V2RetrieveFeaturesParams as V2RetrieveFeaturesParams from .v2_retrieve_report_response import V2RetrieveReportResponse as V2RetrieveReportResponse from .velocity_limit_params_param import VelocityLimitParamsParam as VelocityLimitParamsParam from .conditional_block_parameters import ConditionalBlockParameters as ConditionalBlockParameters +from .v2_retrieve_features_response import V2RetrieveFeaturesResponse as V2RetrieveFeaturesResponse from .merchant_lock_parameters_param import MerchantLockParametersParam as MerchantLockParametersParam from .conditional_3ds_action_parameters import Conditional3DSActionParameters as Conditional3DSActionParameters from .conditional_block_parameters_param import ConditionalBlockParametersParam as ConditionalBlockParametersParam diff --git a/src/lithic/types/auth_rules/v2_apply_response.py b/src/lithic/types/auth_rules/v2_apply_response.py index c9ea273a..968360a7 100644 --- a/src/lithic/types/auth_rules/v2_apply_response.py +++ b/src/lithic/types/auth_rules/v2_apply_response.py @@ -33,6 +33,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -70,6 +71,8 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -153,6 +156,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -190,6 +194,8 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -282,6 +288,12 @@ class V2ApplyResponse(BaseModel): event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] """The event stream during which the rule will be evaluated.""" + lithic_managed: bool + """Indicates whether this auth rule is managed by Lithic. + + If true, the rule cannot be modified or deleted by the user + """ + name: Optional[str] = None """Auth Rule Name""" diff --git a/src/lithic/types/auth_rules/v2_create_params.py b/src/lithic/types/auth_rules/v2_create_params.py index 9ba733e4..8fbca713 100644 --- a/src/lithic/types/auth_rules/v2_create_params.py +++ b/src/lithic/types/auth_rules/v2_create_params.py @@ -70,6 +70,7 @@ class CreateAuthRuleRequestAccountTokensParametersConditionalAuthorizationAction "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -106,6 +107,8 @@ class CreateAuthRuleRequestAccountTokensParametersConditionalAuthorizationAction fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -206,6 +209,7 @@ class CreateAuthRuleRequestCardTokensParametersConditionalAuthorizationActionPar "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -242,6 +246,8 @@ class CreateAuthRuleRequestCardTokensParametersConditionalAuthorizationActionPar fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -345,6 +351,7 @@ class CreateAuthRuleRequestProgramLevelParametersConditionalAuthorizationActionP "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -381,6 +388,8 @@ class CreateAuthRuleRequestProgramLevelParametersConditionalAuthorizationActionP fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, diff --git a/src/lithic/types/auth_rules/v2_create_response.py b/src/lithic/types/auth_rules/v2_create_response.py index 4dc59976..57c5f287 100644 --- a/src/lithic/types/auth_rules/v2_create_response.py +++ b/src/lithic/types/auth_rules/v2_create_response.py @@ -33,6 +33,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -70,6 +71,8 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -153,6 +156,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -190,6 +194,8 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -282,6 +288,12 @@ class V2CreateResponse(BaseModel): event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] """The event stream during which the rule will be evaluated.""" + lithic_managed: bool + """Indicates whether this auth rule is managed by Lithic. + + If true, the rule cannot be modified or deleted by the user + """ + name: Optional[str] = None """Auth Rule Name""" diff --git a/src/lithic/types/auth_rules/v2_draft_params.py b/src/lithic/types/auth_rules/v2_draft_params.py index bb192efa..aa2152ea 100644 --- a/src/lithic/types/auth_rules/v2_draft_params.py +++ b/src/lithic/types/auth_rules/v2_draft_params.py @@ -34,6 +34,7 @@ class ParametersConditionalAuthorizationActionParametersCondition(TypedDict, tot "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -70,6 +71,8 @@ class ParametersConditionalAuthorizationActionParametersCondition(TypedDict, tot fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, diff --git a/src/lithic/types/auth_rules/v2_draft_response.py b/src/lithic/types/auth_rules/v2_draft_response.py index 1411fe14..b0ce06d7 100644 --- a/src/lithic/types/auth_rules/v2_draft_response.py +++ b/src/lithic/types/auth_rules/v2_draft_response.py @@ -33,6 +33,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -70,6 +71,8 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -153,6 +156,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -190,6 +194,8 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -282,6 +288,12 @@ class V2DraftResponse(BaseModel): event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] """The event stream during which the rule will be evaluated.""" + lithic_managed: bool + """Indicates whether this auth rule is managed by Lithic. + + If true, the rule cannot be modified or deleted by the user + """ + name: Optional[str] = None """Auth Rule Name""" diff --git a/src/lithic/types/auth_rules/v2_list_response.py b/src/lithic/types/auth_rules/v2_list_response.py index bd76ba80..ddb4a535 100644 --- a/src/lithic/types/auth_rules/v2_list_response.py +++ b/src/lithic/types/auth_rules/v2_list_response.py @@ -33,6 +33,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -70,6 +71,8 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -153,6 +156,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -190,6 +194,8 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -282,6 +288,12 @@ class V2ListResponse(BaseModel): event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] """The event stream during which the rule will be evaluated.""" + lithic_managed: bool + """Indicates whether this auth rule is managed by Lithic. + + If true, the rule cannot be modified or deleted by the user + """ + name: Optional[str] = None """Auth Rule Name""" diff --git a/src/lithic/types/auth_rules/v2_promote_response.py b/src/lithic/types/auth_rules/v2_promote_response.py index 78681e67..a363c62d 100644 --- a/src/lithic/types/auth_rules/v2_promote_response.py +++ b/src/lithic/types/auth_rules/v2_promote_response.py @@ -33,6 +33,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -70,6 +71,8 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -153,6 +156,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -190,6 +194,8 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -282,6 +288,12 @@ class V2PromoteResponse(BaseModel): event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] """The event stream during which the rule will be evaluated.""" + lithic_managed: bool + """Indicates whether this auth rule is managed by Lithic. + + If true, the rule cannot be modified or deleted by the user + """ + name: Optional[str] = None """Auth Rule Name""" diff --git a/src/lithic/types/auth_rules/v2_retrieve_features_params.py b/src/lithic/types/auth_rules/v2_retrieve_features_params.py new file mode 100644 index 00000000..a0c4d812 --- /dev/null +++ b/src/lithic/types/auth_rules/v2_retrieve_features_params.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["V2RetrieveFeaturesParams"] + + +class V2RetrieveFeaturesParams(TypedDict, total=False): + account_token: str + + card_token: str diff --git a/src/lithic/types/auth_rules/v2_retrieve_features_response.py b/src/lithic/types/auth_rules/v2_retrieve_features_response.py new file mode 100644 index 00000000..fb1b6cb0 --- /dev/null +++ b/src/lithic/types/auth_rules/v2_retrieve_features_response.py @@ -0,0 +1,105 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import datetime +from typing_extensions import Literal + +from ..._models import BaseModel +from .velocity_limit_params_period_window import VelocityLimitParamsPeriodWindow + +__all__ = ["V2RetrieveFeaturesResponse", "Feature", "FeatureFilters", "FeatureValue"] + + +class FeatureFilters(BaseModel): + exclude_countries: Optional[List[str]] = None + """ISO-3166-1 alpha-3 Country Codes to exclude from the velocity calculation. + + Transactions matching any of the provided will be excluded from the calculated + velocity. + """ + + exclude_mccs: Optional[List[str]] = None + """Merchant Category Codes to exclude from the velocity calculation. + + Transactions matching this MCC will be excluded from the calculated velocity. + """ + + include_countries: Optional[List[str]] = None + """ISO-3166-1 alpha-3 Country Codes to include in the velocity calculation. + + Transactions not matching any of the provided will not be included in the + calculated velocity. + """ + + include_mccs: Optional[List[str]] = None + """Merchant Category Codes to include in the velocity calculation. + + Transactions not matching this MCC will not be included in the calculated + velocity. + """ + + include_pan_entry_modes: Optional[ + List[ + Literal[ + "AUTO_ENTRY", + "BAR_CODE", + "CONTACTLESS", + "CREDENTIAL_ON_FILE", + "ECOMMERCE", + "ERROR_KEYED", + "ERROR_MAGNETIC_STRIPE", + "ICC", + "KEY_ENTERED", + "MAGNETIC_STRIPE", + "MANUAL", + "OCR", + "SECURE_CARDLESS", + "UNSPECIFIED", + "UNKNOWN", + ] + ] + ] = None + """PAN entry modes to include in the velocity calculation. + + Transactions not matching any of the provided will not be included in the + calculated velocity. + """ + + +class FeatureValue(BaseModel): + amount: int + """ + Amount (in cents) for the given Auth Rule that is used as input for calculating + the rule. For Velocity Limit rules this would be the calculated Velocity. For + Conditional Rules using CARD*TRANSACTION_COUNT*\\** this will be 0 + """ + + count: int + """ + Number of velocity impacting transactions matching the given scope, period and + filters + """ + + +class Feature(BaseModel): + filters: FeatureFilters + + period: VelocityLimitParamsPeriodWindow + """DEPRECATED: This has been deprecated in favor of the Trailing Window Objects + + The size of the trailing window to calculate Spend Velocity over in seconds. The + minimum value is 10 seconds, and the maximum value is 2678400 seconds (31 days). + """ + + scope: Literal["CARD", "ACCOUNT"] + """The scope the velocity is calculated for""" + + value: FeatureValue + + +class V2RetrieveFeaturesResponse(BaseModel): + evaluated: datetime + """Timestamp at which the Features were evaluated""" + + features: List[Feature] + """Calculated Features used for evaluation of the provided Auth Rule""" diff --git a/src/lithic/types/auth_rules/v2_retrieve_response.py b/src/lithic/types/auth_rules/v2_retrieve_response.py index 05dd5847..1dc4e2a5 100644 --- a/src/lithic/types/auth_rules/v2_retrieve_response.py +++ b/src/lithic/types/auth_rules/v2_retrieve_response.py @@ -33,6 +33,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -70,6 +71,8 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -153,6 +156,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -190,6 +194,8 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -282,6 +288,12 @@ class V2RetrieveResponse(BaseModel): event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] """The event stream during which the rule will be evaluated.""" + lithic_managed: bool + """Indicates whether this auth rule is managed by Lithic. + + If true, the rule cannot be modified or deleted by the user + """ + name: Optional[str] = None """Auth Rule Name""" diff --git a/src/lithic/types/auth_rules/v2_update_response.py b/src/lithic/types/auth_rules/v2_update_response.py index d7626eac..5c90aa51 100644 --- a/src/lithic/types/auth_rules/v2_update_response.py +++ b/src/lithic/types/auth_rules/v2_update_response.py @@ -33,6 +33,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -70,6 +71,8 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -153,6 +156,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "LIABILITY_SHIFT", "PAN_ENTRY_MODE", "TRANSACTION_AMOUNT", + "CASH_AMOUNT", "RISK_SCORE", "CARD_TRANSACTION_COUNT_15M", "CARD_TRANSACTION_COUNT_1H", @@ -190,6 +194,8 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba fee field in the settlement/cardholder billing currency. This is the amount the issuer should authorize against unless the issuer is paying the acquirer fee on behalf of the cardholder. + - `CASH_AMOUNT`: The cash amount of the transaction in minor units (cents). This + represents the amount of cash being withdrawn or advanced. - `RISK_SCORE`: Network-provided score assessing risk level associated with a given authorization. Scores are on a range of 0-999, with 0 representing the lowest risk and 999 representing the highest risk. For Visa transactions, @@ -282,6 +288,12 @@ class V2UpdateResponse(BaseModel): event_stream: Literal["AUTHORIZATION", "THREE_DS_AUTHENTICATION"] """The event stream during which the rule will be evaluated.""" + lithic_managed: bool + """Indicates whether this auth rule is managed by Lithic. + + If true, the rule cannot be modified or deleted by the user + """ + name: Optional[str] = None """Auth Rule Name""" diff --git a/src/lithic/types/auth_rules/velocity_limit_params.py b/src/lithic/types/auth_rules/velocity_limit_params.py index 85dd1585..aed74ac1 100644 --- a/src/lithic/types/auth_rules/velocity_limit_params.py +++ b/src/lithic/types/auth_rules/velocity_limit_params.py @@ -37,18 +37,46 @@ class Filters(BaseModel): velocity. """ + include_pan_entry_modes: Optional[ + List[ + Literal[ + "AUTO_ENTRY", + "BAR_CODE", + "CONTACTLESS", + "CREDENTIAL_ON_FILE", + "ECOMMERCE", + "ERROR_KEYED", + "ERROR_MAGNETIC_STRIPE", + "ICC", + "KEY_ENTERED", + "MAGNETIC_STRIPE", + "MANUAL", + "OCR", + "SECURE_CARDLESS", + "UNSPECIFIED", + "UNKNOWN", + ] + ] + ] = None + """PAN entry modes to include in the velocity calculation. + + Transactions not matching any of the provided will not be included in the + calculated velocity. + """ + class VelocityLimitParams(BaseModel): filters: Filters period: VelocityLimitParamsPeriodWindow - """The size of the trailing window to calculate Spend Velocity over in seconds. + """DEPRECATED: This has been deprecated in favor of the Trailing Window Objects - The minimum value is 10 seconds, and the maximum value is 2678400 seconds (31 - days). + The size of the trailing window to calculate Spend Velocity over in seconds. The + minimum value is 10 seconds, and the maximum value is 2678400 seconds (31 days). """ scope: Literal["CARD", "ACCOUNT"] + """The scope the velocity is calculated for""" limit_amount: Optional[int] = None """ diff --git a/src/lithic/types/auth_rules/velocity_limit_params_param.py b/src/lithic/types/auth_rules/velocity_limit_params_param.py index 4faee40f..c8321357 100644 --- a/src/lithic/types/auth_rules/velocity_limit_params_param.py +++ b/src/lithic/types/auth_rules/velocity_limit_params_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Optional +from typing import List, Optional from typing_extensions import Literal, Required, TypedDict from ..._types import SequenceNotStr @@ -39,18 +39,46 @@ class Filters(TypedDict, total=False): velocity. """ + include_pan_entry_modes: Optional[ + List[ + Literal[ + "AUTO_ENTRY", + "BAR_CODE", + "CONTACTLESS", + "CREDENTIAL_ON_FILE", + "ECOMMERCE", + "ERROR_KEYED", + "ERROR_MAGNETIC_STRIPE", + "ICC", + "KEY_ENTERED", + "MAGNETIC_STRIPE", + "MANUAL", + "OCR", + "SECURE_CARDLESS", + "UNSPECIFIED", + "UNKNOWN", + ] + ] + ] + """PAN entry modes to include in the velocity calculation. + + Transactions not matching any of the provided will not be included in the + calculated velocity. + """ + class VelocityLimitParamsParam(TypedDict, total=False): filters: Required[Filters] period: Required[VelocityLimitParamsPeriodWindowParam] - """The size of the trailing window to calculate Spend Velocity over in seconds. + """DEPRECATED: This has been deprecated in favor of the Trailing Window Objects - The minimum value is 10 seconds, and the maximum value is 2678400 seconds (31 - days). + The size of the trailing window to calculate Spend Velocity over in seconds. The + minimum value is 10 seconds, and the maximum value is 2678400 seconds (31 days). """ scope: Required[Literal["CARD", "ACCOUNT"]] + """The scope the velocity is calculated for""" limit_amount: Optional[int] """ diff --git a/src/lithic/types/transaction_simulate_void_params.py b/src/lithic/types/transaction_simulate_void_params.py index e5b10ea9..950cfe80 100644 --- a/src/lithic/types/transaction_simulate_void_params.py +++ b/src/lithic/types/transaction_simulate_void_params.py @@ -15,7 +15,8 @@ class TransactionSimulateVoidParams(TypedDict, total=False): """Amount (in cents) to void. Typically this will match the amount in the original authorization, but can be - less. + less. Applies to authorization reversals only. An authorization expiry will + always apply to the full pending amount. """ type: Literal["AUTHORIZATION_EXPIRY", "AUTHORIZATION_REVERSAL"] diff --git a/tests/api_resources/auth_rules/test_v2.py b/tests/api_resources/auth_rules/test_v2.py index 2cf7c36e..4f1d02c5 100644 --- a/tests/api_resources/auth_rules/test_v2.py +++ b/tests/api_resources/auth_rules/test_v2.py @@ -21,6 +21,7 @@ V2PromoteResponse, V2RetrieveResponse, V2RetrieveReportResponse, + V2RetrieveFeaturesResponse, ) # pyright: reportDeprecated=false @@ -777,6 +778,53 @@ def test_path_params_report(self, client: Lithic) -> None: "", ) + @parametrize + def test_method_retrieve_features(self, client: Lithic) -> None: + v2 = client.auth_rules.v2.retrieve_features( + auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(V2RetrieveFeaturesResponse, v2, path=["response"]) + + @parametrize + def test_method_retrieve_features_with_all_params(self, client: Lithic) -> None: + v2 = client.auth_rules.v2.retrieve_features( + auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(V2RetrieveFeaturesResponse, v2, path=["response"]) + + @parametrize + def test_raw_response_retrieve_features(self, client: Lithic) -> None: + response = client.auth_rules.v2.with_raw_response.retrieve_features( + auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + v2 = response.parse() + assert_matches_type(V2RetrieveFeaturesResponse, v2, path=["response"]) + + @parametrize + def test_streaming_response_retrieve_features(self, client: Lithic) -> None: + with client.auth_rules.v2.with_streaming_response.retrieve_features( + auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + v2 = response.parse() + assert_matches_type(V2RetrieveFeaturesResponse, v2, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve_features(self, client: Lithic) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `auth_rule_token` but received ''"): + client.auth_rules.v2.with_raw_response.retrieve_features( + auth_rule_token="", + ) + @parametrize def test_method_retrieve_report(self, client: Lithic) -> None: v2 = client.auth_rules.v2.retrieve_report( @@ -1575,6 +1623,53 @@ async def test_path_params_report(self, async_client: AsyncLithic) -> None: "", ) + @parametrize + async def test_method_retrieve_features(self, async_client: AsyncLithic) -> None: + v2 = await async_client.auth_rules.v2.retrieve_features( + auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(V2RetrieveFeaturesResponse, v2, path=["response"]) + + @parametrize + async def test_method_retrieve_features_with_all_params(self, async_client: AsyncLithic) -> None: + v2 = await async_client.auth_rules.v2.retrieve_features( + auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + assert_matches_type(V2RetrieveFeaturesResponse, v2, path=["response"]) + + @parametrize + async def test_raw_response_retrieve_features(self, async_client: AsyncLithic) -> None: + response = await async_client.auth_rules.v2.with_raw_response.retrieve_features( + auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + v2 = response.parse() + assert_matches_type(V2RetrieveFeaturesResponse, v2, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve_features(self, async_client: AsyncLithic) -> None: + async with async_client.auth_rules.v2.with_streaming_response.retrieve_features( + auth_rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + v2 = await response.parse() + assert_matches_type(V2RetrieveFeaturesResponse, v2, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve_features(self, async_client: AsyncLithic) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `auth_rule_token` but received ''"): + await async_client.auth_rules.v2.with_raw_response.retrieve_features( + auth_rule_token="", + ) + @parametrize async def test_method_retrieve_report(self, async_client: AsyncLithic) -> None: v2 = await async_client.auth_rules.v2.retrieve_report( diff --git a/tests/api_resources/fraud/test_transactions.py b/tests/api_resources/fraud/test_transactions.py index 6bd76dc0..73188a6e 100644 --- a/tests/api_resources/fraud/test_transactions.py +++ b/tests/api_resources/fraud/test_transactions.py @@ -20,14 +20,14 @@ class TestTransactions: @parametrize def test_method_retrieve(self, client: Lithic) -> None: transaction = client.fraud.transactions.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert_matches_type(TransactionRetrieveResponse, transaction, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Lithic) -> None: response = client.fraud.transactions.with_raw_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_retrieve(self, client: Lithic) -> None: @parametrize def test_streaming_response_retrieve(self, client: Lithic) -> None: with client.fraud.transactions.with_streaming_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -116,14 +116,14 @@ class TestAsyncTransactions: @parametrize async def test_method_retrieve(self, async_client: AsyncLithic) -> None: transaction = await async_client.fraud.transactions.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert_matches_type(TransactionRetrieveResponse, transaction, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncLithic) -> None: response = await async_client.fraud.transactions.with_raw_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert response.is_closed is True @@ -134,7 +134,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncLithic) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncLithic) -> None: async with async_client.fraud.transactions.with_streaming_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/reports/test_settlement.py b/tests/api_resources/reports/test_settlement.py index b3d5c3d6..3e9243a4 100644 --- a/tests/api_resources/reports/test_settlement.py +++ b/tests/api_resources/reports/test_settlement.py @@ -70,14 +70,14 @@ def test_path_params_list_details(self, client: Lithic) -> None: @parametrize def test_method_summary(self, client: Lithic) -> None: settlement = client.reports.settlement.summary( - parse_date("2019-12-27"), + parse_date("2023-09-01"), ) assert_matches_type(SettlementReport, settlement, path=["response"]) @parametrize def test_raw_response_summary(self, client: Lithic) -> None: response = client.reports.settlement.with_raw_response.summary( - parse_date("2019-12-27"), + parse_date("2023-09-01"), ) assert response.is_closed is True @@ -88,7 +88,7 @@ def test_raw_response_summary(self, client: Lithic) -> None: @parametrize def test_streaming_response_summary(self, client: Lithic) -> None: with client.reports.settlement.with_streaming_response.summary( - parse_date("2019-12-27"), + parse_date("2023-09-01"), ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -162,14 +162,14 @@ async def test_path_params_list_details(self, async_client: AsyncLithic) -> None @parametrize async def test_method_summary(self, async_client: AsyncLithic) -> None: settlement = await async_client.reports.settlement.summary( - parse_date("2019-12-27"), + parse_date("2023-09-01"), ) assert_matches_type(SettlementReport, settlement, path=["response"]) @parametrize async def test_raw_response_summary(self, async_client: AsyncLithic) -> None: response = await async_client.reports.settlement.with_raw_response.summary( - parse_date("2019-12-27"), + parse_date("2023-09-01"), ) assert response.is_closed is True @@ -180,7 +180,7 @@ async def test_raw_response_summary(self, async_client: AsyncLithic) -> None: @parametrize async def test_streaming_response_summary(self, async_client: AsyncLithic) -> None: async with async_client.reports.settlement.with_streaming_response.summary( - parse_date("2019-12-27"), + parse_date("2023-09-01"), ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index cf1c0ea1..3f40b577 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -112,14 +112,14 @@ def test_streaming_response_list(self, client: Lithic) -> None: @parametrize def test_method_expire_authorization(self, client: Lithic) -> None: transaction = client.transactions.expire_authorization( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert transaction is None @parametrize def test_raw_response_expire_authorization(self, client: Lithic) -> None: response = client.transactions.with_raw_response.expire_authorization( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert response.is_closed is True @@ -130,7 +130,7 @@ def test_raw_response_expire_authorization(self, client: Lithic) -> None: @parametrize def test_streaming_response_expire_authorization(self, client: Lithic) -> None: with client.transactions.with_streaming_response.expire_authorization( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -570,14 +570,14 @@ async def test_streaming_response_list(self, async_client: AsyncLithic) -> None: @parametrize async def test_method_expire_authorization(self, async_client: AsyncLithic) -> None: transaction = await async_client.transactions.expire_authorization( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert transaction is None @parametrize async def test_raw_response_expire_authorization(self, async_client: AsyncLithic) -> None: response = await async_client.transactions.with_raw_response.expire_authorization( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert response.is_closed is True @@ -588,7 +588,7 @@ async def test_raw_response_expire_authorization(self, async_client: AsyncLithic @parametrize async def test_streaming_response_expire_authorization(self, async_client: AsyncLithic) -> None: async with async_client.transactions.with_streaming_response.expire_authorization( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/transactions/events/test_enhanced_commercial_data.py b/tests/api_resources/transactions/events/test_enhanced_commercial_data.py index b668d10f..bf35d51f 100644 --- a/tests/api_resources/transactions/events/test_enhanced_commercial_data.py +++ b/tests/api_resources/transactions/events/test_enhanced_commercial_data.py @@ -20,14 +20,14 @@ class TestEnhancedCommercialData: @parametrize def test_method_retrieve(self, client: Lithic) -> None: enhanced_commercial_data = client.transactions.events.enhanced_commercial_data.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert_matches_type(EnhancedData, enhanced_commercial_data, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Lithic) -> None: response = client.transactions.events.enhanced_commercial_data.with_raw_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_retrieve(self, client: Lithic) -> None: @parametrize def test_streaming_response_retrieve(self, client: Lithic) -> None: with client.transactions.events.enhanced_commercial_data.with_streaming_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,14 +64,14 @@ class TestAsyncEnhancedCommercialData: @parametrize async def test_method_retrieve(self, async_client: AsyncLithic) -> None: enhanced_commercial_data = await async_client.transactions.events.enhanced_commercial_data.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert_matches_type(EnhancedData, enhanced_commercial_data, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncLithic) -> None: response = await async_client.transactions.events.enhanced_commercial_data.with_raw_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert response.is_closed is True @@ -82,7 +82,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncLithic) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncLithic) -> None: async with async_client.transactions.events.enhanced_commercial_data.with_streaming_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/transactions/test_enhanced_commercial_data.py b/tests/api_resources/transactions/test_enhanced_commercial_data.py index bd9a2e4b..fe90ee11 100644 --- a/tests/api_resources/transactions/test_enhanced_commercial_data.py +++ b/tests/api_resources/transactions/test_enhanced_commercial_data.py @@ -20,14 +20,14 @@ class TestEnhancedCommercialData: @parametrize def test_method_retrieve(self, client: Lithic) -> None: enhanced_commercial_data = client.transactions.enhanced_commercial_data.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert_matches_type(EnhancedCommercialDataRetrieveResponse, enhanced_commercial_data, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Lithic) -> None: response = client.transactions.enhanced_commercial_data.with_raw_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_retrieve(self, client: Lithic) -> None: @parametrize def test_streaming_response_retrieve(self, client: Lithic) -> None: with client.transactions.enhanced_commercial_data.with_streaming_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,14 +64,14 @@ class TestAsyncEnhancedCommercialData: @parametrize async def test_method_retrieve(self, async_client: AsyncLithic) -> None: enhanced_commercial_data = await async_client.transactions.enhanced_commercial_data.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert_matches_type(EnhancedCommercialDataRetrieveResponse, enhanced_commercial_data, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncLithic) -> None: response = await async_client.transactions.enhanced_commercial_data.with_raw_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) assert response.is_closed is True @@ -82,7 +82,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncLithic) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncLithic) -> None: async with async_client.transactions.enhanced_commercial_data.with_streaming_response.retrieve( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + "00000000-0000-0000-0000-000000000000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/test_transform.py b/tests/test_transform.py index eca75102..5c132ac3 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -8,7 +8,7 @@ import pytest -from lithic._types import NOT_GIVEN, Base64FileInput +from lithic._types import Base64FileInput, omit, not_given from lithic._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) == {}