diff --git a/.stats.yml b/.stats.yml index 50996d497..3a1f74774 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1 @@ -configured_endpoints: 134 +configured_endpoints: 137 diff --git a/api.md b/api.md index 6804c07a6..1d996d84a 100644 --- a/api.md +++ b/api.md @@ -155,6 +155,19 @@ Methods: - client.card_profiles.retrieve(card_profile_id) -> CardProfile - client.card_profiles.list(\*\*params) -> SyncPage[CardProfile] +# CardPurchaseSupplements + +Types: + +```python +from increase.types import CardPurchaseSupplement +``` + +Methods: + +- client.card_purchase_supplements.retrieve(card_purchase_supplement_id) -> CardPurchaseSupplement +- client.card_purchase_supplements.list(\*\*params) -> SyncPage[CardPurchaseSupplement] + # ExternalAccounts Types: @@ -386,6 +399,12 @@ Methods: - client.entities.retrieve(entity_id) -> Entity - client.entities.list(\*\*params) -> SyncPage[Entity] +## BeneficialOwners + +Methods: + +- client.entities.beneficial_owners.create(entity_id, \*\*params) -> Entity + ## SupplementalDocuments Types: diff --git a/poetry.lock b/poetry.lock index c829dde95..69f0fe0a7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. +# This file is automatically @generated by Poetry 1.5.0 and should not be changed by hand. [[package]] name = "anyio" version = "3.6.2" description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "main" optional = false python-versions = ">=3.6.2" files = [ @@ -26,7 +25,6 @@ trio = ["trio (>=0.16,<0.22)"] name = "atomicwrites" version = "1.4.1" description = "Atomic file writes." -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -37,7 +35,6 @@ files = [ name = "attrs" version = "22.1.0" description = "Classes Without Boilerplate" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -55,7 +52,6 @@ tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy name = "black" version = "22.10.0" description = "The uncompromising code formatter." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -101,7 +97,6 @@ uvloop = ["uvloop (>=0.15.2)"] name = "certifi" version = "2022.9.24" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -113,7 +108,6 @@ files = [ name = "click" version = "8.1.3" description = "Composable command line interface toolkit" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -129,7 +123,6 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -141,7 +134,6 @@ files = [ name = "distro" version = "1.8.0" description = "Distro - an OS platform information API" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -153,7 +145,6 @@ files = [ name = "h11" version = "0.12.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -165,7 +156,6 @@ files = [ name = "httpcore" version = "0.15.0" description = "A minimal low-level HTTP client." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -174,20 +164,19 @@ files = [ ] [package.dependencies] -anyio = ">=3.0.0,<4.0.0" +anyio = "==3.*" certifi = "*" h11 = ">=0.11,<0.13" -sniffio = ">=1.0.0,<2.0.0" +sniffio = "==1.*" [package.extras] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "httpx" version = "0.23.0" description = "The next generation HTTP client." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -203,15 +192,14 @@ sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] -cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<13)"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<13)"] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -223,7 +211,6 @@ files = [ name = "importlib-metadata" version = "5.0.0" description = "Read metadata from Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -244,7 +231,6 @@ testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packag name = "iniconfig" version = "1.1.1" description = "iniconfig: brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = "*" files = [ @@ -256,7 +242,6 @@ files = [ name = "isort" version = "5.10.1" description = "A Python utility / library to sort Python imports." -category = "dev" optional = false python-versions = ">=3.6.1,<4.0" files = [ @@ -274,7 +259,6 @@ requirements-deprecated-finder = ["pip-api", "pipreqs"] name = "mypy" version = "1.4.1" description = "Optional static typing for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -322,7 +306,6 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -334,7 +317,6 @@ files = [ name = "nodeenv" version = "1.7.0" description = "Node.js virtual environment builder" -category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" files = [ @@ -349,7 +331,6 @@ setuptools = "*" name = "packaging" version = "21.3" description = "Core utilities for Python packages" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -364,7 +345,6 @@ pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" name = "pathspec" version = "0.10.1" description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -376,7 +356,6 @@ files = [ name = "platformdirs" version = "2.5.2" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -392,7 +371,6 @@ test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -411,7 +389,6 @@ testing = ["pytest", "pytest-benchmark"] name = "py" version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -423,7 +400,6 @@ files = [ name = "pydantic" version = "1.10.12" description = "Data validation and settings management using python type hints" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -476,7 +452,6 @@ email = ["email-validator (>=1.0.3)"] name = "pyparsing" version = "3.0.9" description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "dev" optional = false python-versions = ">=3.6.8" files = [ @@ -491,7 +466,6 @@ diagrams = ["jinja2", "railroad-diagrams"] name = "pyright" version = "1.1.318" description = "Command line wrapper for pyright" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -511,7 +485,6 @@ dev = ["twine (>=3.4.1)"] name = "pytest" version = "7.1.1" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -537,7 +510,6 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2. name = "pytest-asyncio" version = "0.18.3" description = "Pytest support for asyncio" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -557,7 +529,6 @@ testing = ["coverage (==6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -572,7 +543,6 @@ six = ">=1.5" name = "respx" version = "0.19.2" description = "A utility for mocking out the Python HTTPX and HTTP Core libraries." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -587,7 +557,6 @@ httpx = ">=0.21.0" name = "rfc3986" version = "1.5.0" description = "Validating URI References per RFC 3986" -category = "main" optional = false python-versions = "*" files = [ @@ -605,7 +574,6 @@ idna2008 = ["idna"] name = "ruff" version = "0.0.239" description = "An extremely fast Python linter, written in Rust." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -631,7 +599,6 @@ files = [ name = "setuptools" version = "67.4.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -648,7 +615,6 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -660,7 +626,6 @@ files = [ name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -672,7 +637,6 @@ files = [ name = "time-machine" version = "2.9.0" description = "Travel through time in your tests." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -738,7 +702,6 @@ python-dateutil = "*" name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -750,7 +713,6 @@ files = [ name = "typed-ast" version = "1.5.4" description = "a fork of Python 2 and 3 ast modules with type comment support" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -784,7 +746,6 @@ files = [ name = "typing-extensions" version = "4.7.1" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -796,7 +757,6 @@ files = [ name = "zipp" version = "3.10.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "dev" optional = false python-versions = ">=3.7" files = [ diff --git a/src/increase/_client.py b/src/increase/_client.py index 1cb7f54e8..04a1677c2 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -63,6 +63,7 @@ class Increase(SyncAPIClient): cards: resources.Cards card_disputes: resources.CardDisputes card_profiles: resources.CardProfiles + card_purchase_supplements: resources.CardPurchaseSupplements external_accounts: resources.ExternalAccounts exports: resources.Exports digital_wallet_tokens: resources.DigitalWalletTokens @@ -167,6 +168,7 @@ def __init__( self.cards = resources.Cards(self) self.card_disputes = resources.CardDisputes(self) self.card_profiles = resources.CardProfiles(self) + self.card_purchase_supplements = resources.CardPurchaseSupplements(self) self.external_accounts = resources.ExternalAccounts(self) self.exports = resources.Exports(self) self.digital_wallet_tokens = resources.DigitalWalletTokens(self) @@ -343,6 +345,7 @@ class AsyncIncrease(AsyncAPIClient): cards: resources.AsyncCards card_disputes: resources.AsyncCardDisputes card_profiles: resources.AsyncCardProfiles + card_purchase_supplements: resources.AsyncCardPurchaseSupplements external_accounts: resources.AsyncExternalAccounts exports: resources.AsyncExports digital_wallet_tokens: resources.AsyncDigitalWalletTokens @@ -447,6 +450,7 @@ def __init__( self.cards = resources.AsyncCards(self) self.card_disputes = resources.AsyncCardDisputes(self) self.card_profiles = resources.AsyncCardProfiles(self) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplements(self) self.external_accounts = resources.AsyncExternalAccounts(self) self.exports = resources.AsyncExports(self) self.digital_wallet_tokens = resources.AsyncDigitalWalletTokens(self) diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 0cdd7493c..7d52fa418 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -35,6 +35,10 @@ from .digital_wallet_tokens import DigitalWalletTokens, AsyncDigitalWalletTokens from .bookkeeping_entry_sets import BookkeepingEntrySets, AsyncBookkeepingEntrySets from .wire_drawdown_requests import WireDrawdownRequests, AsyncWireDrawdownRequests +from .card_purchase_supplements import ( + CardPurchaseSupplements, + AsyncCardPurchaseSupplements, +) from .inbound_ach_transfer_returns import ( InboundACHTransferReturns, AsyncInboundACHTransferReturns, @@ -71,6 +75,8 @@ "AsyncCardDisputes", "CardProfiles", "AsyncCardProfiles", + "CardPurchaseSupplements", + "AsyncCardPurchaseSupplements", "ExternalAccounts", "AsyncExternalAccounts", "Exports", diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py new file mode 100644 index 000000000..5cbacc8bc --- /dev/null +++ b/src/increase/resources/card_purchase_supplements.py @@ -0,0 +1,192 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from ..types import CardPurchaseSupplement, card_purchase_supplement_list_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import maybe_transform +from .._resource import SyncAPIResource, AsyncAPIResource +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options + +__all__ = ["CardPurchaseSupplements", "AsyncCardPurchaseSupplements"] + + +class CardPurchaseSupplements(SyncAPIResource): + def retrieve( + self, + card_purchase_supplement_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | None | NotGiven = NOT_GIVEN, + ) -> CardPurchaseSupplement: + """ + Retrieve a Card Purchase Supplement + + Args: + card_purchase_supplement_id: The identifier of the Card Purchase Supplement. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + f"/card_purchase_supplements/{card_purchase_supplement_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardPurchaseSupplement, + ) + + def list( + self, + *, + card_payment_id: str | NotGiven = NOT_GIVEN, + created_at: card_purchase_supplement_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | None | NotGiven = NOT_GIVEN, + ) -> SyncPage[CardPurchaseSupplement]: + """ + List Card Purchase Supplements + + Args: + card_payment_id: Filter Card Purchase Supplements to ones belonging to the specified Card + Payment. + + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/card_purchase_supplements", + page=SyncPage[CardPurchaseSupplement], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "card_payment_id": card_payment_id, + "created_at": created_at, + "cursor": cursor, + "limit": limit, + }, + card_purchase_supplement_list_params.CardPurchaseSupplementListParams, + ), + ), + model=CardPurchaseSupplement, + ) + + +class AsyncCardPurchaseSupplements(AsyncAPIResource): + async def retrieve( + self, + card_purchase_supplement_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | None | NotGiven = NOT_GIVEN, + ) -> CardPurchaseSupplement: + """ + Retrieve a Card Purchase Supplement + + Args: + card_purchase_supplement_id: The identifier of the Card Purchase Supplement. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._get( + f"/card_purchase_supplements/{card_purchase_supplement_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardPurchaseSupplement, + ) + + def list( + self, + *, + card_payment_id: str | NotGiven = NOT_GIVEN, + created_at: card_purchase_supplement_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[CardPurchaseSupplement, AsyncPage[CardPurchaseSupplement]]: + """ + List Card Purchase Supplements + + Args: + card_payment_id: Filter Card Purchase Supplements to ones belonging to the specified Card + Payment. + + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/card_purchase_supplements", + page=AsyncPage[CardPurchaseSupplement], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "card_payment_id": card_payment_id, + "created_at": created_at, + "cursor": cursor, + "limit": limit, + }, + card_purchase_supplement_list_params.CardPurchaseSupplementListParams, + ), + ), + model=CardPurchaseSupplement, + ) diff --git a/src/increase/resources/entities/__init__.py b/src/increase/resources/entities/__init__.py index f83efad09..6d9e0b78a 100644 --- a/src/increase/resources/entities/__init__.py +++ b/src/increase/resources/entities/__init__.py @@ -1,6 +1,14 @@ # File generated from our OpenAPI spec by Stainless. from .entities import Entities, AsyncEntities +from .beneficial_owners import BeneficialOwners, AsyncBeneficialOwners from .supplemental_documents import SupplementalDocuments, AsyncSupplementalDocuments -__all__ = ["SupplementalDocuments", "AsyncSupplementalDocuments", "Entities", "AsyncEntities"] +__all__ = [ + "BeneficialOwners", + "AsyncBeneficialOwners", + "SupplementalDocuments", + "AsyncSupplementalDocuments", + "Entities", + "AsyncEntities", +] diff --git a/src/increase/resources/entities/beneficial_owners.py b/src/increase/resources/entities/beneficial_owners.py new file mode 100644 index 000000000..bb9b02746 --- /dev/null +++ b/src/increase/resources/entities/beneficial_owners.py @@ -0,0 +1,110 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from ...types import Entity +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import maybe_transform +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._base_client import make_request_options +from ...types.entities import beneficial_owner_create_params + +__all__ = ["BeneficialOwners", "AsyncBeneficialOwners"] + + +class BeneficialOwners(SyncAPIResource): + def create( + self, + entity_id: str, + *, + beneficial_owner: beneficial_owner_create_params.BeneficialOwner, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Create a beneficial owner for a corporate Entity + + Args: + entity_id: The identifier of the Entity to retrieve. + + beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + 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 + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + f"/entities/{entity_id}/beneficial_owners", + body=maybe_transform( + {"beneficial_owner": beneficial_owner}, beneficial_owner_create_params.BeneficialOwnerCreateParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + +class AsyncBeneficialOwners(AsyncAPIResource): + async def create( + self, + entity_id: str, + *, + beneficial_owner: beneficial_owner_create_params.BeneficialOwner, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Create a beneficial owner for a corporate Entity + + Args: + entity_id: The identifier of the Entity to retrieve. + + beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + 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 + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + f"/entities/{entity_id}/beneficial_owners", + body=maybe_transform( + {"beneficial_owner": beneficial_owner}, beneficial_owner_create_params.BeneficialOwnerCreateParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) diff --git a/src/increase/resources/entities/entities.py b/src/increase/resources/entities/entities.py index c329126d8..0c5df8b5a 100644 --- a/src/increase/resources/entities/entities.py +++ b/src/increase/resources/entities/entities.py @@ -11,6 +11,7 @@ from ..._resource import SyncAPIResource, AsyncAPIResource from ...pagination import SyncPage, AsyncPage from ..._base_client import AsyncPaginator, make_request_options +from .beneficial_owners import BeneficialOwners, AsyncBeneficialOwners from .supplemental_documents import SupplementalDocuments, AsyncSupplementalDocuments if TYPE_CHECKING: @@ -20,10 +21,12 @@ class Entities(SyncAPIResource): + beneficial_owners: BeneficialOwners supplemental_documents: SupplementalDocuments def __init__(self, client: Increase) -> None: super().__init__(client) + self.beneficial_owners = BeneficialOwners(client) self.supplemental_documents = SupplementalDocuments(client) def create( @@ -201,10 +204,12 @@ def list( class AsyncEntities(AsyncAPIResource): + beneficial_owners: AsyncBeneficialOwners supplemental_documents: AsyncSupplementalDocuments def __init__(self, client: AsyncIncrease) -> None: super().__init__(client) + self.beneficial_owners = AsyncBeneficialOwners(client) self.supplemental_documents = AsyncSupplementalDocuments(client) async def create( diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py index 3404d3ea0..43e268a25 100644 --- a/src/increase/resources/simulations/interest_payments.py +++ b/src/increase/resources/simulations/interest_payments.py @@ -2,6 +2,9 @@ from __future__ import annotations +from typing import Union +from datetime import datetime + from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource @@ -20,6 +23,8 @@ def create( *, account_id: str, amount: int, + period_end: Union[str, datetime] | NotGiven = NOT_GIVEN, + period_start: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -38,6 +43,10 @@ def create( amount: The interest amount in cents. Must be positive. + period_end: The end of the interest period. If not provided, defaults to the current time. + + period_start: The start of the interest period. If not provided, defaults to the current time. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -54,6 +63,8 @@ def create( { "account_id": account_id, "amount": amount, + "period_end": period_end, + "period_start": period_start, }, interest_payment_create_params.InterestPaymentCreateParams, ), @@ -74,6 +85,8 @@ async def create( *, account_id: str, amount: int, + period_end: Union[str, datetime] | NotGiven = NOT_GIVEN, + period_start: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -92,6 +105,10 @@ async def create( amount: The interest amount in cents. Must be positive. + period_end: The end of the interest period. If not provided, defaults to the current time. + + period_start: The start of the interest period. If not provided, defaults to the current time. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -108,6 +125,8 @@ async def create( { "account_id": account_id, "amount": amount, + "period_end": period_end, + "period_start": period_start, }, interest_payment_create_params.InterestPaymentCreateParams, ), diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index ac1723a5b..d960de099 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -59,6 +59,7 @@ from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams from .card_dispute_list_params import CardDisputeListParams as CardDisputeListParams from .card_profile_list_params import CardProfileListParams as CardProfileListParams +from .card_purchase_supplement import CardPurchaseSupplement as CardPurchaseSupplement from .check_deposit_list_params import CheckDepositListParams as CheckDepositListParams from .wire_transfer_list_params import WireTransferListParams as WireTransferListParams from .account_number_list_params import ( @@ -178,6 +179,9 @@ from .wire_drawdown_request_create_params import ( WireDrawdownRequestCreateParams as WireDrawdownRequestCreateParams, ) +from .card_purchase_supplement_list_params import ( + CardPurchaseSupplementListParams as CardPurchaseSupplementListParams, +) from .inbound_ach_transfer_return_list_params import ( InboundACHTransferReturnListParams as InboundACHTransferReturnListParams, ) diff --git a/src/increase/types/card_profile.py b/src/increase/types/card_profile.py index 9702fac9e..8fffcddb8 100644 --- a/src/increase/types/card_profile.py +++ b/src/increase/types/card_profile.py @@ -47,18 +47,31 @@ class DigitalWallets(BaseModel): class PhysicalCards(BaseModel): - back_image_file_id: str + back_image_file_id: Optional[str] """The identifier of the File containing the physical card's back image.""" - carrier_image_file_id: str + carrier_image_file_id: Optional[str] """The identifier of the File containing the physical card's carrier image.""" - contact_phone: str + contact_phone: Optional[str] """A phone number the user can contact to receive support for their card.""" - front_image_file_id: str + front_image_file_id: Optional[str] """The identifier of the File containing the physical card's front image.""" + status: Literal["not_eligible", "rejected", "pending_reviewing", "pending_submitting", "submitted"] + """The status of the Physical Card Profile. + + - `not_eligible` - The Card Profile is not eligible for physical cards. + - `rejected` - There is an issue with the Physical Card Profile preventing it + from use. + - `pending_reviewing` - The card profile is awaiting review by Increase. + - `pending_submitting` - The card profile is awaiting submission to the + fulfillment provider. + - `submitted` - The Physical Card Profile has been submitted to the fulfillment + provider. + """ + class CardProfile(BaseModel): id: str diff --git a/src/increase/types/card_purchase_supplement.py b/src/increase/types/card_purchase_supplement.py new file mode 100644 index 000000000..4b3c9bbf8 --- /dev/null +++ b/src/increase/types/card_purchase_supplement.py @@ -0,0 +1,190 @@ +# File generated from our OpenAPI spec by Stainless. + +from typing import List, Optional +from datetime import date +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["CardPurchaseSupplement", "Invoice", "LineItem"] + + +class Invoice(BaseModel): + discount_amount: Optional[int] + """Discount given to cardholder.""" + + discount_currency: Optional[str] + """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the discount.""" + + discount_treatment_code: Optional[ + Literal[ + "no_invoice_level_discount_provided", + "tax_calculated_on_post_discount_invoice_total", + "tax_calculated_on_pre_discount_invoice_total", + ] + ] + """Indicates how the merchant applied the discount. + + - `no_invoice_level_discount_provided` - No invoice level discount provided + - `tax_calculated_on_post_discount_invoice_total` - Tax calculated on post + discount invoice total + - `tax_calculated_on_pre_discount_invoice_total` - Tax calculated on pre + discount invoice total + """ + + duty_tax_amount: Optional[int] + """Amount of duty taxes.""" + + duty_tax_currency: Optional[str] + """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the duty tax.""" + + order_date: Optional[date] + """Date the order was taken.""" + + shipping_amount: Optional[int] + """The shipping cost.""" + + shipping_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the shipping + cost. + """ + + shipping_destination_country_code: Optional[str] + """Country code of the shipping destination.""" + + shipping_destination_postal_code: Optional[str] + """Postal code of the shipping destination.""" + + shipping_source_postal_code: Optional[str] + """Postal code of the location being shipped from.""" + + shipping_tax_amount: Optional[int] + """Taxes paid for freight and shipping.""" + + shipping_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the shipping + tax. + """ + + shipping_tax_rate: Optional[str] + """Tax rate for freight and shipping.""" + + tax_treatments: Optional[ + Literal[ + "no_tax_applies", + "net_price_line_item_level", + "net_price_invoice_level", + "gross_price_line_item_level", + "gross_price_invoice_level", + ] + ] + """Indicates how the merchant applied taxes. + + - `no_tax_applies` - No tax applies + - `net_price_line_item_level` - Net price line item level + - `net_price_invoice_level` - Net price invoice level + - `gross_price_line_item_level` - Gross price line item level + - `gross_price_invoice_level` - Gross price invoice level + """ + + unique_value_added_tax_invoice_reference: Optional[str] + """Value added tax invoice reference number.""" + + +class LineItem(BaseModel): + detail_indicator: Optional[Literal["normal", "credit", "payment"]] + """Indicates the type of line item. + + - `normal` - Normal + - `credit` - Credit + - `payment` - Purchase + """ + + discount_amount: Optional[int] + """Discount amount for this specific line item.""" + + discount_currency: Optional[str] + """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the discount.""" + + discount_treatment_code: Optional[ + Literal[ + "no_line_item_level_discount_provided", + "tax_calculated_on_post_discount_line_item_total", + "tax_calculated_on_pre_discount_line_item_total", + ] + ] + """Indicates how the merchant applied the discount for this specific line item. + + - `no_line_item_level_discount_provided` - No line item level discount provided + - `tax_calculated_on_post_discount_line_item_total` - Tax calculated on post + discount line item total + - `tax_calculated_on_pre_discount_line_item_total` - Tax calculated on pre + discount line item total + """ + + item_commodity_code: Optional[str] + """Code used to categorize the purchase item.""" + + item_descriptor: Optional[str] + """Description of the purchase item.""" + + item_quantity: Optional[str] + """The number of units of the product being purchased.""" + + product_code: Optional[str] + """Code used to categorize the product being purchased.""" + + sales_tax_amount: Optional[int] + """Sales tax amount for this line item.""" + + sales_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the sales tax + assessed. + """ + + sales_tax_rate: Optional[str] + """Sales tax rate for this line item.""" + + total_amount: Optional[int] + """Total amount of all line items""" + + total_amount_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the totla + amount. + """ + + unit_cost: Optional[str] + """Cost of line item per unit of measure, in major units.""" + + unit_cost_currency: Optional[str] + """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the unit cost.""" + + unit_of_measure_code: Optional[str] + """Code indicating unit of measure (gallons, etc.)""" + + +class CardPurchaseSupplement(BaseModel): + id: str + """The Card Purchase Supplement identifier.""" + + card_payment_id: Optional[str] + """The ID of the Card Payment this transaction belongs to.""" + + invoice: Optional[Invoice] + """Invoice-level information about the payment.""" + + line_items: Optional[List[LineItem]] + """Line item information, such as individual products purchased.""" + + transaction_id: str + """The ID of the transaction.""" + + type: Literal["card_purchase_supplement"] + """A constant representing the object's type. + + For this resource it will always be `card_purchase_supplement`. + """ diff --git a/src/increase/types/card_purchase_supplement_list_params.py b/src/increase/types/card_purchase_supplement_list_params.py new file mode 100644 index 000000000..3daac0fe2 --- /dev/null +++ b/src/increase/types/card_purchase_supplement_list_params.py @@ -0,0 +1,56 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["CardPurchaseSupplementListParams", "CreatedAt"] + + +class CardPurchaseSupplementListParams(TypedDict, total=False): + card_payment_id: str + """ + Filter Card Purchase Supplements to ones belonging to the specified Card + Payment. + """ + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 1516cbf17..bdce4a46f 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -140,10 +140,12 @@ class PhysicalCheck(BaseModel): class StopPaymentRequest(BaseModel): - reason: Literal["mail_delivery_failed", "unknown"] + reason: Literal["mail_delivery_failed", "rejected_by_increase", "unknown"] """The reason why this transfer was stopped. - `mail_delivery_failed` - The check could not be delivered. + - `rejected_by_increase` - The check was cancelled by an Increase operator who + will provide details out-of-band. - `unknown` - The check was stopped for another reason. """ diff --git a/src/increase/types/entities/__init__.py b/src/increase/types/entities/__init__.py index c7bf63561..f582e796a 100644 --- a/src/increase/types/entities/__init__.py +++ b/src/increase/types/entities/__init__.py @@ -3,6 +3,9 @@ from __future__ import annotations from .supplemental_document import SupplementalDocument as SupplementalDocument +from .beneficial_owner_create_params import ( + BeneficialOwnerCreateParams as BeneficialOwnerCreateParams, +) from .supplemental_document_list_params import ( SupplementalDocumentListParams as SupplementalDocumentListParams, ) diff --git a/src/increase/types/entities/beneficial_owner_create_params.py b/src/increase/types/entities/beneficial_owner_create_params.py new file mode 100644 index 000000000..e68ddc5ce --- /dev/null +++ b/src/increase/types/entities/beneficial_owner_create_params.py @@ -0,0 +1,180 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +from typing import Union +from datetime import date +from typing_extensions import Literal, Required, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = [ + "BeneficialOwnerCreateParams", + "BeneficialOwner", + "BeneficialOwnerIndividual", + "BeneficialOwnerIndividualAddress", + "BeneficialOwnerIndividualIdentification", + "BeneficialOwnerIndividualIdentificationDriversLicense", + "BeneficialOwnerIndividualIdentificationOther", + "BeneficialOwnerIndividualIdentificationPassport", +] + + +class BeneficialOwnerCreateParams(TypedDict, total=False): + beneficial_owner: Required[BeneficialOwner] + """ + The identifying details of anyone controlling or owning 25% or more of the + corporation. + """ + + +class BeneficialOwnerIndividualAddress(TypedDict, total=False): + city: Required[str] + """The city of the address.""" + + line1: Required[str] + """The first line of the address. This is usually the street number and street.""" + + state: Required[str] + """ + The two-letter United States Postal Service (USPS) abbreviation for the state of + the address. + """ + + zip: Required[str] + """The ZIP code of the address.""" + + line2: str + """The second line of the address. This might be the floor or room number.""" + + +class BeneficialOwnerIndividualIdentificationDriversLicense(TypedDict, total=False): + expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """The driver's license's expiration date in YYYY-MM-DD format.""" + + file_id: Required[str] + """The identifier of the File containing the front of the driver's license.""" + + state: Required[str] + """The state that issued the provided driver's license.""" + + back_file_id: str + """The identifier of the File containing the back of the driver's license.""" + + +class BeneficialOwnerIndividualIdentificationOther(TypedDict, total=False): + country: Required[str] + """ + The two-character ISO 3166-1 code representing the country that issued the + document. + """ + + description: Required[str] + """A description of the document submitted.""" + + file_id: Required[str] + """The identifier of the File containing the front of the document.""" + + back_file_id: str + """The identifier of the File containing the back of the document. + + Not every document has a reverse side. + """ + + expiration_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """The document's expiration date in YYYY-MM-DD format.""" + + +class BeneficialOwnerIndividualIdentificationPassport(TypedDict, total=False): + country: Required[str] + """The country that issued the passport.""" + + expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """The passport's expiration date in YYYY-MM-DD format.""" + + file_id: Required[str] + """The identifier of the File containing the passport.""" + + +class BeneficialOwnerIndividualIdentification(TypedDict, total=False): + method: Required[ + Literal[ + "social_security_number", + "individual_taxpayer_identification_number", + "passport", + "drivers_license", + "other", + ] + ] + """A method that can be used to verify the individual's identity. + + - `social_security_number` - A social security number. + - `individual_taxpayer_identification_number` - An individual taxpayer + identification number (ITIN). + - `passport` - A passport number. + - `drivers_license` - A driver's license number. + - `other` - Another identifying document. + """ + + number: Required[str] + """ + An identification number that can be used to verify the individual's identity, + such as a social security number. + """ + + drivers_license: BeneficialOwnerIndividualIdentificationDriversLicense + """Information about the United States driver's license used for identification. + + Required if `method` is equal to `drivers_license`. + """ + + other: BeneficialOwnerIndividualIdentificationOther + """Information about the identification document provided. + + Required if `method` is equal to `other`. + """ + + passport: BeneficialOwnerIndividualIdentificationPassport + """Information about the passport used for identification. + + Required if `method` is equal to `passport`. + """ + + +class BeneficialOwnerIndividual(TypedDict, total=False): + address: Required[BeneficialOwnerIndividualAddress] + """The individual's address.""" + + date_of_birth: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """The person's date of birth in YYYY-MM-DD format.""" + + identification: Required[BeneficialOwnerIndividualIdentification] + """A means of verifying the person's identity.""" + + name: Required[str] + """The person's legal name.""" + + confirmed_no_us_tax_id: bool + """ + The identification method for an individual can only be a passport, driver's + license, or other document if you've confirmed the individual does not have a US + tax id (either a Social Security Number or Individual Taxpayer Identification + Number). + """ + + +class BeneficialOwner(TypedDict, total=False): + individual: Required[BeneficialOwnerIndividual] + """Personal details for the beneficial owner.""" + + prong: Required[Literal["ownership", "control"]] + """Why this person is considered a beneficial owner of the entity. + + - `ownership` - A person with 25% or greater direct or indirect ownership of the + entity. + - `control` - A person who manages, directs, or has significant control of the + entity. + """ + + company_title: str + """This person's role or title within the entity.""" diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 40ba311e2..4346a7053 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -267,6 +267,9 @@ class SourceCheckTransferInstruction(BaseModel): class SourceInboundFundsHold(BaseModel): + id: str + """The Inbound Funds Hold identifier.""" + amount: int """The held amount in the minor unit of the account's currency. diff --git a/src/increase/types/simulations/ach_transfer_simulation.py b/src/increase/types/simulations/ach_transfer_simulation.py index 478b5293f..dddfd3a44 100644 --- a/src/increase/types/simulations/ach_transfer_simulation.py +++ b/src/increase/types/simulations/ach_transfer_simulation.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. -from typing import Optional +from typing import List, Optional from datetime import date, datetime from typing_extensions import Literal @@ -27,13 +27,26 @@ "TransactionSourceACHTransferReturn", "TransactionSourceCardDisputeAcceptance", "TransactionSourceCardRefund", + "TransactionSourceCardRefundPurchaseDetails", + "TransactionSourceCardRefundPurchaseDetailsCarRental", + "TransactionSourceCardRefundPurchaseDetailsLodging", + "TransactionSourceCardRefundPurchaseDetailsTravel", + "TransactionSourceCardRefundPurchaseDetailsTravelAncillary", + "TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService", + "TransactionSourceCardRefundPurchaseDetailsTravelTripLeg", "TransactionSourceCardRevenuePayment", "TransactionSourceCardSettlement", + "TransactionSourceCardSettlementPurchaseDetails", + "TransactionSourceCardSettlementPurchaseDetailsCarRental", + "TransactionSourceCardSettlementPurchaseDetailsLodging", + "TransactionSourceCardSettlementPurchaseDetailsTravel", + "TransactionSourceCardSettlementPurchaseDetailsTravelAncillary", + "TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService", + "TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg", "TransactionSourceCheckDepositAcceptance", "TransactionSourceCheckDepositReturn", "TransactionSourceCheckTransferDeposit", "TransactionSourceCheckTransferIntention", - "TransactionSourceCheckTransferRejection", "TransactionSourceCheckTransferStopPaymentRequest", "TransactionSourceFeePayment", "TransactionSourceInboundACHTransfer", @@ -971,6 +984,413 @@ class TransactionSourceCardDisputeAcceptance(BaseModel): """ +class TransactionSourceCardRefundPurchaseDetailsCarRental(BaseModel): + car_class_code: Optional[str] + """Code indicating the vehicle's class.""" + + checkout_date: Optional[date] + """ + Date the customer picked up the car or, in the case of a no-show or pre-pay + transaction, the scheduled pick up date. + """ + + daily_rental_rate_amount: Optional[int] + """Daily rate being charged for the vehicle.""" + + daily_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + rate. + """ + + days_rented: Optional[int] + """Number of days the vehicle was rented.""" + + extra_charges: Optional[ + Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] + ] + """Additional charges (gas, late fee, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `gas` - Gas + - `extra_mileage` - Extra mileage + - `late_return` - Late return + - `one_way_service_fee` - One way service fee + - `parking_violation` - Parking violation + """ + + fuel_charges_amount: Optional[int] + """Fuel charges for the vehicle.""" + + fuel_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + assessed. + """ + + insurance_charges_amount: Optional[int] + """Any insurance being charged for the vehicle.""" + + insurance_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + charges assessed. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] + """ + An indicator that the cardholder is being billed for a reserved vehicle that was + not actually rented (that is, a "no-show" charge). + + - `not_applicable` - Not applicable + - `no_show_for_specialized_vehicle` - No show for specialized vehicle + """ + + one_way_drop_off_charges_amount: Optional[int] + """ + Charges for returning the vehicle at a different location than where it was + picked up. + """ + + one_way_drop_off_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + drop-off charges assessed. + """ + + renter_name: Optional[str] + """Name of the person renting the vehicle.""" + + weekly_rental_rate_amount: Optional[int] + """Weekly rate being charged for the vehicle.""" + + weekly_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + rental rate. + """ + + +class TransactionSourceCardRefundPurchaseDetailsLodging(BaseModel): + check_in_date: Optional[date] + """Date the customer checked in.""" + + daily_room_rate_amount: Optional[int] + """Daily rate being charged for the room.""" + + daily_room_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + rate. + """ + + extra_charges: Optional[ + Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] + ] + """Additional charges (phone, late check-out, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `restaurant` - Restaurant + - `gift_shop` - Gift shop + - `mini_bar` - Mini bar + - `telephone` - Telephone + - `other` - Other + - `laundry` - Laundry + """ + + folio_cash_advances_amount: Optional[int] + """Folio cash advances for the room.""" + + folio_cash_advances_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + advances. + """ + + food_beverage_charges_amount: Optional[int] + """Food and beverage charges for the room.""" + + food_beverage_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the foor and + beverage charges. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show"]] + """ + Indicator that the cardholder is being billed for a reserved room that was not + actually used. + + - `not_applicable` - Not applicable + - `no_show` - No show + """ + + prepaid_expenses_amount: Optional[int] + """Prepaid expenses being charged for the room.""" + + prepaid_expenses_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + expenses. + """ + + room_nights: Optional[int] + """Number of nights the room was rented.""" + + total_room_tax_amount: Optional[int] + """Total room tax being charged.""" + + total_room_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + tax. + """ + + total_tax_amount: Optional[int] + """Total tax being charged for the room.""" + + total_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + assessed. + """ + + +class TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService(BaseModel): + category: Optional[ + Literal[ + "none", + "bundled_service", + "baggage_fee", + "change_fee", + "cargo", + "carbon_offset", + "frequent_flyer", + "gift_card", + "ground_transport", + "in_flight_entertainment", + "lounge", + "medical", + "meal_beverage", + "other", + "passenger_assist_fee", + "pets", + "seat_fees", + "standby", + "service_fee", + "store", + "travel_service", + "unaccompanied_travel", + "upgrades", + "wifi", + ] + ] + """Category of the ancillary service. + + - `none` - None + - `bundled_service` - Bundled service + - `baggage_fee` - Baggage fee + - `change_fee` - Change fee + - `cargo` - Cargo + - `carbon_offset` - Carbon offset + - `frequent_flyer` - Frequent flyer + - `gift_card` - Gift card + - `ground_transport` - Ground transport + - `in_flight_entertainment` - In-flight entertainment + - `lounge` - Lounge + - `medical` - Medical + - `meal_beverage` - Meal beverage + - `other` - Other + - `passenger_assist_fee` - Passenger assist fee + - `pets` - Pets + - `seat_fees` - Seat fees + - `standby` - Standby + - `service_fee` - Service fee + - `store` - Store + - `travel_service` - Travel service + - `unaccompanied_travel` - Unaccompanied travel + - `upgrades` - Upgrades + - `wifi` - Wi-fi + """ + + sub_category: Optional[str] + """Sub-category of the ancillary service, free-form.""" + + +class TransactionSourceCardRefundPurchaseDetailsTravelAncillary(BaseModel): + connected_ticket_document_number: Optional[str] + """ + If this purchase has a connection or relationship to another purchase, such as a + baggage fee for a passenger transport ticket, this field should contain the + ticket document number for the other purchase. + """ + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "other", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `other` - Other + """ + + passenger_name_or_description: Optional[str] + """Name of the passenger or description of the ancillary purchase.""" + + services: List[TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService] + """Additional travel charges, such as baggage fees.""" + + ticket_document_number: Optional[str] + """Ticket document number.""" + + +class TransactionSourceCardRefundPurchaseDetailsTravelTripLeg(BaseModel): + carrier_code: Optional[str] + """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" + + destination_city_airport_code: Optional[str] + """Code for the destination city or airport.""" + + fare_basis_code: Optional[str] + """Fare basis code.""" + + flight_number: Optional[str] + """Flight number.""" + + service_class: Optional[str] + """Service class (e.g., first class, business class, etc.).""" + + stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] + """Indicates whether a stopover is allowed on this ticket. + + - `none` - None + - `stop_over_allowed` - Stop over allowed + - `stop_over_not_allowed` - Stop over not allowed + """ + + +class TransactionSourceCardRefundPurchaseDetailsTravel(BaseModel): + ancillary: Optional[TransactionSourceCardRefundPurchaseDetailsTravelAncillary] + """Ancillary purchases in addition to the airfare.""" + + computerized_reservation_system: Optional[str] + """Indicates the computerized reservation system used to book the ticket.""" + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_cancellation", + "other", + "partial_refund_of_airline_ticket", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `airline_ticket_cancellation` - Airline ticket cancellation + - `other` - Other + - `partial_refund_of_airline_ticket` - Partial refund of airline ticket + """ + + departure_date: Optional[date] + """Date of departure.""" + + origination_city_airport_code: Optional[str] + """Code for the originating city or airport.""" + + passenger_name: Optional[str] + """Name of the passenger.""" + + restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] + """Indicates whether this ticket is non-refundable. + + - `no_restrictions` - No restrictions + - `restricted_non_refundable_ticket` - Restricted non-refundable ticket + """ + + ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] + """Indicates why a ticket was changed. + + - `none` - None + - `change_to_existing_ticket` - Change to existing ticket + - `new_ticket` - New ticket + """ + + ticket_number: Optional[str] + """Ticket number.""" + + travel_agency_code: Optional[str] + """Code for the travel agency if the ticket was issued by a travel agency.""" + + travel_agency_name: Optional[str] + """Name of the travel agency if the ticket was issued by a travel agency.""" + + trip_legs: Optional[List[TransactionSourceCardRefundPurchaseDetailsTravelTripLeg]] + """Fields specific to each leg of the journey.""" + + +class TransactionSourceCardRefundPurchaseDetails(BaseModel): + car_rental: Optional[TransactionSourceCardRefundPurchaseDetailsCarRental] + """Fields specific to car rentals.""" + + customer_reference_identifier: Optional[str] + """An identifier from the merchant for the customer or consumer.""" + + local_tax_amount: Optional[int] + """The state or provincial tax amount in minor units.""" + + local_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + lodging: Optional[TransactionSourceCardRefundPurchaseDetailsLodging] + """Fields specific to lodging.""" + + national_tax_amount: Optional[int] + """The national tax amount in minor units.""" + + national_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + purchase_identifier: Optional[str] + """An identifier from the merchant for the purchase to the issuer and cardholder.""" + + purchase_identifier_format: Optional[ + Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] + ] + """The format of the purchase identifier. + + - `free_text` - Free text + - `order_number` - Order number + - `rental_agreement_number` - Rental agreement number + - `hotel_folio_number` - Hotel folio number + - `invoice_number` - Invoice number + """ + + travel: Optional[TransactionSourceCardRefundPurchaseDetailsTravel] + """Fields specific to travel.""" + + class TransactionSourceCardRefund(BaseModel): id: str """The Card Refund identifier.""" @@ -1015,6 +1435,12 @@ class TransactionSourceCardRefund(BaseModel): merchant_state: Optional[str] """The state the merchant resides in.""" + purchase_details: Optional[TransactionSourceCardRefundPurchaseDetails] + """ + Additional details about the card purchase, such as tax and industry-specific + fields. + """ + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" @@ -1055,6 +1481,413 @@ class TransactionSourceCardRevenuePayment(BaseModel): """The account the card belonged to.""" +class TransactionSourceCardSettlementPurchaseDetailsCarRental(BaseModel): + car_class_code: Optional[str] + """Code indicating the vehicle's class.""" + + checkout_date: Optional[date] + """ + Date the customer picked up the car or, in the case of a no-show or pre-pay + transaction, the scheduled pick up date. + """ + + daily_rental_rate_amount: Optional[int] + """Daily rate being charged for the vehicle.""" + + daily_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + rate. + """ + + days_rented: Optional[int] + """Number of days the vehicle was rented.""" + + extra_charges: Optional[ + Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] + ] + """Additional charges (gas, late fee, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `gas` - Gas + - `extra_mileage` - Extra mileage + - `late_return` - Late return + - `one_way_service_fee` - One way service fee + - `parking_violation` - Parking violation + """ + + fuel_charges_amount: Optional[int] + """Fuel charges for the vehicle.""" + + fuel_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + assessed. + """ + + insurance_charges_amount: Optional[int] + """Any insurance being charged for the vehicle.""" + + insurance_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + charges assessed. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] + """ + An indicator that the cardholder is being billed for a reserved vehicle that was + not actually rented (that is, a "no-show" charge). + + - `not_applicable` - Not applicable + - `no_show_for_specialized_vehicle` - No show for specialized vehicle + """ + + one_way_drop_off_charges_amount: Optional[int] + """ + Charges for returning the vehicle at a different location than where it was + picked up. + """ + + one_way_drop_off_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + drop-off charges assessed. + """ + + renter_name: Optional[str] + """Name of the person renting the vehicle.""" + + weekly_rental_rate_amount: Optional[int] + """Weekly rate being charged for the vehicle.""" + + weekly_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + rental rate. + """ + + +class TransactionSourceCardSettlementPurchaseDetailsLodging(BaseModel): + check_in_date: Optional[date] + """Date the customer checked in.""" + + daily_room_rate_amount: Optional[int] + """Daily rate being charged for the room.""" + + daily_room_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + rate. + """ + + extra_charges: Optional[ + Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] + ] + """Additional charges (phone, late check-out, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `restaurant` - Restaurant + - `gift_shop` - Gift shop + - `mini_bar` - Mini bar + - `telephone` - Telephone + - `other` - Other + - `laundry` - Laundry + """ + + folio_cash_advances_amount: Optional[int] + """Folio cash advances for the room.""" + + folio_cash_advances_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + advances. + """ + + food_beverage_charges_amount: Optional[int] + """Food and beverage charges for the room.""" + + food_beverage_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the foor and + beverage charges. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show"]] + """ + Indicator that the cardholder is being billed for a reserved room that was not + actually used. + + - `not_applicable` - Not applicable + - `no_show` - No show + """ + + prepaid_expenses_amount: Optional[int] + """Prepaid expenses being charged for the room.""" + + prepaid_expenses_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + expenses. + """ + + room_nights: Optional[int] + """Number of nights the room was rented.""" + + total_room_tax_amount: Optional[int] + """Total room tax being charged.""" + + total_room_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + tax. + """ + + total_tax_amount: Optional[int] + """Total tax being charged for the room.""" + + total_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + assessed. + """ + + +class TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService(BaseModel): + category: Optional[ + Literal[ + "none", + "bundled_service", + "baggage_fee", + "change_fee", + "cargo", + "carbon_offset", + "frequent_flyer", + "gift_card", + "ground_transport", + "in_flight_entertainment", + "lounge", + "medical", + "meal_beverage", + "other", + "passenger_assist_fee", + "pets", + "seat_fees", + "standby", + "service_fee", + "store", + "travel_service", + "unaccompanied_travel", + "upgrades", + "wifi", + ] + ] + """Category of the ancillary service. + + - `none` - None + - `bundled_service` - Bundled service + - `baggage_fee` - Baggage fee + - `change_fee` - Change fee + - `cargo` - Cargo + - `carbon_offset` - Carbon offset + - `frequent_flyer` - Frequent flyer + - `gift_card` - Gift card + - `ground_transport` - Ground transport + - `in_flight_entertainment` - In-flight entertainment + - `lounge` - Lounge + - `medical` - Medical + - `meal_beverage` - Meal beverage + - `other` - Other + - `passenger_assist_fee` - Passenger assist fee + - `pets` - Pets + - `seat_fees` - Seat fees + - `standby` - Standby + - `service_fee` - Service fee + - `store` - Store + - `travel_service` - Travel service + - `unaccompanied_travel` - Unaccompanied travel + - `upgrades` - Upgrades + - `wifi` - Wi-fi + """ + + sub_category: Optional[str] + """Sub-category of the ancillary service, free-form.""" + + +class TransactionSourceCardSettlementPurchaseDetailsTravelAncillary(BaseModel): + connected_ticket_document_number: Optional[str] + """ + If this purchase has a connection or relationship to another purchase, such as a + baggage fee for a passenger transport ticket, this field should contain the + ticket document number for the other purchase. + """ + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "other", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `other` - Other + """ + + passenger_name_or_description: Optional[str] + """Name of the passenger or description of the ancillary purchase.""" + + services: List[TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService] + """Additional travel charges, such as baggage fees.""" + + ticket_document_number: Optional[str] + """Ticket document number.""" + + +class TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg(BaseModel): + carrier_code: Optional[str] + """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" + + destination_city_airport_code: Optional[str] + """Code for the destination city or airport.""" + + fare_basis_code: Optional[str] + """Fare basis code.""" + + flight_number: Optional[str] + """Flight number.""" + + service_class: Optional[str] + """Service class (e.g., first class, business class, etc.).""" + + stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] + """Indicates whether a stopover is allowed on this ticket. + + - `none` - None + - `stop_over_allowed` - Stop over allowed + - `stop_over_not_allowed` - Stop over not allowed + """ + + +class TransactionSourceCardSettlementPurchaseDetailsTravel(BaseModel): + ancillary: Optional[TransactionSourceCardSettlementPurchaseDetailsTravelAncillary] + """Ancillary purchases in addition to the airfare.""" + + computerized_reservation_system: Optional[str] + """Indicates the computerized reservation system used to book the ticket.""" + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_cancellation", + "other", + "partial_refund_of_airline_ticket", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `airline_ticket_cancellation` - Airline ticket cancellation + - `other` - Other + - `partial_refund_of_airline_ticket` - Partial refund of airline ticket + """ + + departure_date: Optional[date] + """Date of departure.""" + + origination_city_airport_code: Optional[str] + """Code for the originating city or airport.""" + + passenger_name: Optional[str] + """Name of the passenger.""" + + restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] + """Indicates whether this ticket is non-refundable. + + - `no_restrictions` - No restrictions + - `restricted_non_refundable_ticket` - Restricted non-refundable ticket + """ + + ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] + """Indicates why a ticket was changed. + + - `none` - None + - `change_to_existing_ticket` - Change to existing ticket + - `new_ticket` - New ticket + """ + + ticket_number: Optional[str] + """Ticket number.""" + + travel_agency_code: Optional[str] + """Code for the travel agency if the ticket was issued by a travel agency.""" + + travel_agency_name: Optional[str] + """Name of the travel agency if the ticket was issued by a travel agency.""" + + trip_legs: Optional[List[TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg]] + """Fields specific to each leg of the journey.""" + + +class TransactionSourceCardSettlementPurchaseDetails(BaseModel): + car_rental: Optional[TransactionSourceCardSettlementPurchaseDetailsCarRental] + """Fields specific to car rentals.""" + + customer_reference_identifier: Optional[str] + """An identifier from the merchant for the customer or consumer.""" + + local_tax_amount: Optional[int] + """The state or provincial tax amount in minor units.""" + + local_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + lodging: Optional[TransactionSourceCardSettlementPurchaseDetailsLodging] + """Fields specific to lodging.""" + + national_tax_amount: Optional[int] + """The national tax amount in minor units.""" + + national_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + purchase_identifier: Optional[str] + """An identifier from the merchant for the purchase to the issuer and cardholder.""" + + purchase_identifier_format: Optional[ + Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] + ] + """The format of the purchase identifier. + + - `free_text` - Free text + - `order_number` - Order number + - `rental_agreement_number` - Rental agreement number + - `hotel_folio_number` - Hotel folio number + - `invoice_number` - Invoice number + """ + + travel: Optional[TransactionSourceCardSettlementPurchaseDetailsTravel] + """Fields specific to travel.""" + + class TransactionSourceCardSettlement(BaseModel): id: str """The Card Settlement identifier.""" @@ -1117,6 +1950,12 @@ class TransactionSourceCardSettlement(BaseModel): transaction's presentment currency. """ + purchase_details: Optional[TransactionSourceCardSettlementPurchaseDetails] + """ + Additional details about the card purchase, such as tax and industry-specific + fields. + """ + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" @@ -1300,16 +2139,13 @@ class TransactionSourceCheckTransferIntention(BaseModel): """The identifier of the Check Transfer with which this is associated.""" -class TransactionSourceCheckTransferRejection(BaseModel): - transfer_id: str - """The identifier of the Check Transfer that led to this Transaction.""" - - class TransactionSourceCheckTransferStopPaymentRequest(BaseModel): - reason: Literal["mail_delivery_failed", "unknown"] + reason: Literal["mail_delivery_failed", "rejected_by_increase", "unknown"] """The reason why this transfer was stopped. - `mail_delivery_failed` - The check could not be delivered. + - `rejected_by_increase` - The check was cancelled by an Increase operator who + will provide details out-of-band. - `unknown` - The check was stopped for another reason. """ @@ -1729,6 +2565,7 @@ class TransactionSourceInternalSource(BaseModel): "account_closure", "bank_migration", "cashback", + "check_adjustment", "collection_receivable", "empyreal_adjustment", "error", @@ -1743,6 +2580,7 @@ class TransactionSourceInternalSource(BaseModel): - `account_closure` - Account closure - `bank_migration` - Bank migration - `cashback` - Cashback + - `check_adjustment` - Check adjustment - `collection_receivable` - Collection receivable - `empyreal_adjustment` - Empyreal adjustment - `error` - Error @@ -1867,7 +2705,6 @@ class TransactionSource(BaseModel): "check_deposit_return", "check_transfer_deposit", "check_transfer_intention", - "check_transfer_rejection", "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", @@ -1918,8 +2755,6 @@ class TransactionSource(BaseModel): Deposit object. Details will be under the `check_transfer_deposit` object. - `check_transfer_intention` - The Transaction was created by a Check Transfer Intention object. Details will be under the `check_transfer_intention` object. - - `check_transfer_rejection` - The Transaction was created by a Check Transfer - Rejection object. Details will be under the `check_transfer_rejection` object. - `check_transfer_stop_payment_request` - The Transaction was created by a Check Transfer Stop Payment Request object. Details will be under the `check_transfer_stop_payment_request` object. @@ -1992,13 +2827,6 @@ class TransactionSource(BaseModel): equal to `check_transfer_intention`. """ - check_transfer_rejection: Optional[TransactionSourceCheckTransferRejection] - """A Check Transfer Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_rejection`. - """ - check_transfer_stop_payment_request: Optional[TransactionSourceCheckTransferStopPaymentRequest] """A Check Transfer Stop Payment Request object. diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py index 361abc0ec..29ed97878 100644 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ b/src/increase/types/simulations/card_authorization_simulation.py @@ -887,6 +887,9 @@ class PendingTransactionSourceCheckTransferInstruction(BaseModel): class PendingTransactionSourceInboundFundsHold(BaseModel): + id: str + """The Inbound Funds Hold identifier.""" + amount: int """The held amount in the minor unit of the account's currency. diff --git a/src/increase/types/simulations/inbound_funds_hold_release_response.py b/src/increase/types/simulations/inbound_funds_hold_release_response.py index a455d4960..e69f04070 100644 --- a/src/increase/types/simulations/inbound_funds_hold_release_response.py +++ b/src/increase/types/simulations/inbound_funds_hold_release_response.py @@ -10,6 +10,9 @@ class InboundFundsHoldReleaseResponse(BaseModel): + id: str + """The Inbound Funds Hold identifier.""" + amount: int """The held amount in the minor unit of the account's currency. diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index 845a84c96..eff600b87 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. -from typing import Optional +from typing import List, Optional from datetime import date, datetime from typing_extensions import Literal @@ -27,13 +27,26 @@ "TransactionSourceACHTransferReturn", "TransactionSourceCardDisputeAcceptance", "TransactionSourceCardRefund", + "TransactionSourceCardRefundPurchaseDetails", + "TransactionSourceCardRefundPurchaseDetailsCarRental", + "TransactionSourceCardRefundPurchaseDetailsLodging", + "TransactionSourceCardRefundPurchaseDetailsTravel", + "TransactionSourceCardRefundPurchaseDetailsTravelAncillary", + "TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService", + "TransactionSourceCardRefundPurchaseDetailsTravelTripLeg", "TransactionSourceCardRevenuePayment", "TransactionSourceCardSettlement", + "TransactionSourceCardSettlementPurchaseDetails", + "TransactionSourceCardSettlementPurchaseDetailsCarRental", + "TransactionSourceCardSettlementPurchaseDetailsLodging", + "TransactionSourceCardSettlementPurchaseDetailsTravel", + "TransactionSourceCardSettlementPurchaseDetailsTravelAncillary", + "TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService", + "TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg", "TransactionSourceCheckDepositAcceptance", "TransactionSourceCheckDepositReturn", "TransactionSourceCheckTransferDeposit", "TransactionSourceCheckTransferIntention", - "TransactionSourceCheckTransferRejection", "TransactionSourceCheckTransferStopPaymentRequest", "TransactionSourceFeePayment", "TransactionSourceInboundACHTransfer", @@ -971,6 +984,413 @@ class TransactionSourceCardDisputeAcceptance(BaseModel): """ +class TransactionSourceCardRefundPurchaseDetailsCarRental(BaseModel): + car_class_code: Optional[str] + """Code indicating the vehicle's class.""" + + checkout_date: Optional[date] + """ + Date the customer picked up the car or, in the case of a no-show or pre-pay + transaction, the scheduled pick up date. + """ + + daily_rental_rate_amount: Optional[int] + """Daily rate being charged for the vehicle.""" + + daily_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + rate. + """ + + days_rented: Optional[int] + """Number of days the vehicle was rented.""" + + extra_charges: Optional[ + Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] + ] + """Additional charges (gas, late fee, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `gas` - Gas + - `extra_mileage` - Extra mileage + - `late_return` - Late return + - `one_way_service_fee` - One way service fee + - `parking_violation` - Parking violation + """ + + fuel_charges_amount: Optional[int] + """Fuel charges for the vehicle.""" + + fuel_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + assessed. + """ + + insurance_charges_amount: Optional[int] + """Any insurance being charged for the vehicle.""" + + insurance_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + charges assessed. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] + """ + An indicator that the cardholder is being billed for a reserved vehicle that was + not actually rented (that is, a "no-show" charge). + + - `not_applicable` - Not applicable + - `no_show_for_specialized_vehicle` - No show for specialized vehicle + """ + + one_way_drop_off_charges_amount: Optional[int] + """ + Charges for returning the vehicle at a different location than where it was + picked up. + """ + + one_way_drop_off_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + drop-off charges assessed. + """ + + renter_name: Optional[str] + """Name of the person renting the vehicle.""" + + weekly_rental_rate_amount: Optional[int] + """Weekly rate being charged for the vehicle.""" + + weekly_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + rental rate. + """ + + +class TransactionSourceCardRefundPurchaseDetailsLodging(BaseModel): + check_in_date: Optional[date] + """Date the customer checked in.""" + + daily_room_rate_amount: Optional[int] + """Daily rate being charged for the room.""" + + daily_room_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + rate. + """ + + extra_charges: Optional[ + Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] + ] + """Additional charges (phone, late check-out, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `restaurant` - Restaurant + - `gift_shop` - Gift shop + - `mini_bar` - Mini bar + - `telephone` - Telephone + - `other` - Other + - `laundry` - Laundry + """ + + folio_cash_advances_amount: Optional[int] + """Folio cash advances for the room.""" + + folio_cash_advances_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + advances. + """ + + food_beverage_charges_amount: Optional[int] + """Food and beverage charges for the room.""" + + food_beverage_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the foor and + beverage charges. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show"]] + """ + Indicator that the cardholder is being billed for a reserved room that was not + actually used. + + - `not_applicable` - Not applicable + - `no_show` - No show + """ + + prepaid_expenses_amount: Optional[int] + """Prepaid expenses being charged for the room.""" + + prepaid_expenses_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + expenses. + """ + + room_nights: Optional[int] + """Number of nights the room was rented.""" + + total_room_tax_amount: Optional[int] + """Total room tax being charged.""" + + total_room_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + tax. + """ + + total_tax_amount: Optional[int] + """Total tax being charged for the room.""" + + total_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + assessed. + """ + + +class TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService(BaseModel): + category: Optional[ + Literal[ + "none", + "bundled_service", + "baggage_fee", + "change_fee", + "cargo", + "carbon_offset", + "frequent_flyer", + "gift_card", + "ground_transport", + "in_flight_entertainment", + "lounge", + "medical", + "meal_beverage", + "other", + "passenger_assist_fee", + "pets", + "seat_fees", + "standby", + "service_fee", + "store", + "travel_service", + "unaccompanied_travel", + "upgrades", + "wifi", + ] + ] + """Category of the ancillary service. + + - `none` - None + - `bundled_service` - Bundled service + - `baggage_fee` - Baggage fee + - `change_fee` - Change fee + - `cargo` - Cargo + - `carbon_offset` - Carbon offset + - `frequent_flyer` - Frequent flyer + - `gift_card` - Gift card + - `ground_transport` - Ground transport + - `in_flight_entertainment` - In-flight entertainment + - `lounge` - Lounge + - `medical` - Medical + - `meal_beverage` - Meal beverage + - `other` - Other + - `passenger_assist_fee` - Passenger assist fee + - `pets` - Pets + - `seat_fees` - Seat fees + - `standby` - Standby + - `service_fee` - Service fee + - `store` - Store + - `travel_service` - Travel service + - `unaccompanied_travel` - Unaccompanied travel + - `upgrades` - Upgrades + - `wifi` - Wi-fi + """ + + sub_category: Optional[str] + """Sub-category of the ancillary service, free-form.""" + + +class TransactionSourceCardRefundPurchaseDetailsTravelAncillary(BaseModel): + connected_ticket_document_number: Optional[str] + """ + If this purchase has a connection or relationship to another purchase, such as a + baggage fee for a passenger transport ticket, this field should contain the + ticket document number for the other purchase. + """ + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "other", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `other` - Other + """ + + passenger_name_or_description: Optional[str] + """Name of the passenger or description of the ancillary purchase.""" + + services: List[TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService] + """Additional travel charges, such as baggage fees.""" + + ticket_document_number: Optional[str] + """Ticket document number.""" + + +class TransactionSourceCardRefundPurchaseDetailsTravelTripLeg(BaseModel): + carrier_code: Optional[str] + """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" + + destination_city_airport_code: Optional[str] + """Code for the destination city or airport.""" + + fare_basis_code: Optional[str] + """Fare basis code.""" + + flight_number: Optional[str] + """Flight number.""" + + service_class: Optional[str] + """Service class (e.g., first class, business class, etc.).""" + + stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] + """Indicates whether a stopover is allowed on this ticket. + + - `none` - None + - `stop_over_allowed` - Stop over allowed + - `stop_over_not_allowed` - Stop over not allowed + """ + + +class TransactionSourceCardRefundPurchaseDetailsTravel(BaseModel): + ancillary: Optional[TransactionSourceCardRefundPurchaseDetailsTravelAncillary] + """Ancillary purchases in addition to the airfare.""" + + computerized_reservation_system: Optional[str] + """Indicates the computerized reservation system used to book the ticket.""" + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_cancellation", + "other", + "partial_refund_of_airline_ticket", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `airline_ticket_cancellation` - Airline ticket cancellation + - `other` - Other + - `partial_refund_of_airline_ticket` - Partial refund of airline ticket + """ + + departure_date: Optional[date] + """Date of departure.""" + + origination_city_airport_code: Optional[str] + """Code for the originating city or airport.""" + + passenger_name: Optional[str] + """Name of the passenger.""" + + restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] + """Indicates whether this ticket is non-refundable. + + - `no_restrictions` - No restrictions + - `restricted_non_refundable_ticket` - Restricted non-refundable ticket + """ + + ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] + """Indicates why a ticket was changed. + + - `none` - None + - `change_to_existing_ticket` - Change to existing ticket + - `new_ticket` - New ticket + """ + + ticket_number: Optional[str] + """Ticket number.""" + + travel_agency_code: Optional[str] + """Code for the travel agency if the ticket was issued by a travel agency.""" + + travel_agency_name: Optional[str] + """Name of the travel agency if the ticket was issued by a travel agency.""" + + trip_legs: Optional[List[TransactionSourceCardRefundPurchaseDetailsTravelTripLeg]] + """Fields specific to each leg of the journey.""" + + +class TransactionSourceCardRefundPurchaseDetails(BaseModel): + car_rental: Optional[TransactionSourceCardRefundPurchaseDetailsCarRental] + """Fields specific to car rentals.""" + + customer_reference_identifier: Optional[str] + """An identifier from the merchant for the customer or consumer.""" + + local_tax_amount: Optional[int] + """The state or provincial tax amount in minor units.""" + + local_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + lodging: Optional[TransactionSourceCardRefundPurchaseDetailsLodging] + """Fields specific to lodging.""" + + national_tax_amount: Optional[int] + """The national tax amount in minor units.""" + + national_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + purchase_identifier: Optional[str] + """An identifier from the merchant for the purchase to the issuer and cardholder.""" + + purchase_identifier_format: Optional[ + Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] + ] + """The format of the purchase identifier. + + - `free_text` - Free text + - `order_number` - Order number + - `rental_agreement_number` - Rental agreement number + - `hotel_folio_number` - Hotel folio number + - `invoice_number` - Invoice number + """ + + travel: Optional[TransactionSourceCardRefundPurchaseDetailsTravel] + """Fields specific to travel.""" + + class TransactionSourceCardRefund(BaseModel): id: str """The Card Refund identifier.""" @@ -1015,6 +1435,12 @@ class TransactionSourceCardRefund(BaseModel): merchant_state: Optional[str] """The state the merchant resides in.""" + purchase_details: Optional[TransactionSourceCardRefundPurchaseDetails] + """ + Additional details about the card purchase, such as tax and industry-specific + fields. + """ + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" @@ -1055,6 +1481,413 @@ class TransactionSourceCardRevenuePayment(BaseModel): """The account the card belonged to.""" +class TransactionSourceCardSettlementPurchaseDetailsCarRental(BaseModel): + car_class_code: Optional[str] + """Code indicating the vehicle's class.""" + + checkout_date: Optional[date] + """ + Date the customer picked up the car or, in the case of a no-show or pre-pay + transaction, the scheduled pick up date. + """ + + daily_rental_rate_amount: Optional[int] + """Daily rate being charged for the vehicle.""" + + daily_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + rate. + """ + + days_rented: Optional[int] + """Number of days the vehicle was rented.""" + + extra_charges: Optional[ + Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] + ] + """Additional charges (gas, late fee, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `gas` - Gas + - `extra_mileage` - Extra mileage + - `late_return` - Late return + - `one_way_service_fee` - One way service fee + - `parking_violation` - Parking violation + """ + + fuel_charges_amount: Optional[int] + """Fuel charges for the vehicle.""" + + fuel_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + assessed. + """ + + insurance_charges_amount: Optional[int] + """Any insurance being charged for the vehicle.""" + + insurance_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + charges assessed. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] + """ + An indicator that the cardholder is being billed for a reserved vehicle that was + not actually rented (that is, a "no-show" charge). + + - `not_applicable` - Not applicable + - `no_show_for_specialized_vehicle` - No show for specialized vehicle + """ + + one_way_drop_off_charges_amount: Optional[int] + """ + Charges for returning the vehicle at a different location than where it was + picked up. + """ + + one_way_drop_off_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + drop-off charges assessed. + """ + + renter_name: Optional[str] + """Name of the person renting the vehicle.""" + + weekly_rental_rate_amount: Optional[int] + """Weekly rate being charged for the vehicle.""" + + weekly_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + rental rate. + """ + + +class TransactionSourceCardSettlementPurchaseDetailsLodging(BaseModel): + check_in_date: Optional[date] + """Date the customer checked in.""" + + daily_room_rate_amount: Optional[int] + """Daily rate being charged for the room.""" + + daily_room_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + rate. + """ + + extra_charges: Optional[ + Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] + ] + """Additional charges (phone, late check-out, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `restaurant` - Restaurant + - `gift_shop` - Gift shop + - `mini_bar` - Mini bar + - `telephone` - Telephone + - `other` - Other + - `laundry` - Laundry + """ + + folio_cash_advances_amount: Optional[int] + """Folio cash advances for the room.""" + + folio_cash_advances_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + advances. + """ + + food_beverage_charges_amount: Optional[int] + """Food and beverage charges for the room.""" + + food_beverage_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the foor and + beverage charges. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show"]] + """ + Indicator that the cardholder is being billed for a reserved room that was not + actually used. + + - `not_applicable` - Not applicable + - `no_show` - No show + """ + + prepaid_expenses_amount: Optional[int] + """Prepaid expenses being charged for the room.""" + + prepaid_expenses_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + expenses. + """ + + room_nights: Optional[int] + """Number of nights the room was rented.""" + + total_room_tax_amount: Optional[int] + """Total room tax being charged.""" + + total_room_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + tax. + """ + + total_tax_amount: Optional[int] + """Total tax being charged for the room.""" + + total_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + assessed. + """ + + +class TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService(BaseModel): + category: Optional[ + Literal[ + "none", + "bundled_service", + "baggage_fee", + "change_fee", + "cargo", + "carbon_offset", + "frequent_flyer", + "gift_card", + "ground_transport", + "in_flight_entertainment", + "lounge", + "medical", + "meal_beverage", + "other", + "passenger_assist_fee", + "pets", + "seat_fees", + "standby", + "service_fee", + "store", + "travel_service", + "unaccompanied_travel", + "upgrades", + "wifi", + ] + ] + """Category of the ancillary service. + + - `none` - None + - `bundled_service` - Bundled service + - `baggage_fee` - Baggage fee + - `change_fee` - Change fee + - `cargo` - Cargo + - `carbon_offset` - Carbon offset + - `frequent_flyer` - Frequent flyer + - `gift_card` - Gift card + - `ground_transport` - Ground transport + - `in_flight_entertainment` - In-flight entertainment + - `lounge` - Lounge + - `medical` - Medical + - `meal_beverage` - Meal beverage + - `other` - Other + - `passenger_assist_fee` - Passenger assist fee + - `pets` - Pets + - `seat_fees` - Seat fees + - `standby` - Standby + - `service_fee` - Service fee + - `store` - Store + - `travel_service` - Travel service + - `unaccompanied_travel` - Unaccompanied travel + - `upgrades` - Upgrades + - `wifi` - Wi-fi + """ + + sub_category: Optional[str] + """Sub-category of the ancillary service, free-form.""" + + +class TransactionSourceCardSettlementPurchaseDetailsTravelAncillary(BaseModel): + connected_ticket_document_number: Optional[str] + """ + If this purchase has a connection or relationship to another purchase, such as a + baggage fee for a passenger transport ticket, this field should contain the + ticket document number for the other purchase. + """ + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "other", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `other` - Other + """ + + passenger_name_or_description: Optional[str] + """Name of the passenger or description of the ancillary purchase.""" + + services: List[TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService] + """Additional travel charges, such as baggage fees.""" + + ticket_document_number: Optional[str] + """Ticket document number.""" + + +class TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg(BaseModel): + carrier_code: Optional[str] + """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" + + destination_city_airport_code: Optional[str] + """Code for the destination city or airport.""" + + fare_basis_code: Optional[str] + """Fare basis code.""" + + flight_number: Optional[str] + """Flight number.""" + + service_class: Optional[str] + """Service class (e.g., first class, business class, etc.).""" + + stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] + """Indicates whether a stopover is allowed on this ticket. + + - `none` - None + - `stop_over_allowed` - Stop over allowed + - `stop_over_not_allowed` - Stop over not allowed + """ + + +class TransactionSourceCardSettlementPurchaseDetailsTravel(BaseModel): + ancillary: Optional[TransactionSourceCardSettlementPurchaseDetailsTravelAncillary] + """Ancillary purchases in addition to the airfare.""" + + computerized_reservation_system: Optional[str] + """Indicates the computerized reservation system used to book the ticket.""" + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_cancellation", + "other", + "partial_refund_of_airline_ticket", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `airline_ticket_cancellation` - Airline ticket cancellation + - `other` - Other + - `partial_refund_of_airline_ticket` - Partial refund of airline ticket + """ + + departure_date: Optional[date] + """Date of departure.""" + + origination_city_airport_code: Optional[str] + """Code for the originating city or airport.""" + + passenger_name: Optional[str] + """Name of the passenger.""" + + restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] + """Indicates whether this ticket is non-refundable. + + - `no_restrictions` - No restrictions + - `restricted_non_refundable_ticket` - Restricted non-refundable ticket + """ + + ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] + """Indicates why a ticket was changed. + + - `none` - None + - `change_to_existing_ticket` - Change to existing ticket + - `new_ticket` - New ticket + """ + + ticket_number: Optional[str] + """Ticket number.""" + + travel_agency_code: Optional[str] + """Code for the travel agency if the ticket was issued by a travel agency.""" + + travel_agency_name: Optional[str] + """Name of the travel agency if the ticket was issued by a travel agency.""" + + trip_legs: Optional[List[TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg]] + """Fields specific to each leg of the journey.""" + + +class TransactionSourceCardSettlementPurchaseDetails(BaseModel): + car_rental: Optional[TransactionSourceCardSettlementPurchaseDetailsCarRental] + """Fields specific to car rentals.""" + + customer_reference_identifier: Optional[str] + """An identifier from the merchant for the customer or consumer.""" + + local_tax_amount: Optional[int] + """The state or provincial tax amount in minor units.""" + + local_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + lodging: Optional[TransactionSourceCardSettlementPurchaseDetailsLodging] + """Fields specific to lodging.""" + + national_tax_amount: Optional[int] + """The national tax amount in minor units.""" + + national_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + purchase_identifier: Optional[str] + """An identifier from the merchant for the purchase to the issuer and cardholder.""" + + purchase_identifier_format: Optional[ + Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] + ] + """The format of the purchase identifier. + + - `free_text` - Free text + - `order_number` - Order number + - `rental_agreement_number` - Rental agreement number + - `hotel_folio_number` - Hotel folio number + - `invoice_number` - Invoice number + """ + + travel: Optional[TransactionSourceCardSettlementPurchaseDetailsTravel] + """Fields specific to travel.""" + + class TransactionSourceCardSettlement(BaseModel): id: str """The Card Settlement identifier.""" @@ -1117,6 +1950,12 @@ class TransactionSourceCardSettlement(BaseModel): transaction's presentment currency. """ + purchase_details: Optional[TransactionSourceCardSettlementPurchaseDetails] + """ + Additional details about the card purchase, such as tax and industry-specific + fields. + """ + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" @@ -1300,16 +2139,13 @@ class TransactionSourceCheckTransferIntention(BaseModel): """The identifier of the Check Transfer with which this is associated.""" -class TransactionSourceCheckTransferRejection(BaseModel): - transfer_id: str - """The identifier of the Check Transfer that led to this Transaction.""" - - class TransactionSourceCheckTransferStopPaymentRequest(BaseModel): - reason: Literal["mail_delivery_failed", "unknown"] + reason: Literal["mail_delivery_failed", "rejected_by_increase", "unknown"] """The reason why this transfer was stopped. - `mail_delivery_failed` - The check could not be delivered. + - `rejected_by_increase` - The check was cancelled by an Increase operator who + will provide details out-of-band. - `unknown` - The check was stopped for another reason. """ @@ -1729,6 +2565,7 @@ class TransactionSourceInternalSource(BaseModel): "account_closure", "bank_migration", "cashback", + "check_adjustment", "collection_receivable", "empyreal_adjustment", "error", @@ -1743,6 +2580,7 @@ class TransactionSourceInternalSource(BaseModel): - `account_closure` - Account closure - `bank_migration` - Bank migration - `cashback` - Cashback + - `check_adjustment` - Check adjustment - `collection_receivable` - Collection receivable - `empyreal_adjustment` - Empyreal adjustment - `error` - Error @@ -1867,7 +2705,6 @@ class TransactionSource(BaseModel): "check_deposit_return", "check_transfer_deposit", "check_transfer_intention", - "check_transfer_rejection", "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", @@ -1918,8 +2755,6 @@ class TransactionSource(BaseModel): Deposit object. Details will be under the `check_transfer_deposit` object. - `check_transfer_intention` - The Transaction was created by a Check Transfer Intention object. Details will be under the `check_transfer_intention` object. - - `check_transfer_rejection` - The Transaction was created by a Check Transfer - Rejection object. Details will be under the `check_transfer_rejection` object. - `check_transfer_stop_payment_request` - The Transaction was created by a Check Transfer Stop Payment Request object. Details will be under the `check_transfer_stop_payment_request` object. @@ -1992,13 +2827,6 @@ class TransactionSource(BaseModel): equal to `check_transfer_intention`. """ - check_transfer_rejection: Optional[TransactionSourceCheckTransferRejection] - """A Check Transfer Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_rejection`. - """ - check_transfer_stop_payment_request: Optional[TransactionSourceCheckTransferStopPaymentRequest] """A Check Transfer Stop Payment Request object. diff --git a/src/increase/types/simulations/interest_payment_create_params.py b/src/increase/types/simulations/interest_payment_create_params.py index bdf9cc030..19ddd035f 100644 --- a/src/increase/types/simulations/interest_payment_create_params.py +++ b/src/increase/types/simulations/interest_payment_create_params.py @@ -2,7 +2,11 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing import Union +from datetime import datetime +from typing_extensions import Required, Annotated, TypedDict + +from ..._utils import PropertyInfo __all__ = ["InterestPaymentCreateParams"] @@ -13,3 +17,12 @@ class InterestPaymentCreateParams(TypedDict, total=False): amount: Required[int] """The interest amount in cents. Must be positive.""" + + period_end: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """The end of the interest period. If not provided, defaults to the current time.""" + + period_start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """The start of the interest period. + + If not provided, defaults to the current time. + """ diff --git a/src/increase/types/simulations/interest_payment_simulation_result.py b/src/increase/types/simulations/interest_payment_simulation_result.py index 0a16082ea..bdf02d4be 100644 --- a/src/increase/types/simulations/interest_payment_simulation_result.py +++ b/src/increase/types/simulations/interest_payment_simulation_result.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. -from typing import Optional +from typing import List, Optional from datetime import date, datetime from typing_extensions import Literal @@ -16,13 +16,26 @@ "TransactionSourceACHTransferReturn", "TransactionSourceCardDisputeAcceptance", "TransactionSourceCardRefund", + "TransactionSourceCardRefundPurchaseDetails", + "TransactionSourceCardRefundPurchaseDetailsCarRental", + "TransactionSourceCardRefundPurchaseDetailsLodging", + "TransactionSourceCardRefundPurchaseDetailsTravel", + "TransactionSourceCardRefundPurchaseDetailsTravelAncillary", + "TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService", + "TransactionSourceCardRefundPurchaseDetailsTravelTripLeg", "TransactionSourceCardRevenuePayment", "TransactionSourceCardSettlement", + "TransactionSourceCardSettlementPurchaseDetails", + "TransactionSourceCardSettlementPurchaseDetailsCarRental", + "TransactionSourceCardSettlementPurchaseDetailsLodging", + "TransactionSourceCardSettlementPurchaseDetailsTravel", + "TransactionSourceCardSettlementPurchaseDetailsTravelAncillary", + "TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService", + "TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg", "TransactionSourceCheckDepositAcceptance", "TransactionSourceCheckDepositReturn", "TransactionSourceCheckTransferDeposit", "TransactionSourceCheckTransferIntention", - "TransactionSourceCheckTransferRejection", "TransactionSourceCheckTransferStopPaymentRequest", "TransactionSourceFeePayment", "TransactionSourceInboundACHTransfer", @@ -351,6 +364,413 @@ class TransactionSourceCardDisputeAcceptance(BaseModel): """ +class TransactionSourceCardRefundPurchaseDetailsCarRental(BaseModel): + car_class_code: Optional[str] + """Code indicating the vehicle's class.""" + + checkout_date: Optional[date] + """ + Date the customer picked up the car or, in the case of a no-show or pre-pay + transaction, the scheduled pick up date. + """ + + daily_rental_rate_amount: Optional[int] + """Daily rate being charged for the vehicle.""" + + daily_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + rate. + """ + + days_rented: Optional[int] + """Number of days the vehicle was rented.""" + + extra_charges: Optional[ + Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] + ] + """Additional charges (gas, late fee, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `gas` - Gas + - `extra_mileage` - Extra mileage + - `late_return` - Late return + - `one_way_service_fee` - One way service fee + - `parking_violation` - Parking violation + """ + + fuel_charges_amount: Optional[int] + """Fuel charges for the vehicle.""" + + fuel_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + assessed. + """ + + insurance_charges_amount: Optional[int] + """Any insurance being charged for the vehicle.""" + + insurance_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + charges assessed. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] + """ + An indicator that the cardholder is being billed for a reserved vehicle that was + not actually rented (that is, a "no-show" charge). + + - `not_applicable` - Not applicable + - `no_show_for_specialized_vehicle` - No show for specialized vehicle + """ + + one_way_drop_off_charges_amount: Optional[int] + """ + Charges for returning the vehicle at a different location than where it was + picked up. + """ + + one_way_drop_off_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + drop-off charges assessed. + """ + + renter_name: Optional[str] + """Name of the person renting the vehicle.""" + + weekly_rental_rate_amount: Optional[int] + """Weekly rate being charged for the vehicle.""" + + weekly_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + rental rate. + """ + + +class TransactionSourceCardRefundPurchaseDetailsLodging(BaseModel): + check_in_date: Optional[date] + """Date the customer checked in.""" + + daily_room_rate_amount: Optional[int] + """Daily rate being charged for the room.""" + + daily_room_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + rate. + """ + + extra_charges: Optional[ + Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] + ] + """Additional charges (phone, late check-out, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `restaurant` - Restaurant + - `gift_shop` - Gift shop + - `mini_bar` - Mini bar + - `telephone` - Telephone + - `other` - Other + - `laundry` - Laundry + """ + + folio_cash_advances_amount: Optional[int] + """Folio cash advances for the room.""" + + folio_cash_advances_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + advances. + """ + + food_beverage_charges_amount: Optional[int] + """Food and beverage charges for the room.""" + + food_beverage_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the foor and + beverage charges. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show"]] + """ + Indicator that the cardholder is being billed for a reserved room that was not + actually used. + + - `not_applicable` - Not applicable + - `no_show` - No show + """ + + prepaid_expenses_amount: Optional[int] + """Prepaid expenses being charged for the room.""" + + prepaid_expenses_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + expenses. + """ + + room_nights: Optional[int] + """Number of nights the room was rented.""" + + total_room_tax_amount: Optional[int] + """Total room tax being charged.""" + + total_room_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + tax. + """ + + total_tax_amount: Optional[int] + """Total tax being charged for the room.""" + + total_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + assessed. + """ + + +class TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService(BaseModel): + category: Optional[ + Literal[ + "none", + "bundled_service", + "baggage_fee", + "change_fee", + "cargo", + "carbon_offset", + "frequent_flyer", + "gift_card", + "ground_transport", + "in_flight_entertainment", + "lounge", + "medical", + "meal_beverage", + "other", + "passenger_assist_fee", + "pets", + "seat_fees", + "standby", + "service_fee", + "store", + "travel_service", + "unaccompanied_travel", + "upgrades", + "wifi", + ] + ] + """Category of the ancillary service. + + - `none` - None + - `bundled_service` - Bundled service + - `baggage_fee` - Baggage fee + - `change_fee` - Change fee + - `cargo` - Cargo + - `carbon_offset` - Carbon offset + - `frequent_flyer` - Frequent flyer + - `gift_card` - Gift card + - `ground_transport` - Ground transport + - `in_flight_entertainment` - In-flight entertainment + - `lounge` - Lounge + - `medical` - Medical + - `meal_beverage` - Meal beverage + - `other` - Other + - `passenger_assist_fee` - Passenger assist fee + - `pets` - Pets + - `seat_fees` - Seat fees + - `standby` - Standby + - `service_fee` - Service fee + - `store` - Store + - `travel_service` - Travel service + - `unaccompanied_travel` - Unaccompanied travel + - `upgrades` - Upgrades + - `wifi` - Wi-fi + """ + + sub_category: Optional[str] + """Sub-category of the ancillary service, free-form.""" + + +class TransactionSourceCardRefundPurchaseDetailsTravelAncillary(BaseModel): + connected_ticket_document_number: Optional[str] + """ + If this purchase has a connection or relationship to another purchase, such as a + baggage fee for a passenger transport ticket, this field should contain the + ticket document number for the other purchase. + """ + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "other", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `other` - Other + """ + + passenger_name_or_description: Optional[str] + """Name of the passenger or description of the ancillary purchase.""" + + services: List[TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService] + """Additional travel charges, such as baggage fees.""" + + ticket_document_number: Optional[str] + """Ticket document number.""" + + +class TransactionSourceCardRefundPurchaseDetailsTravelTripLeg(BaseModel): + carrier_code: Optional[str] + """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" + + destination_city_airport_code: Optional[str] + """Code for the destination city or airport.""" + + fare_basis_code: Optional[str] + """Fare basis code.""" + + flight_number: Optional[str] + """Flight number.""" + + service_class: Optional[str] + """Service class (e.g., first class, business class, etc.).""" + + stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] + """Indicates whether a stopover is allowed on this ticket. + + - `none` - None + - `stop_over_allowed` - Stop over allowed + - `stop_over_not_allowed` - Stop over not allowed + """ + + +class TransactionSourceCardRefundPurchaseDetailsTravel(BaseModel): + ancillary: Optional[TransactionSourceCardRefundPurchaseDetailsTravelAncillary] + """Ancillary purchases in addition to the airfare.""" + + computerized_reservation_system: Optional[str] + """Indicates the computerized reservation system used to book the ticket.""" + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_cancellation", + "other", + "partial_refund_of_airline_ticket", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `airline_ticket_cancellation` - Airline ticket cancellation + - `other` - Other + - `partial_refund_of_airline_ticket` - Partial refund of airline ticket + """ + + departure_date: Optional[date] + """Date of departure.""" + + origination_city_airport_code: Optional[str] + """Code for the originating city or airport.""" + + passenger_name: Optional[str] + """Name of the passenger.""" + + restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] + """Indicates whether this ticket is non-refundable. + + - `no_restrictions` - No restrictions + - `restricted_non_refundable_ticket` - Restricted non-refundable ticket + """ + + ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] + """Indicates why a ticket was changed. + + - `none` - None + - `change_to_existing_ticket` - Change to existing ticket + - `new_ticket` - New ticket + """ + + ticket_number: Optional[str] + """Ticket number.""" + + travel_agency_code: Optional[str] + """Code for the travel agency if the ticket was issued by a travel agency.""" + + travel_agency_name: Optional[str] + """Name of the travel agency if the ticket was issued by a travel agency.""" + + trip_legs: Optional[List[TransactionSourceCardRefundPurchaseDetailsTravelTripLeg]] + """Fields specific to each leg of the journey.""" + + +class TransactionSourceCardRefundPurchaseDetails(BaseModel): + car_rental: Optional[TransactionSourceCardRefundPurchaseDetailsCarRental] + """Fields specific to car rentals.""" + + customer_reference_identifier: Optional[str] + """An identifier from the merchant for the customer or consumer.""" + + local_tax_amount: Optional[int] + """The state or provincial tax amount in minor units.""" + + local_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + lodging: Optional[TransactionSourceCardRefundPurchaseDetailsLodging] + """Fields specific to lodging.""" + + national_tax_amount: Optional[int] + """The national tax amount in minor units.""" + + national_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + purchase_identifier: Optional[str] + """An identifier from the merchant for the purchase to the issuer and cardholder.""" + + purchase_identifier_format: Optional[ + Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] + ] + """The format of the purchase identifier. + + - `free_text` - Free text + - `order_number` - Order number + - `rental_agreement_number` - Rental agreement number + - `hotel_folio_number` - Hotel folio number + - `invoice_number` - Invoice number + """ + + travel: Optional[TransactionSourceCardRefundPurchaseDetailsTravel] + """Fields specific to travel.""" + + class TransactionSourceCardRefund(BaseModel): id: str """The Card Refund identifier.""" @@ -395,6 +815,12 @@ class TransactionSourceCardRefund(BaseModel): merchant_state: Optional[str] """The state the merchant resides in.""" + purchase_details: Optional[TransactionSourceCardRefundPurchaseDetails] + """ + Additional details about the card purchase, such as tax and industry-specific + fields. + """ + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" @@ -435,6 +861,413 @@ class TransactionSourceCardRevenuePayment(BaseModel): """The account the card belonged to.""" +class TransactionSourceCardSettlementPurchaseDetailsCarRental(BaseModel): + car_class_code: Optional[str] + """Code indicating the vehicle's class.""" + + checkout_date: Optional[date] + """ + Date the customer picked up the car or, in the case of a no-show or pre-pay + transaction, the scheduled pick up date. + """ + + daily_rental_rate_amount: Optional[int] + """Daily rate being charged for the vehicle.""" + + daily_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + rate. + """ + + days_rented: Optional[int] + """Number of days the vehicle was rented.""" + + extra_charges: Optional[ + Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] + ] + """Additional charges (gas, late fee, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `gas` - Gas + - `extra_mileage` - Extra mileage + - `late_return` - Late return + - `one_way_service_fee` - One way service fee + - `parking_violation` - Parking violation + """ + + fuel_charges_amount: Optional[int] + """Fuel charges for the vehicle.""" + + fuel_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + assessed. + """ + + insurance_charges_amount: Optional[int] + """Any insurance being charged for the vehicle.""" + + insurance_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + charges assessed. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] + """ + An indicator that the cardholder is being billed for a reserved vehicle that was + not actually rented (that is, a "no-show" charge). + + - `not_applicable` - Not applicable + - `no_show_for_specialized_vehicle` - No show for specialized vehicle + """ + + one_way_drop_off_charges_amount: Optional[int] + """ + Charges for returning the vehicle at a different location than where it was + picked up. + """ + + one_way_drop_off_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + drop-off charges assessed. + """ + + renter_name: Optional[str] + """Name of the person renting the vehicle.""" + + weekly_rental_rate_amount: Optional[int] + """Weekly rate being charged for the vehicle.""" + + weekly_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + rental rate. + """ + + +class TransactionSourceCardSettlementPurchaseDetailsLodging(BaseModel): + check_in_date: Optional[date] + """Date the customer checked in.""" + + daily_room_rate_amount: Optional[int] + """Daily rate being charged for the room.""" + + daily_room_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + rate. + """ + + extra_charges: Optional[ + Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] + ] + """Additional charges (phone, late check-out, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `restaurant` - Restaurant + - `gift_shop` - Gift shop + - `mini_bar` - Mini bar + - `telephone` - Telephone + - `other` - Other + - `laundry` - Laundry + """ + + folio_cash_advances_amount: Optional[int] + """Folio cash advances for the room.""" + + folio_cash_advances_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + advances. + """ + + food_beverage_charges_amount: Optional[int] + """Food and beverage charges for the room.""" + + food_beverage_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the foor and + beverage charges. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show"]] + """ + Indicator that the cardholder is being billed for a reserved room that was not + actually used. + + - `not_applicable` - Not applicable + - `no_show` - No show + """ + + prepaid_expenses_amount: Optional[int] + """Prepaid expenses being charged for the room.""" + + prepaid_expenses_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + expenses. + """ + + room_nights: Optional[int] + """Number of nights the room was rented.""" + + total_room_tax_amount: Optional[int] + """Total room tax being charged.""" + + total_room_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + tax. + """ + + total_tax_amount: Optional[int] + """Total tax being charged for the room.""" + + total_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + assessed. + """ + + +class TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService(BaseModel): + category: Optional[ + Literal[ + "none", + "bundled_service", + "baggage_fee", + "change_fee", + "cargo", + "carbon_offset", + "frequent_flyer", + "gift_card", + "ground_transport", + "in_flight_entertainment", + "lounge", + "medical", + "meal_beverage", + "other", + "passenger_assist_fee", + "pets", + "seat_fees", + "standby", + "service_fee", + "store", + "travel_service", + "unaccompanied_travel", + "upgrades", + "wifi", + ] + ] + """Category of the ancillary service. + + - `none` - None + - `bundled_service` - Bundled service + - `baggage_fee` - Baggage fee + - `change_fee` - Change fee + - `cargo` - Cargo + - `carbon_offset` - Carbon offset + - `frequent_flyer` - Frequent flyer + - `gift_card` - Gift card + - `ground_transport` - Ground transport + - `in_flight_entertainment` - In-flight entertainment + - `lounge` - Lounge + - `medical` - Medical + - `meal_beverage` - Meal beverage + - `other` - Other + - `passenger_assist_fee` - Passenger assist fee + - `pets` - Pets + - `seat_fees` - Seat fees + - `standby` - Standby + - `service_fee` - Service fee + - `store` - Store + - `travel_service` - Travel service + - `unaccompanied_travel` - Unaccompanied travel + - `upgrades` - Upgrades + - `wifi` - Wi-fi + """ + + sub_category: Optional[str] + """Sub-category of the ancillary service, free-form.""" + + +class TransactionSourceCardSettlementPurchaseDetailsTravelAncillary(BaseModel): + connected_ticket_document_number: Optional[str] + """ + If this purchase has a connection or relationship to another purchase, such as a + baggage fee for a passenger transport ticket, this field should contain the + ticket document number for the other purchase. + """ + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "other", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `other` - Other + """ + + passenger_name_or_description: Optional[str] + """Name of the passenger or description of the ancillary purchase.""" + + services: List[TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService] + """Additional travel charges, such as baggage fees.""" + + ticket_document_number: Optional[str] + """Ticket document number.""" + + +class TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg(BaseModel): + carrier_code: Optional[str] + """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" + + destination_city_airport_code: Optional[str] + """Code for the destination city or airport.""" + + fare_basis_code: Optional[str] + """Fare basis code.""" + + flight_number: Optional[str] + """Flight number.""" + + service_class: Optional[str] + """Service class (e.g., first class, business class, etc.).""" + + stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] + """Indicates whether a stopover is allowed on this ticket. + + - `none` - None + - `stop_over_allowed` - Stop over allowed + - `stop_over_not_allowed` - Stop over not allowed + """ + + +class TransactionSourceCardSettlementPurchaseDetailsTravel(BaseModel): + ancillary: Optional[TransactionSourceCardSettlementPurchaseDetailsTravelAncillary] + """Ancillary purchases in addition to the airfare.""" + + computerized_reservation_system: Optional[str] + """Indicates the computerized reservation system used to book the ticket.""" + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_cancellation", + "other", + "partial_refund_of_airline_ticket", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `airline_ticket_cancellation` - Airline ticket cancellation + - `other` - Other + - `partial_refund_of_airline_ticket` - Partial refund of airline ticket + """ + + departure_date: Optional[date] + """Date of departure.""" + + origination_city_airport_code: Optional[str] + """Code for the originating city or airport.""" + + passenger_name: Optional[str] + """Name of the passenger.""" + + restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] + """Indicates whether this ticket is non-refundable. + + - `no_restrictions` - No restrictions + - `restricted_non_refundable_ticket` - Restricted non-refundable ticket + """ + + ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] + """Indicates why a ticket was changed. + + - `none` - None + - `change_to_existing_ticket` - Change to existing ticket + - `new_ticket` - New ticket + """ + + ticket_number: Optional[str] + """Ticket number.""" + + travel_agency_code: Optional[str] + """Code for the travel agency if the ticket was issued by a travel agency.""" + + travel_agency_name: Optional[str] + """Name of the travel agency if the ticket was issued by a travel agency.""" + + trip_legs: Optional[List[TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg]] + """Fields specific to each leg of the journey.""" + + +class TransactionSourceCardSettlementPurchaseDetails(BaseModel): + car_rental: Optional[TransactionSourceCardSettlementPurchaseDetailsCarRental] + """Fields specific to car rentals.""" + + customer_reference_identifier: Optional[str] + """An identifier from the merchant for the customer or consumer.""" + + local_tax_amount: Optional[int] + """The state or provincial tax amount in minor units.""" + + local_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + lodging: Optional[TransactionSourceCardSettlementPurchaseDetailsLodging] + """Fields specific to lodging.""" + + national_tax_amount: Optional[int] + """The national tax amount in minor units.""" + + national_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + purchase_identifier: Optional[str] + """An identifier from the merchant for the purchase to the issuer and cardholder.""" + + purchase_identifier_format: Optional[ + Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] + ] + """The format of the purchase identifier. + + - `free_text` - Free text + - `order_number` - Order number + - `rental_agreement_number` - Rental agreement number + - `hotel_folio_number` - Hotel folio number + - `invoice_number` - Invoice number + """ + + travel: Optional[TransactionSourceCardSettlementPurchaseDetailsTravel] + """Fields specific to travel.""" + + class TransactionSourceCardSettlement(BaseModel): id: str """The Card Settlement identifier.""" @@ -497,6 +1330,12 @@ class TransactionSourceCardSettlement(BaseModel): transaction's presentment currency. """ + purchase_details: Optional[TransactionSourceCardSettlementPurchaseDetails] + """ + Additional details about the card purchase, such as tax and industry-specific + fields. + """ + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" @@ -680,16 +1519,13 @@ class TransactionSourceCheckTransferIntention(BaseModel): """The identifier of the Check Transfer with which this is associated.""" -class TransactionSourceCheckTransferRejection(BaseModel): - transfer_id: str - """The identifier of the Check Transfer that led to this Transaction.""" - - class TransactionSourceCheckTransferStopPaymentRequest(BaseModel): - reason: Literal["mail_delivery_failed", "unknown"] + reason: Literal["mail_delivery_failed", "rejected_by_increase", "unknown"] """The reason why this transfer was stopped. - `mail_delivery_failed` - The check could not be delivered. + - `rejected_by_increase` - The check was cancelled by an Increase operator who + will provide details out-of-band. - `unknown` - The check was stopped for another reason. """ @@ -1109,6 +1945,7 @@ class TransactionSourceInternalSource(BaseModel): "account_closure", "bank_migration", "cashback", + "check_adjustment", "collection_receivable", "empyreal_adjustment", "error", @@ -1123,6 +1960,7 @@ class TransactionSourceInternalSource(BaseModel): - `account_closure` - Account closure - `bank_migration` - Bank migration - `cashback` - Cashback + - `check_adjustment` - Check adjustment - `collection_receivable` - Collection receivable - `empyreal_adjustment` - Empyreal adjustment - `error` - Error @@ -1247,7 +2085,6 @@ class TransactionSource(BaseModel): "check_deposit_return", "check_transfer_deposit", "check_transfer_intention", - "check_transfer_rejection", "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", @@ -1298,8 +2135,6 @@ class TransactionSource(BaseModel): Deposit object. Details will be under the `check_transfer_deposit` object. - `check_transfer_intention` - The Transaction was created by a Check Transfer Intention object. Details will be under the `check_transfer_intention` object. - - `check_transfer_rejection` - The Transaction was created by a Check Transfer - Rejection object. Details will be under the `check_transfer_rejection` object. - `check_transfer_stop_payment_request` - The Transaction was created by a Check Transfer Stop Payment Request object. Details will be under the `check_transfer_stop_payment_request` object. @@ -1372,13 +2207,6 @@ class TransactionSource(BaseModel): equal to `check_transfer_intention`. """ - check_transfer_rejection: Optional[TransactionSourceCheckTransferRejection] - """A Check Transfer Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_rejection`. - """ - check_transfer_stop_payment_request: Optional[TransactionSourceCheckTransferStopPaymentRequest] """A Check Transfer Stop Payment Request object. diff --git a/src/increase/types/simulations/wire_transfer_simulation.py b/src/increase/types/simulations/wire_transfer_simulation.py index df1169dd7..62efa16ca 100644 --- a/src/increase/types/simulations/wire_transfer_simulation.py +++ b/src/increase/types/simulations/wire_transfer_simulation.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. -from typing import Optional +from typing import List, Optional from datetime import date, datetime from typing_extensions import Literal @@ -16,13 +16,26 @@ "TransactionSourceACHTransferReturn", "TransactionSourceCardDisputeAcceptance", "TransactionSourceCardRefund", + "TransactionSourceCardRefundPurchaseDetails", + "TransactionSourceCardRefundPurchaseDetailsCarRental", + "TransactionSourceCardRefundPurchaseDetailsLodging", + "TransactionSourceCardRefundPurchaseDetailsTravel", + "TransactionSourceCardRefundPurchaseDetailsTravelAncillary", + "TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService", + "TransactionSourceCardRefundPurchaseDetailsTravelTripLeg", "TransactionSourceCardRevenuePayment", "TransactionSourceCardSettlement", + "TransactionSourceCardSettlementPurchaseDetails", + "TransactionSourceCardSettlementPurchaseDetailsCarRental", + "TransactionSourceCardSettlementPurchaseDetailsLodging", + "TransactionSourceCardSettlementPurchaseDetailsTravel", + "TransactionSourceCardSettlementPurchaseDetailsTravelAncillary", + "TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService", + "TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg", "TransactionSourceCheckDepositAcceptance", "TransactionSourceCheckDepositReturn", "TransactionSourceCheckTransferDeposit", "TransactionSourceCheckTransferIntention", - "TransactionSourceCheckTransferRejection", "TransactionSourceCheckTransferStopPaymentRequest", "TransactionSourceFeePayment", "TransactionSourceInboundACHTransfer", @@ -351,6 +364,413 @@ class TransactionSourceCardDisputeAcceptance(BaseModel): """ +class TransactionSourceCardRefundPurchaseDetailsCarRental(BaseModel): + car_class_code: Optional[str] + """Code indicating the vehicle's class.""" + + checkout_date: Optional[date] + """ + Date the customer picked up the car or, in the case of a no-show or pre-pay + transaction, the scheduled pick up date. + """ + + daily_rental_rate_amount: Optional[int] + """Daily rate being charged for the vehicle.""" + + daily_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + rate. + """ + + days_rented: Optional[int] + """Number of days the vehicle was rented.""" + + extra_charges: Optional[ + Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] + ] + """Additional charges (gas, late fee, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `gas` - Gas + - `extra_mileage` - Extra mileage + - `late_return` - Late return + - `one_way_service_fee` - One way service fee + - `parking_violation` - Parking violation + """ + + fuel_charges_amount: Optional[int] + """Fuel charges for the vehicle.""" + + fuel_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + assessed. + """ + + insurance_charges_amount: Optional[int] + """Any insurance being charged for the vehicle.""" + + insurance_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + charges assessed. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] + """ + An indicator that the cardholder is being billed for a reserved vehicle that was + not actually rented (that is, a "no-show" charge). + + - `not_applicable` - Not applicable + - `no_show_for_specialized_vehicle` - No show for specialized vehicle + """ + + one_way_drop_off_charges_amount: Optional[int] + """ + Charges for returning the vehicle at a different location than where it was + picked up. + """ + + one_way_drop_off_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + drop-off charges assessed. + """ + + renter_name: Optional[str] + """Name of the person renting the vehicle.""" + + weekly_rental_rate_amount: Optional[int] + """Weekly rate being charged for the vehicle.""" + + weekly_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + rental rate. + """ + + +class TransactionSourceCardRefundPurchaseDetailsLodging(BaseModel): + check_in_date: Optional[date] + """Date the customer checked in.""" + + daily_room_rate_amount: Optional[int] + """Daily rate being charged for the room.""" + + daily_room_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + rate. + """ + + extra_charges: Optional[ + Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] + ] + """Additional charges (phone, late check-out, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `restaurant` - Restaurant + - `gift_shop` - Gift shop + - `mini_bar` - Mini bar + - `telephone` - Telephone + - `other` - Other + - `laundry` - Laundry + """ + + folio_cash_advances_amount: Optional[int] + """Folio cash advances for the room.""" + + folio_cash_advances_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + advances. + """ + + food_beverage_charges_amount: Optional[int] + """Food and beverage charges for the room.""" + + food_beverage_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the foor and + beverage charges. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show"]] + """ + Indicator that the cardholder is being billed for a reserved room that was not + actually used. + + - `not_applicable` - Not applicable + - `no_show` - No show + """ + + prepaid_expenses_amount: Optional[int] + """Prepaid expenses being charged for the room.""" + + prepaid_expenses_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + expenses. + """ + + room_nights: Optional[int] + """Number of nights the room was rented.""" + + total_room_tax_amount: Optional[int] + """Total room tax being charged.""" + + total_room_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + tax. + """ + + total_tax_amount: Optional[int] + """Total tax being charged for the room.""" + + total_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + assessed. + """ + + +class TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService(BaseModel): + category: Optional[ + Literal[ + "none", + "bundled_service", + "baggage_fee", + "change_fee", + "cargo", + "carbon_offset", + "frequent_flyer", + "gift_card", + "ground_transport", + "in_flight_entertainment", + "lounge", + "medical", + "meal_beverage", + "other", + "passenger_assist_fee", + "pets", + "seat_fees", + "standby", + "service_fee", + "store", + "travel_service", + "unaccompanied_travel", + "upgrades", + "wifi", + ] + ] + """Category of the ancillary service. + + - `none` - None + - `bundled_service` - Bundled service + - `baggage_fee` - Baggage fee + - `change_fee` - Change fee + - `cargo` - Cargo + - `carbon_offset` - Carbon offset + - `frequent_flyer` - Frequent flyer + - `gift_card` - Gift card + - `ground_transport` - Ground transport + - `in_flight_entertainment` - In-flight entertainment + - `lounge` - Lounge + - `medical` - Medical + - `meal_beverage` - Meal beverage + - `other` - Other + - `passenger_assist_fee` - Passenger assist fee + - `pets` - Pets + - `seat_fees` - Seat fees + - `standby` - Standby + - `service_fee` - Service fee + - `store` - Store + - `travel_service` - Travel service + - `unaccompanied_travel` - Unaccompanied travel + - `upgrades` - Upgrades + - `wifi` - Wi-fi + """ + + sub_category: Optional[str] + """Sub-category of the ancillary service, free-form.""" + + +class TransactionSourceCardRefundPurchaseDetailsTravelAncillary(BaseModel): + connected_ticket_document_number: Optional[str] + """ + If this purchase has a connection or relationship to another purchase, such as a + baggage fee for a passenger transport ticket, this field should contain the + ticket document number for the other purchase. + """ + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "other", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `other` - Other + """ + + passenger_name_or_description: Optional[str] + """Name of the passenger or description of the ancillary purchase.""" + + services: List[TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService] + """Additional travel charges, such as baggage fees.""" + + ticket_document_number: Optional[str] + """Ticket document number.""" + + +class TransactionSourceCardRefundPurchaseDetailsTravelTripLeg(BaseModel): + carrier_code: Optional[str] + """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" + + destination_city_airport_code: Optional[str] + """Code for the destination city or airport.""" + + fare_basis_code: Optional[str] + """Fare basis code.""" + + flight_number: Optional[str] + """Flight number.""" + + service_class: Optional[str] + """Service class (e.g., first class, business class, etc.).""" + + stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] + """Indicates whether a stopover is allowed on this ticket. + + - `none` - None + - `stop_over_allowed` - Stop over allowed + - `stop_over_not_allowed` - Stop over not allowed + """ + + +class TransactionSourceCardRefundPurchaseDetailsTravel(BaseModel): + ancillary: Optional[TransactionSourceCardRefundPurchaseDetailsTravelAncillary] + """Ancillary purchases in addition to the airfare.""" + + computerized_reservation_system: Optional[str] + """Indicates the computerized reservation system used to book the ticket.""" + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_cancellation", + "other", + "partial_refund_of_airline_ticket", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `airline_ticket_cancellation` - Airline ticket cancellation + - `other` - Other + - `partial_refund_of_airline_ticket` - Partial refund of airline ticket + """ + + departure_date: Optional[date] + """Date of departure.""" + + origination_city_airport_code: Optional[str] + """Code for the originating city or airport.""" + + passenger_name: Optional[str] + """Name of the passenger.""" + + restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] + """Indicates whether this ticket is non-refundable. + + - `no_restrictions` - No restrictions + - `restricted_non_refundable_ticket` - Restricted non-refundable ticket + """ + + ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] + """Indicates why a ticket was changed. + + - `none` - None + - `change_to_existing_ticket` - Change to existing ticket + - `new_ticket` - New ticket + """ + + ticket_number: Optional[str] + """Ticket number.""" + + travel_agency_code: Optional[str] + """Code for the travel agency if the ticket was issued by a travel agency.""" + + travel_agency_name: Optional[str] + """Name of the travel agency if the ticket was issued by a travel agency.""" + + trip_legs: Optional[List[TransactionSourceCardRefundPurchaseDetailsTravelTripLeg]] + """Fields specific to each leg of the journey.""" + + +class TransactionSourceCardRefundPurchaseDetails(BaseModel): + car_rental: Optional[TransactionSourceCardRefundPurchaseDetailsCarRental] + """Fields specific to car rentals.""" + + customer_reference_identifier: Optional[str] + """An identifier from the merchant for the customer or consumer.""" + + local_tax_amount: Optional[int] + """The state or provincial tax amount in minor units.""" + + local_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + lodging: Optional[TransactionSourceCardRefundPurchaseDetailsLodging] + """Fields specific to lodging.""" + + national_tax_amount: Optional[int] + """The national tax amount in minor units.""" + + national_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + purchase_identifier: Optional[str] + """An identifier from the merchant for the purchase to the issuer and cardholder.""" + + purchase_identifier_format: Optional[ + Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] + ] + """The format of the purchase identifier. + + - `free_text` - Free text + - `order_number` - Order number + - `rental_agreement_number` - Rental agreement number + - `hotel_folio_number` - Hotel folio number + - `invoice_number` - Invoice number + """ + + travel: Optional[TransactionSourceCardRefundPurchaseDetailsTravel] + """Fields specific to travel.""" + + class TransactionSourceCardRefund(BaseModel): id: str """The Card Refund identifier.""" @@ -395,6 +815,12 @@ class TransactionSourceCardRefund(BaseModel): merchant_state: Optional[str] """The state the merchant resides in.""" + purchase_details: Optional[TransactionSourceCardRefundPurchaseDetails] + """ + Additional details about the card purchase, such as tax and industry-specific + fields. + """ + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" @@ -435,6 +861,413 @@ class TransactionSourceCardRevenuePayment(BaseModel): """The account the card belonged to.""" +class TransactionSourceCardSettlementPurchaseDetailsCarRental(BaseModel): + car_class_code: Optional[str] + """Code indicating the vehicle's class.""" + + checkout_date: Optional[date] + """ + Date the customer picked up the car or, in the case of a no-show or pre-pay + transaction, the scheduled pick up date. + """ + + daily_rental_rate_amount: Optional[int] + """Daily rate being charged for the vehicle.""" + + daily_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + rate. + """ + + days_rented: Optional[int] + """Number of days the vehicle was rented.""" + + extra_charges: Optional[ + Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] + ] + """Additional charges (gas, late fee, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `gas` - Gas + - `extra_mileage` - Extra mileage + - `late_return` - Late return + - `one_way_service_fee` - One way service fee + - `parking_violation` - Parking violation + """ + + fuel_charges_amount: Optional[int] + """Fuel charges for the vehicle.""" + + fuel_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + assessed. + """ + + insurance_charges_amount: Optional[int] + """Any insurance being charged for the vehicle.""" + + insurance_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + charges assessed. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] + """ + An indicator that the cardholder is being billed for a reserved vehicle that was + not actually rented (that is, a "no-show" charge). + + - `not_applicable` - Not applicable + - `no_show_for_specialized_vehicle` - No show for specialized vehicle + """ + + one_way_drop_off_charges_amount: Optional[int] + """ + Charges for returning the vehicle at a different location than where it was + picked up. + """ + + one_way_drop_off_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + drop-off charges assessed. + """ + + renter_name: Optional[str] + """Name of the person renting the vehicle.""" + + weekly_rental_rate_amount: Optional[int] + """Weekly rate being charged for the vehicle.""" + + weekly_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + rental rate. + """ + + +class TransactionSourceCardSettlementPurchaseDetailsLodging(BaseModel): + check_in_date: Optional[date] + """Date the customer checked in.""" + + daily_room_rate_amount: Optional[int] + """Daily rate being charged for the room.""" + + daily_room_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + rate. + """ + + extra_charges: Optional[ + Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] + ] + """Additional charges (phone, late check-out, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `restaurant` - Restaurant + - `gift_shop` - Gift shop + - `mini_bar` - Mini bar + - `telephone` - Telephone + - `other` - Other + - `laundry` - Laundry + """ + + folio_cash_advances_amount: Optional[int] + """Folio cash advances for the room.""" + + folio_cash_advances_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + advances. + """ + + food_beverage_charges_amount: Optional[int] + """Food and beverage charges for the room.""" + + food_beverage_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the foor and + beverage charges. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show"]] + """ + Indicator that the cardholder is being billed for a reserved room that was not + actually used. + + - `not_applicable` - Not applicable + - `no_show` - No show + """ + + prepaid_expenses_amount: Optional[int] + """Prepaid expenses being charged for the room.""" + + prepaid_expenses_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + expenses. + """ + + room_nights: Optional[int] + """Number of nights the room was rented.""" + + total_room_tax_amount: Optional[int] + """Total room tax being charged.""" + + total_room_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + tax. + """ + + total_tax_amount: Optional[int] + """Total tax being charged for the room.""" + + total_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + assessed. + """ + + +class TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService(BaseModel): + category: Optional[ + Literal[ + "none", + "bundled_service", + "baggage_fee", + "change_fee", + "cargo", + "carbon_offset", + "frequent_flyer", + "gift_card", + "ground_transport", + "in_flight_entertainment", + "lounge", + "medical", + "meal_beverage", + "other", + "passenger_assist_fee", + "pets", + "seat_fees", + "standby", + "service_fee", + "store", + "travel_service", + "unaccompanied_travel", + "upgrades", + "wifi", + ] + ] + """Category of the ancillary service. + + - `none` - None + - `bundled_service` - Bundled service + - `baggage_fee` - Baggage fee + - `change_fee` - Change fee + - `cargo` - Cargo + - `carbon_offset` - Carbon offset + - `frequent_flyer` - Frequent flyer + - `gift_card` - Gift card + - `ground_transport` - Ground transport + - `in_flight_entertainment` - In-flight entertainment + - `lounge` - Lounge + - `medical` - Medical + - `meal_beverage` - Meal beverage + - `other` - Other + - `passenger_assist_fee` - Passenger assist fee + - `pets` - Pets + - `seat_fees` - Seat fees + - `standby` - Standby + - `service_fee` - Service fee + - `store` - Store + - `travel_service` - Travel service + - `unaccompanied_travel` - Unaccompanied travel + - `upgrades` - Upgrades + - `wifi` - Wi-fi + """ + + sub_category: Optional[str] + """Sub-category of the ancillary service, free-form.""" + + +class TransactionSourceCardSettlementPurchaseDetailsTravelAncillary(BaseModel): + connected_ticket_document_number: Optional[str] + """ + If this purchase has a connection or relationship to another purchase, such as a + baggage fee for a passenger transport ticket, this field should contain the + ticket document number for the other purchase. + """ + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "other", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `other` - Other + """ + + passenger_name_or_description: Optional[str] + """Name of the passenger or description of the ancillary purchase.""" + + services: List[TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService] + """Additional travel charges, such as baggage fees.""" + + ticket_document_number: Optional[str] + """Ticket document number.""" + + +class TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg(BaseModel): + carrier_code: Optional[str] + """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" + + destination_city_airport_code: Optional[str] + """Code for the destination city or airport.""" + + fare_basis_code: Optional[str] + """Fare basis code.""" + + flight_number: Optional[str] + """Flight number.""" + + service_class: Optional[str] + """Service class (e.g., first class, business class, etc.).""" + + stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] + """Indicates whether a stopover is allowed on this ticket. + + - `none` - None + - `stop_over_allowed` - Stop over allowed + - `stop_over_not_allowed` - Stop over not allowed + """ + + +class TransactionSourceCardSettlementPurchaseDetailsTravel(BaseModel): + ancillary: Optional[TransactionSourceCardSettlementPurchaseDetailsTravelAncillary] + """Ancillary purchases in addition to the airfare.""" + + computerized_reservation_system: Optional[str] + """Indicates the computerized reservation system used to book the ticket.""" + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_cancellation", + "other", + "partial_refund_of_airline_ticket", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `airline_ticket_cancellation` - Airline ticket cancellation + - `other` - Other + - `partial_refund_of_airline_ticket` - Partial refund of airline ticket + """ + + departure_date: Optional[date] + """Date of departure.""" + + origination_city_airport_code: Optional[str] + """Code for the originating city or airport.""" + + passenger_name: Optional[str] + """Name of the passenger.""" + + restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] + """Indicates whether this ticket is non-refundable. + + - `no_restrictions` - No restrictions + - `restricted_non_refundable_ticket` - Restricted non-refundable ticket + """ + + ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] + """Indicates why a ticket was changed. + + - `none` - None + - `change_to_existing_ticket` - Change to existing ticket + - `new_ticket` - New ticket + """ + + ticket_number: Optional[str] + """Ticket number.""" + + travel_agency_code: Optional[str] + """Code for the travel agency if the ticket was issued by a travel agency.""" + + travel_agency_name: Optional[str] + """Name of the travel agency if the ticket was issued by a travel agency.""" + + trip_legs: Optional[List[TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg]] + """Fields specific to each leg of the journey.""" + + +class TransactionSourceCardSettlementPurchaseDetails(BaseModel): + car_rental: Optional[TransactionSourceCardSettlementPurchaseDetailsCarRental] + """Fields specific to car rentals.""" + + customer_reference_identifier: Optional[str] + """An identifier from the merchant for the customer or consumer.""" + + local_tax_amount: Optional[int] + """The state or provincial tax amount in minor units.""" + + local_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + lodging: Optional[TransactionSourceCardSettlementPurchaseDetailsLodging] + """Fields specific to lodging.""" + + national_tax_amount: Optional[int] + """The national tax amount in minor units.""" + + national_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + purchase_identifier: Optional[str] + """An identifier from the merchant for the purchase to the issuer and cardholder.""" + + purchase_identifier_format: Optional[ + Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] + ] + """The format of the purchase identifier. + + - `free_text` - Free text + - `order_number` - Order number + - `rental_agreement_number` - Rental agreement number + - `hotel_folio_number` - Hotel folio number + - `invoice_number` - Invoice number + """ + + travel: Optional[TransactionSourceCardSettlementPurchaseDetailsTravel] + """Fields specific to travel.""" + + class TransactionSourceCardSettlement(BaseModel): id: str """The Card Settlement identifier.""" @@ -497,6 +1330,12 @@ class TransactionSourceCardSettlement(BaseModel): transaction's presentment currency. """ + purchase_details: Optional[TransactionSourceCardSettlementPurchaseDetails] + """ + Additional details about the card purchase, such as tax and industry-specific + fields. + """ + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" @@ -680,16 +1519,13 @@ class TransactionSourceCheckTransferIntention(BaseModel): """The identifier of the Check Transfer with which this is associated.""" -class TransactionSourceCheckTransferRejection(BaseModel): - transfer_id: str - """The identifier of the Check Transfer that led to this Transaction.""" - - class TransactionSourceCheckTransferStopPaymentRequest(BaseModel): - reason: Literal["mail_delivery_failed", "unknown"] + reason: Literal["mail_delivery_failed", "rejected_by_increase", "unknown"] """The reason why this transfer was stopped. - `mail_delivery_failed` - The check could not be delivered. + - `rejected_by_increase` - The check was cancelled by an Increase operator who + will provide details out-of-band. - `unknown` - The check was stopped for another reason. """ @@ -1109,6 +1945,7 @@ class TransactionSourceInternalSource(BaseModel): "account_closure", "bank_migration", "cashback", + "check_adjustment", "collection_receivable", "empyreal_adjustment", "error", @@ -1123,6 +1960,7 @@ class TransactionSourceInternalSource(BaseModel): - `account_closure` - Account closure - `bank_migration` - Bank migration - `cashback` - Cashback + - `check_adjustment` - Check adjustment - `collection_receivable` - Collection receivable - `empyreal_adjustment` - Empyreal adjustment - `error` - Error @@ -1247,7 +2085,6 @@ class TransactionSource(BaseModel): "check_deposit_return", "check_transfer_deposit", "check_transfer_intention", - "check_transfer_rejection", "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", @@ -1298,8 +2135,6 @@ class TransactionSource(BaseModel): Deposit object. Details will be under the `check_transfer_deposit` object. - `check_transfer_intention` - The Transaction was created by a Check Transfer Intention object. Details will be under the `check_transfer_intention` object. - - `check_transfer_rejection` - The Transaction was created by a Check Transfer - Rejection object. Details will be under the `check_transfer_rejection` object. - `check_transfer_stop_payment_request` - The Transaction was created by a Check Transfer Stop Payment Request object. Details will be under the `check_transfer_stop_payment_request` object. @@ -1372,13 +2207,6 @@ class TransactionSource(BaseModel): equal to `check_transfer_intention`. """ - check_transfer_rejection: Optional[TransactionSourceCheckTransferRejection] - """A Check Transfer Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_rejection`. - """ - check_transfer_stop_payment_request: Optional[TransactionSourceCheckTransferStopPaymentRequest] """A Check Transfer Stop Payment Request object. diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 222d431c7..eec5688fe 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. -from typing import Optional +from typing import List, Optional from datetime import date, datetime from typing_extensions import Literal @@ -15,13 +15,26 @@ "SourceACHTransferReturn", "SourceCardDisputeAcceptance", "SourceCardRefund", + "SourceCardRefundPurchaseDetails", + "SourceCardRefundPurchaseDetailsCarRental", + "SourceCardRefundPurchaseDetailsLodging", + "SourceCardRefundPurchaseDetailsTravel", + "SourceCardRefundPurchaseDetailsTravelAncillary", + "SourceCardRefundPurchaseDetailsTravelAncillaryService", + "SourceCardRefundPurchaseDetailsTravelTripLeg", "SourceCardRevenuePayment", "SourceCardSettlement", + "SourceCardSettlementPurchaseDetails", + "SourceCardSettlementPurchaseDetailsCarRental", + "SourceCardSettlementPurchaseDetailsLodging", + "SourceCardSettlementPurchaseDetailsTravel", + "SourceCardSettlementPurchaseDetailsTravelAncillary", + "SourceCardSettlementPurchaseDetailsTravelAncillaryService", + "SourceCardSettlementPurchaseDetailsTravelTripLeg", "SourceCheckDepositAcceptance", "SourceCheckDepositReturn", "SourceCheckTransferDeposit", "SourceCheckTransferIntention", - "SourceCheckTransferRejection", "SourceCheckTransferStopPaymentRequest", "SourceFeePayment", "SourceInboundACHTransfer", @@ -350,6 +363,413 @@ class SourceCardDisputeAcceptance(BaseModel): """ +class SourceCardRefundPurchaseDetailsCarRental(BaseModel): + car_class_code: Optional[str] + """Code indicating the vehicle's class.""" + + checkout_date: Optional[date] + """ + Date the customer picked up the car or, in the case of a no-show or pre-pay + transaction, the scheduled pick up date. + """ + + daily_rental_rate_amount: Optional[int] + """Daily rate being charged for the vehicle.""" + + daily_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + rate. + """ + + days_rented: Optional[int] + """Number of days the vehicle was rented.""" + + extra_charges: Optional[ + Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] + ] + """Additional charges (gas, late fee, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `gas` - Gas + - `extra_mileage` - Extra mileage + - `late_return` - Late return + - `one_way_service_fee` - One way service fee + - `parking_violation` - Parking violation + """ + + fuel_charges_amount: Optional[int] + """Fuel charges for the vehicle.""" + + fuel_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + assessed. + """ + + insurance_charges_amount: Optional[int] + """Any insurance being charged for the vehicle.""" + + insurance_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + charges assessed. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] + """ + An indicator that the cardholder is being billed for a reserved vehicle that was + not actually rented (that is, a "no-show" charge). + + - `not_applicable` - Not applicable + - `no_show_for_specialized_vehicle` - No show for specialized vehicle + """ + + one_way_drop_off_charges_amount: Optional[int] + """ + Charges for returning the vehicle at a different location than where it was + picked up. + """ + + one_way_drop_off_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + drop-off charges assessed. + """ + + renter_name: Optional[str] + """Name of the person renting the vehicle.""" + + weekly_rental_rate_amount: Optional[int] + """Weekly rate being charged for the vehicle.""" + + weekly_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + rental rate. + """ + + +class SourceCardRefundPurchaseDetailsLodging(BaseModel): + check_in_date: Optional[date] + """Date the customer checked in.""" + + daily_room_rate_amount: Optional[int] + """Daily rate being charged for the room.""" + + daily_room_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + rate. + """ + + extra_charges: Optional[ + Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] + ] + """Additional charges (phone, late check-out, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `restaurant` - Restaurant + - `gift_shop` - Gift shop + - `mini_bar` - Mini bar + - `telephone` - Telephone + - `other` - Other + - `laundry` - Laundry + """ + + folio_cash_advances_amount: Optional[int] + """Folio cash advances for the room.""" + + folio_cash_advances_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + advances. + """ + + food_beverage_charges_amount: Optional[int] + """Food and beverage charges for the room.""" + + food_beverage_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the foor and + beverage charges. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show"]] + """ + Indicator that the cardholder is being billed for a reserved room that was not + actually used. + + - `not_applicable` - Not applicable + - `no_show` - No show + """ + + prepaid_expenses_amount: Optional[int] + """Prepaid expenses being charged for the room.""" + + prepaid_expenses_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + expenses. + """ + + room_nights: Optional[int] + """Number of nights the room was rented.""" + + total_room_tax_amount: Optional[int] + """Total room tax being charged.""" + + total_room_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + tax. + """ + + total_tax_amount: Optional[int] + """Total tax being charged for the room.""" + + total_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + assessed. + """ + + +class SourceCardRefundPurchaseDetailsTravelAncillaryService(BaseModel): + category: Optional[ + Literal[ + "none", + "bundled_service", + "baggage_fee", + "change_fee", + "cargo", + "carbon_offset", + "frequent_flyer", + "gift_card", + "ground_transport", + "in_flight_entertainment", + "lounge", + "medical", + "meal_beverage", + "other", + "passenger_assist_fee", + "pets", + "seat_fees", + "standby", + "service_fee", + "store", + "travel_service", + "unaccompanied_travel", + "upgrades", + "wifi", + ] + ] + """Category of the ancillary service. + + - `none` - None + - `bundled_service` - Bundled service + - `baggage_fee` - Baggage fee + - `change_fee` - Change fee + - `cargo` - Cargo + - `carbon_offset` - Carbon offset + - `frequent_flyer` - Frequent flyer + - `gift_card` - Gift card + - `ground_transport` - Ground transport + - `in_flight_entertainment` - In-flight entertainment + - `lounge` - Lounge + - `medical` - Medical + - `meal_beverage` - Meal beverage + - `other` - Other + - `passenger_assist_fee` - Passenger assist fee + - `pets` - Pets + - `seat_fees` - Seat fees + - `standby` - Standby + - `service_fee` - Service fee + - `store` - Store + - `travel_service` - Travel service + - `unaccompanied_travel` - Unaccompanied travel + - `upgrades` - Upgrades + - `wifi` - Wi-fi + """ + + sub_category: Optional[str] + """Sub-category of the ancillary service, free-form.""" + + +class SourceCardRefundPurchaseDetailsTravelAncillary(BaseModel): + connected_ticket_document_number: Optional[str] + """ + If this purchase has a connection or relationship to another purchase, such as a + baggage fee for a passenger transport ticket, this field should contain the + ticket document number for the other purchase. + """ + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "other", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `other` - Other + """ + + passenger_name_or_description: Optional[str] + """Name of the passenger or description of the ancillary purchase.""" + + services: List[SourceCardRefundPurchaseDetailsTravelAncillaryService] + """Additional travel charges, such as baggage fees.""" + + ticket_document_number: Optional[str] + """Ticket document number.""" + + +class SourceCardRefundPurchaseDetailsTravelTripLeg(BaseModel): + carrier_code: Optional[str] + """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" + + destination_city_airport_code: Optional[str] + """Code for the destination city or airport.""" + + fare_basis_code: Optional[str] + """Fare basis code.""" + + flight_number: Optional[str] + """Flight number.""" + + service_class: Optional[str] + """Service class (e.g., first class, business class, etc.).""" + + stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] + """Indicates whether a stopover is allowed on this ticket. + + - `none` - None + - `stop_over_allowed` - Stop over allowed + - `stop_over_not_allowed` - Stop over not allowed + """ + + +class SourceCardRefundPurchaseDetailsTravel(BaseModel): + ancillary: Optional[SourceCardRefundPurchaseDetailsTravelAncillary] + """Ancillary purchases in addition to the airfare.""" + + computerized_reservation_system: Optional[str] + """Indicates the computerized reservation system used to book the ticket.""" + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_cancellation", + "other", + "partial_refund_of_airline_ticket", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `airline_ticket_cancellation` - Airline ticket cancellation + - `other` - Other + - `partial_refund_of_airline_ticket` - Partial refund of airline ticket + """ + + departure_date: Optional[date] + """Date of departure.""" + + origination_city_airport_code: Optional[str] + """Code for the originating city or airport.""" + + passenger_name: Optional[str] + """Name of the passenger.""" + + restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] + """Indicates whether this ticket is non-refundable. + + - `no_restrictions` - No restrictions + - `restricted_non_refundable_ticket` - Restricted non-refundable ticket + """ + + ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] + """Indicates why a ticket was changed. + + - `none` - None + - `change_to_existing_ticket` - Change to existing ticket + - `new_ticket` - New ticket + """ + + ticket_number: Optional[str] + """Ticket number.""" + + travel_agency_code: Optional[str] + """Code for the travel agency if the ticket was issued by a travel agency.""" + + travel_agency_name: Optional[str] + """Name of the travel agency if the ticket was issued by a travel agency.""" + + trip_legs: Optional[List[SourceCardRefundPurchaseDetailsTravelTripLeg]] + """Fields specific to each leg of the journey.""" + + +class SourceCardRefundPurchaseDetails(BaseModel): + car_rental: Optional[SourceCardRefundPurchaseDetailsCarRental] + """Fields specific to car rentals.""" + + customer_reference_identifier: Optional[str] + """An identifier from the merchant for the customer or consumer.""" + + local_tax_amount: Optional[int] + """The state or provincial tax amount in minor units.""" + + local_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + lodging: Optional[SourceCardRefundPurchaseDetailsLodging] + """Fields specific to lodging.""" + + national_tax_amount: Optional[int] + """The national tax amount in minor units.""" + + national_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + purchase_identifier: Optional[str] + """An identifier from the merchant for the purchase to the issuer and cardholder.""" + + purchase_identifier_format: Optional[ + Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] + ] + """The format of the purchase identifier. + + - `free_text` - Free text + - `order_number` - Order number + - `rental_agreement_number` - Rental agreement number + - `hotel_folio_number` - Hotel folio number + - `invoice_number` - Invoice number + """ + + travel: Optional[SourceCardRefundPurchaseDetailsTravel] + """Fields specific to travel.""" + + class SourceCardRefund(BaseModel): id: str """The Card Refund identifier.""" @@ -394,6 +814,12 @@ class SourceCardRefund(BaseModel): merchant_state: Optional[str] """The state the merchant resides in.""" + purchase_details: Optional[SourceCardRefundPurchaseDetails] + """ + Additional details about the card purchase, such as tax and industry-specific + fields. + """ + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" @@ -434,6 +860,413 @@ class SourceCardRevenuePayment(BaseModel): """The account the card belonged to.""" +class SourceCardSettlementPurchaseDetailsCarRental(BaseModel): + car_class_code: Optional[str] + """Code indicating the vehicle's class.""" + + checkout_date: Optional[date] + """ + Date the customer picked up the car or, in the case of a no-show or pre-pay + transaction, the scheduled pick up date. + """ + + daily_rental_rate_amount: Optional[int] + """Daily rate being charged for the vehicle.""" + + daily_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + rate. + """ + + days_rented: Optional[int] + """Number of days the vehicle was rented.""" + + extra_charges: Optional[ + Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] + ] + """Additional charges (gas, late fee, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `gas` - Gas + - `extra_mileage` - Extra mileage + - `late_return` - Late return + - `one_way_service_fee` - One way service fee + - `parking_violation` - Parking violation + """ + + fuel_charges_amount: Optional[int] + """Fuel charges for the vehicle.""" + + fuel_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + assessed. + """ + + insurance_charges_amount: Optional[int] + """Any insurance being charged for the vehicle.""" + + insurance_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + charges assessed. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] + """ + An indicator that the cardholder is being billed for a reserved vehicle that was + not actually rented (that is, a "no-show" charge). + + - `not_applicable` - Not applicable + - `no_show_for_specialized_vehicle` - No show for specialized vehicle + """ + + one_way_drop_off_charges_amount: Optional[int] + """ + Charges for returning the vehicle at a different location than where it was + picked up. + """ + + one_way_drop_off_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + drop-off charges assessed. + """ + + renter_name: Optional[str] + """Name of the person renting the vehicle.""" + + weekly_rental_rate_amount: Optional[int] + """Weekly rate being charged for the vehicle.""" + + weekly_rental_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + rental rate. + """ + + +class SourceCardSettlementPurchaseDetailsLodging(BaseModel): + check_in_date: Optional[date] + """Date the customer checked in.""" + + daily_room_rate_amount: Optional[int] + """Daily rate being charged for the room.""" + + daily_room_rate_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + rate. + """ + + extra_charges: Optional[ + Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] + ] + """Additional charges (phone, late check-out, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `restaurant` - Restaurant + - `gift_shop` - Gift shop + - `mini_bar` - Mini bar + - `telephone` - Telephone + - `other` - Other + - `laundry` - Laundry + """ + + folio_cash_advances_amount: Optional[int] + """Folio cash advances for the room.""" + + folio_cash_advances_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + advances. + """ + + food_beverage_charges_amount: Optional[int] + """Food and beverage charges for the room.""" + + food_beverage_charges_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the foor and + beverage charges. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show"]] + """ + Indicator that the cardholder is being billed for a reserved room that was not + actually used. + + - `not_applicable` - Not applicable + - `no_show` - No show + """ + + prepaid_expenses_amount: Optional[int] + """Prepaid expenses being charged for the room.""" + + prepaid_expenses_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + expenses. + """ + + room_nights: Optional[int] + """Number of nights the room was rented.""" + + total_room_tax_amount: Optional[int] + """Total room tax being charged.""" + + total_room_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + tax. + """ + + total_tax_amount: Optional[int] + """Total tax being charged for the room.""" + + total_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + assessed. + """ + + +class SourceCardSettlementPurchaseDetailsTravelAncillaryService(BaseModel): + category: Optional[ + Literal[ + "none", + "bundled_service", + "baggage_fee", + "change_fee", + "cargo", + "carbon_offset", + "frequent_flyer", + "gift_card", + "ground_transport", + "in_flight_entertainment", + "lounge", + "medical", + "meal_beverage", + "other", + "passenger_assist_fee", + "pets", + "seat_fees", + "standby", + "service_fee", + "store", + "travel_service", + "unaccompanied_travel", + "upgrades", + "wifi", + ] + ] + """Category of the ancillary service. + + - `none` - None + - `bundled_service` - Bundled service + - `baggage_fee` - Baggage fee + - `change_fee` - Change fee + - `cargo` - Cargo + - `carbon_offset` - Carbon offset + - `frequent_flyer` - Frequent flyer + - `gift_card` - Gift card + - `ground_transport` - Ground transport + - `in_flight_entertainment` - In-flight entertainment + - `lounge` - Lounge + - `medical` - Medical + - `meal_beverage` - Meal beverage + - `other` - Other + - `passenger_assist_fee` - Passenger assist fee + - `pets` - Pets + - `seat_fees` - Seat fees + - `standby` - Standby + - `service_fee` - Service fee + - `store` - Store + - `travel_service` - Travel service + - `unaccompanied_travel` - Unaccompanied travel + - `upgrades` - Upgrades + - `wifi` - Wi-fi + """ + + sub_category: Optional[str] + """Sub-category of the ancillary service, free-form.""" + + +class SourceCardSettlementPurchaseDetailsTravelAncillary(BaseModel): + connected_ticket_document_number: Optional[str] + """ + If this purchase has a connection or relationship to another purchase, such as a + baggage fee for a passenger transport ticket, this field should contain the + ticket document number for the other purchase. + """ + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "other", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `other` - Other + """ + + passenger_name_or_description: Optional[str] + """Name of the passenger or description of the ancillary purchase.""" + + services: List[SourceCardSettlementPurchaseDetailsTravelAncillaryService] + """Additional travel charges, such as baggage fees.""" + + ticket_document_number: Optional[str] + """Ticket document number.""" + + +class SourceCardSettlementPurchaseDetailsTravelTripLeg(BaseModel): + carrier_code: Optional[str] + """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" + + destination_city_airport_code: Optional[str] + """Code for the destination city or airport.""" + + fare_basis_code: Optional[str] + """Fare basis code.""" + + flight_number: Optional[str] + """Flight number.""" + + service_class: Optional[str] + """Service class (e.g., first class, business class, etc.).""" + + stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] + """Indicates whether a stopover is allowed on this ticket. + + - `none` - None + - `stop_over_allowed` - Stop over allowed + - `stop_over_not_allowed` - Stop over not allowed + """ + + +class SourceCardSettlementPurchaseDetailsTravel(BaseModel): + ancillary: Optional[SourceCardSettlementPurchaseDetailsTravelAncillary] + """Ancillary purchases in addition to the airfare.""" + + computerized_reservation_system: Optional[str] + """Indicates the computerized reservation system used to book the ticket.""" + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_cancellation", + "other", + "partial_refund_of_airline_ticket", + ] + ] + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `airline_ticket_cancellation` - Airline ticket cancellation + - `other` - Other + - `partial_refund_of_airline_ticket` - Partial refund of airline ticket + """ + + departure_date: Optional[date] + """Date of departure.""" + + origination_city_airport_code: Optional[str] + """Code for the originating city or airport.""" + + passenger_name: Optional[str] + """Name of the passenger.""" + + restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] + """Indicates whether this ticket is non-refundable. + + - `no_restrictions` - No restrictions + - `restricted_non_refundable_ticket` - Restricted non-refundable ticket + """ + + ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] + """Indicates why a ticket was changed. + + - `none` - None + - `change_to_existing_ticket` - Change to existing ticket + - `new_ticket` - New ticket + """ + + ticket_number: Optional[str] + """Ticket number.""" + + travel_agency_code: Optional[str] + """Code for the travel agency if the ticket was issued by a travel agency.""" + + travel_agency_name: Optional[str] + """Name of the travel agency if the ticket was issued by a travel agency.""" + + trip_legs: Optional[List[SourceCardSettlementPurchaseDetailsTravelTripLeg]] + """Fields specific to each leg of the journey.""" + + +class SourceCardSettlementPurchaseDetails(BaseModel): + car_rental: Optional[SourceCardSettlementPurchaseDetailsCarRental] + """Fields specific to car rentals.""" + + customer_reference_identifier: Optional[str] + """An identifier from the merchant for the customer or consumer.""" + + local_tax_amount: Optional[int] + """The state or provincial tax amount in minor units.""" + + local_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + lodging: Optional[SourceCardSettlementPurchaseDetailsLodging] + """Fields specific to lodging.""" + + national_tax_amount: Optional[int] + """The national tax amount in minor units.""" + + national_tax_currency: Optional[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + purchase_identifier: Optional[str] + """An identifier from the merchant for the purchase to the issuer and cardholder.""" + + purchase_identifier_format: Optional[ + Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] + ] + """The format of the purchase identifier. + + - `free_text` - Free text + - `order_number` - Order number + - `rental_agreement_number` - Rental agreement number + - `hotel_folio_number` - Hotel folio number + - `invoice_number` - Invoice number + """ + + travel: Optional[SourceCardSettlementPurchaseDetailsTravel] + """Fields specific to travel.""" + + class SourceCardSettlement(BaseModel): id: str """The Card Settlement identifier.""" @@ -496,6 +1329,12 @@ class SourceCardSettlement(BaseModel): transaction's presentment currency. """ + purchase_details: Optional[SourceCardSettlementPurchaseDetails] + """ + Additional details about the card purchase, such as tax and industry-specific + fields. + """ + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" @@ -679,16 +1518,13 @@ class SourceCheckTransferIntention(BaseModel): """The identifier of the Check Transfer with which this is associated.""" -class SourceCheckTransferRejection(BaseModel): - transfer_id: str - """The identifier of the Check Transfer that led to this Transaction.""" - - class SourceCheckTransferStopPaymentRequest(BaseModel): - reason: Literal["mail_delivery_failed", "unknown"] + reason: Literal["mail_delivery_failed", "rejected_by_increase", "unknown"] """The reason why this transfer was stopped. - `mail_delivery_failed` - The check could not be delivered. + - `rejected_by_increase` - The check was cancelled by an Increase operator who + will provide details out-of-band. - `unknown` - The check was stopped for another reason. """ @@ -1108,6 +1944,7 @@ class SourceInternalSource(BaseModel): "account_closure", "bank_migration", "cashback", + "check_adjustment", "collection_receivable", "empyreal_adjustment", "error", @@ -1122,6 +1959,7 @@ class SourceInternalSource(BaseModel): - `account_closure` - Account closure - `bank_migration` - Bank migration - `cashback` - Cashback + - `check_adjustment` - Check adjustment - `collection_receivable` - Collection receivable - `empyreal_adjustment` - Empyreal adjustment - `error` - Error @@ -1246,7 +2084,6 @@ class Source(BaseModel): "check_deposit_return", "check_transfer_deposit", "check_transfer_intention", - "check_transfer_rejection", "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", @@ -1297,8 +2134,6 @@ class Source(BaseModel): Deposit object. Details will be under the `check_transfer_deposit` object. - `check_transfer_intention` - The Transaction was created by a Check Transfer Intention object. Details will be under the `check_transfer_intention` object. - - `check_transfer_rejection` - The Transaction was created by a Check Transfer - Rejection object. Details will be under the `check_transfer_rejection` object. - `check_transfer_stop_payment_request` - The Transaction was created by a Check Transfer Stop Payment Request object. Details will be under the `check_transfer_stop_payment_request` object. @@ -1371,13 +2206,6 @@ class Source(BaseModel): equal to `check_transfer_intention`. """ - check_transfer_rejection: Optional[SourceCheckTransferRejection] - """A Check Transfer Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_rejection`. - """ - check_transfer_stop_payment_request: Optional[SourceCheckTransferStopPaymentRequest] """A Check Transfer Stop Payment Request object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 9f7cf99ab..8daa51639 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -52,7 +52,6 @@ class TransactionListParams(TypedDict, total=False): "check_deposit_return", "check_transfer_deposit", "check_transfer_intention", - "check_transfer_rejection", "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", diff --git a/tests/api_resources/entities/test_beneficial_owners.py b/tests/api_resources/entities/test_beneficial_owners.py new file mode 100644 index 000000000..49569c0b1 --- /dev/null +++ b/tests/api_resources/entities/test_beneficial_owners.py @@ -0,0 +1,165 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +import os + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import Entity +from increase._utils import parse_date + +base_url = os.environ.get("API_BASE_URL", "http://127.0.0.1:4010") +api_key = os.environ.get("API_KEY", "something1234") + + +class TestBeneficialOwners: + strict_client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) + loose_client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=False) + parametrize = pytest.mark.parametrize("client", [strict_client, loose_client], ids=["strict", "loose"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + beneficial_owner = client.entities.beneficial_owners.create( + "string", + beneficial_owner={ + "individual": { + "name": "x", + "date_of_birth": parse_date("2019-12-27"), + "address": { + "line1": "x", + "city": "x", + "state": "x", + "zip": "x", + }, + "identification": { + "method": "social_security_number", + "number": "xxxx", + }, + }, + "prong": "ownership", + }, + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + beneficial_owner = client.entities.beneficial_owners.create( + "string", + beneficial_owner={ + "individual": { + "name": "x", + "date_of_birth": parse_date("2019-12-27"), + "address": { + "line1": "x", + "line2": "x", + "city": "x", + "state": "x", + "zip": "x", + }, + "confirmed_no_us_tax_id": True, + "identification": { + "method": "social_security_number", + "number": "xxxx", + "passport": { + "file_id": "string", + "expiration_date": parse_date("2019-12-27"), + "country": "x", + }, + "drivers_license": { + "file_id": "string", + "back_file_id": "string", + "expiration_date": parse_date("2019-12-27"), + "state": "x", + }, + "other": { + "country": "x", + "description": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", + "back_file_id": "string", + }, + }, + }, + "company_title": "x", + "prong": "ownership", + }, + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + +class TestAsyncBeneficialOwners: + strict_client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) + loose_client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=False) + parametrize = pytest.mark.parametrize("client", [strict_client, loose_client], ids=["strict", "loose"]) + + @parametrize + async def test_method_create(self, client: AsyncIncrease) -> None: + beneficial_owner = await client.entities.beneficial_owners.create( + "string", + beneficial_owner={ + "individual": { + "name": "x", + "date_of_birth": parse_date("2019-12-27"), + "address": { + "line1": "x", + "city": "x", + "state": "x", + "zip": "x", + }, + "identification": { + "method": "social_security_number", + "number": "xxxx", + }, + }, + "prong": "ownership", + }, + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: + beneficial_owner = await client.entities.beneficial_owners.create( + "string", + beneficial_owner={ + "individual": { + "name": "x", + "date_of_birth": parse_date("2019-12-27"), + "address": { + "line1": "x", + "line2": "x", + "city": "x", + "state": "x", + "zip": "x", + }, + "confirmed_no_us_tax_id": True, + "identification": { + "method": "social_security_number", + "number": "xxxx", + "passport": { + "file_id": "string", + "expiration_date": parse_date("2019-12-27"), + "country": "x", + }, + "drivers_license": { + "file_id": "string", + "back_file_id": "string", + "expiration_date": parse_date("2019-12-27"), + "state": "x", + }, + "other": { + "country": "x", + "description": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", + "back_file_id": "string", + }, + }, + }, + "company_title": "x", + "prong": "ownership", + }, + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) diff --git a/tests/api_resources/simulations/test_interest_payments.py b/tests/api_resources/simulations/test_interest_payments.py index 3b9601d63..8f912878d 100644 --- a/tests/api_resources/simulations/test_interest_payments.py +++ b/tests/api_resources/simulations/test_interest_payments.py @@ -8,6 +8,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase._utils import parse_datetime from increase.types.simulations import InterestPaymentSimulationResult base_url = os.environ.get("API_BASE_URL", "http://127.0.0.1:4010") @@ -27,6 +28,16 @@ def test_method_create(self, client: Increase) -> None: ) assert_matches_type(InterestPaymentSimulationResult, interest_payment, path=["response"]) + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + interest_payment = client.simulations.interest_payments.create( + account_id="string", + amount=1, + period_end=parse_datetime("2019-12-27T18:11:19.117Z"), + period_start=parse_datetime("2019-12-27T18:11:19.117Z"), + ) + assert_matches_type(InterestPaymentSimulationResult, interest_payment, path=["response"]) + class TestAsyncInterestPayments: strict_client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) @@ -40,3 +51,13 @@ async def test_method_create(self, client: AsyncIncrease) -> None: amount=1, ) assert_matches_type(InterestPaymentSimulationResult, interest_payment, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, client: AsyncIncrease) -> None: + interest_payment = await client.simulations.interest_payments.create( + account_id="string", + amount=1, + period_end=parse_datetime("2019-12-27T18:11:19.117Z"), + period_start=parse_datetime("2019-12-27T18:11:19.117Z"), + ) + assert_matches_type(InterestPaymentSimulationResult, interest_payment, path=["response"]) diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py new file mode 100644 index 000000000..b096de5b6 --- /dev/null +++ b/tests/api_resources/test_card_purchase_supplements.py @@ -0,0 +1,82 @@ +# File generated from our OpenAPI spec by Stainless. + +from __future__ import annotations + +import os + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardPurchaseSupplement +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("API_BASE_URL", "http://127.0.0.1:4010") +api_key = os.environ.get("API_KEY", "something1234") + + +class TestCardPurchaseSupplements: + strict_client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) + loose_client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=False) + parametrize = pytest.mark.parametrize("client", [strict_client, loose_client], ids=["strict", "loose"]) + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + card_purchase_supplement = client.card_purchase_supplements.retrieve( + "string", + ) + assert_matches_type(CardPurchaseSupplement, card_purchase_supplement, path=["response"]) + + @parametrize + def test_method_list(self, client: Increase) -> None: + card_purchase_supplement = client.card_purchase_supplements.list() + assert_matches_type(SyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + card_purchase_supplement = client.card_purchase_supplements.list( + card_payment_id="string", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="string", + limit=0, + ) + assert_matches_type(SyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) + + +class TestAsyncCardPurchaseSupplements: + strict_client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) + loose_client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=False) + parametrize = pytest.mark.parametrize("client", [strict_client, loose_client], ids=["strict", "loose"]) + + @parametrize + async def test_method_retrieve(self, client: AsyncIncrease) -> None: + card_purchase_supplement = await client.card_purchase_supplements.retrieve( + "string", + ) + assert_matches_type(CardPurchaseSupplement, card_purchase_supplement, path=["response"]) + + @parametrize + async def test_method_list(self, client: AsyncIncrease) -> None: + card_purchase_supplement = await client.card_purchase_supplements.list() + assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, client: AsyncIncrease) -> None: + card_purchase_supplement = await client.card_purchase_supplements.list( + card_payment_id="string", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="string", + limit=0, + ) + assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"])