diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3e05ae56..3ca49358 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.108.0" + ".": "0.109.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 9d7ea8ff..ec2c9d76 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 169 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-b1839661d8405911184d5cb7230f16e626a616e5b744634bd7f0bb4e730bf899.yml -openapi_spec_hash: c1c2c5a5c2a4067a714b35f873e3846f -config_hash: 98214f2eab6804b5c0048331e32c08e3 +configured_endpoints: 168 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-6432801dcf017d9234739b9f6153a8cfecd91255af4765f24ba5209f3e320b5c.yml +openapi_spec_hash: c2cfee2f044ba15d15b5bfdbd37280c0 +config_hash: 8ac73ccdb428816c89c84802c794a3f8 diff --git a/CHANGELOG.md b/CHANGELOG.md index ba4158b0..9492a453 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.109.0 (2025-10-23) + +Full Changelog: [v0.108.0...v0.109.0](https://github.com/lithic-com/lithic-python/compare/v0.108.0...v0.109.0) + +### Features + +* **api:** updates to Auth Rules and Card provisioning ([5a634bb](https://github.com/lithic-com/lithic-python/commit/5a634bbbaccf90921d5339d4173c6798e11f5898)) + + +### Chores + +* bump `httpx-aiohttp` version to 0.1.9 ([1f43f1d](https://github.com/lithic-com/lithic-python/commit/1f43f1da5db00568795b4f04462f075ea7130d16)) +* **internal:** detect missing future annotations with ruff ([a179321](https://github.com/lithic-com/lithic-python/commit/a1793216b4f1e68c98b6c6d22314ebbc34cba322)) + ## 0.108.0 (2025-10-08) Full Changelog: [v0.107.0...v0.108.0](https://github.com/lithic-com/lithic-python/compare/v0.107.0...v0.108.0) diff --git a/api.md b/api.md index 28aa2a57..4be71c91 100644 --- a/api.md +++ b/api.md @@ -95,7 +95,6 @@ from lithic.types.auth_rules import ( V2ApplyResponse, V2DraftResponse, V2PromoteResponse, - V2ReportResponse, V2RetrieveFeaturesResponse, V2RetrieveReportResponse, ) @@ -111,7 +110,6 @@ Methods: - client.auth_rules.v2.apply(auth_rule_token, \*\*params) -> V2ApplyResponse - client.auth_rules.v2.draft(auth_rule_token, \*\*params) -> V2DraftResponse - client.auth_rules.v2.promote(auth_rule_token) -> V2PromoteResponse -- client.auth_rules.v2.report(auth_rule_token) -> V2ReportResponse - client.auth_rules.v2.retrieve_features(auth_rule_token, \*\*params) -> V2RetrieveFeaturesResponse - client.auth_rules.v2.retrieve_report(auth_rule_token, \*\*params) -> V2RetrieveReportResponse @@ -187,6 +185,7 @@ from lithic.types import ( Card, CardSpendLimits, NonPCICard, + ProvisionResponse, SpendLimitDuration, CardEmbedResponse, CardProvisionResponse, diff --git a/pyproject.toml b/pyproject.toml index 2e4e1522..25906cf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "lithic" -version = "0.108.0" +version = "0.109.0" description = "The official Python library for the lithic API" dynamic = ["readme"] license = "Apache-2.0" @@ -39,7 +39,7 @@ Homepage = "https://github.com/lithic-com/lithic-python" Repository = "https://github.com/lithic-com/lithic-python" [project.optional-dependencies] -aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"] +aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"] [tool.rye] managed = true @@ -224,6 +224,8 @@ select = [ "B", # remove unused imports "F401", + # check for missing future annotations + "FA102", # bare except statements "E722", # unused arguments @@ -246,6 +248,8 @@ unfixable = [ "T203", ] +extend-safe-fixes = ["FA102"] + [tool.ruff.lint.flake8-tidy-imports.banned-api] "functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead" diff --git a/requirements-dev.lock b/requirements-dev.lock index 536db4b5..0ef7413b 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -56,7 +56,7 @@ httpx==0.28.1 # via httpx-aiohttp # via lithic # via respx -httpx-aiohttp==0.1.8 +httpx-aiohttp==0.1.9 # via lithic idna==3.4 # via anyio diff --git a/requirements.lock b/requirements.lock index b7ae71e8..3e496202 100644 --- a/requirements.lock +++ b/requirements.lock @@ -43,7 +43,7 @@ httpcore==1.0.9 httpx==0.28.1 # via httpx-aiohttp # via lithic -httpx-aiohttp==0.1.8 +httpx-aiohttp==0.1.9 # via lithic idna==3.4 # via anyio diff --git a/src/lithic/_version.py b/src/lithic/_version.py index a58912ad..38226f24 100644 --- a/src/lithic/_version.py +++ b/src/lithic/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "lithic" -__version__ = "0.108.0" # x-release-please-version +__version__ = "0.109.0" # x-release-please-version diff --git a/src/lithic/resources/auth_rules/v2/v2.py b/src/lithic/resources/auth_rules/v2/v2.py index eb7d1bb8..ea3f250e 100644 --- a/src/lithic/resources/auth_rules/v2/v2.py +++ b/src/lithic/resources/auth_rules/v2/v2.py @@ -38,7 +38,6 @@ from ....types.auth_rules.v2_apply_response import V2ApplyResponse from ....types.auth_rules.v2_draft_response import V2DraftResponse from ....types.auth_rules.v2_create_response import V2CreateResponse -from ....types.auth_rules.v2_report_response import V2ReportResponse from ....types.auth_rules.v2_update_response import V2UpdateResponse from ....types.auth_rules.v2_promote_response import V2PromoteResponse from ....types.auth_rules.v2_retrieve_response import V2RetrieveResponse @@ -796,91 +795,6 @@ def promote( cast_to=V2PromoteResponse, ) - @typing_extensions.deprecated("deprecated") - def report( - self, - auth_rule_token: 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 | httpx.Timeout | None | NotGiven = not_given, - ) -> V2ReportResponse: - """This endpoint is deprecated and will be removed in the future. - - Requests a - performance report of an Auth rule to be asynchronously generated. Reports can - only be run on rules in draft or active mode and will included approved and - declined statistics as well as examples. The generated report will be delivered - asynchronously through a webhook with `event_type` = - `auth_rules.performance_report.created`. See the docs on setting up - [webhook subscriptions](https://docs.lithic.com/docs/events-api). - - Reports are generated based on data collected by Lithic's processing system in - the trailing week. The performance of the auth rule will be assessed on the - configuration of the auth rule at the time the report is requested. This implies - that if a performance report is requested, right after updating an auth rule, - depending on the number of events processed for a card program, it may be the - case that no data is available for the report. Therefore Lithic recommends to - decouple making updates to an Auth Rule, and requesting performance reports. - - To make this concrete, consider the following example: - - 1. At time `t`, a new Auth Rule is created, and applies to all auth events on a - card program. The Auth Rule has not yet been promoted, causing the draft - version of the rule to be applied in shadow mode. - 2. At time `t + 1 hour` a performance report is requested for the Auth Rule. - This performance report will _only_ contain data for the Auth Rule being - executed in the window between `t` and `t + 1 hour`. This is because Lithic's - transaction processing system will only start capturing data for the Auth - Rule at the time it is created. - 3. At time `t + 2 hours` the draft version of the Auth Rule is promoted to the - active version of the Auth Rule by calling the - `/v2/auth_rules/{auth_rule_token}/promote` endpoint. If a performance report - is requested at this moment it will still only contain data for this version - of the rule, but the window of available data will now span from `t` to - `t + 2 hours`. - 4. At time `t + 3 hours` a new version of the rule is drafted by calling the - `/v2/auth_rules/{auth_rule_token}/draft` endpoint. If a performance report is - requested right at this moment, it will only contain data for events to which - both the active version and the draft version is applied. Lithic does this to - ensure that performance reports represent a fair comparison between rules. - Because there may be no events in this window, and because there may be some - lag before data is available in a performance report, the requested - performance report could contain no to little data. - 5. At time `t + 4 hours` another performance report is requested: this time the - performance report will contain data from the window between `t + 3 hours` - and `t + 4 hours`, for any events to which both the current version of the - Auth rule (in enforcing mode) and the draft version of the Auth rule (in - shadow mode) applied. - - Note that generating a report may take up to 15 minutes and that delivery is not - guaranteed. Customers are required to have created an event subscription to - receive the webhook. Additionally, there is a delay of approximately 15 minutes - between when Lithic's transaction processing systems have processed the - transaction, and when a transaction will be included in the report. - - Args: - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not auth_rule_token: - raise ValueError(f"Expected a non-empty value for `auth_rule_token` but received {auth_rule_token!r}") - return self._post( - f"/v2/auth_rules/{auth_rule_token}/report", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=V2ReportResponse, - ) - def retrieve_features( self, auth_rule_token: str, @@ -1744,91 +1658,6 @@ async def promote( cast_to=V2PromoteResponse, ) - @typing_extensions.deprecated("deprecated") - async def report( - self, - auth_rule_token: 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 | httpx.Timeout | None | NotGiven = not_given, - ) -> V2ReportResponse: - """This endpoint is deprecated and will be removed in the future. - - Requests a - performance report of an Auth rule to be asynchronously generated. Reports can - only be run on rules in draft or active mode and will included approved and - declined statistics as well as examples. The generated report will be delivered - asynchronously through a webhook with `event_type` = - `auth_rules.performance_report.created`. See the docs on setting up - [webhook subscriptions](https://docs.lithic.com/docs/events-api). - - Reports are generated based on data collected by Lithic's processing system in - the trailing week. The performance of the auth rule will be assessed on the - configuration of the auth rule at the time the report is requested. This implies - that if a performance report is requested, right after updating an auth rule, - depending on the number of events processed for a card program, it may be the - case that no data is available for the report. Therefore Lithic recommends to - decouple making updates to an Auth Rule, and requesting performance reports. - - To make this concrete, consider the following example: - - 1. At time `t`, a new Auth Rule is created, and applies to all auth events on a - card program. The Auth Rule has not yet been promoted, causing the draft - version of the rule to be applied in shadow mode. - 2. At time `t + 1 hour` a performance report is requested for the Auth Rule. - This performance report will _only_ contain data for the Auth Rule being - executed in the window between `t` and `t + 1 hour`. This is because Lithic's - transaction processing system will only start capturing data for the Auth - Rule at the time it is created. - 3. At time `t + 2 hours` the draft version of the Auth Rule is promoted to the - active version of the Auth Rule by calling the - `/v2/auth_rules/{auth_rule_token}/promote` endpoint. If a performance report - is requested at this moment it will still only contain data for this version - of the rule, but the window of available data will now span from `t` to - `t + 2 hours`. - 4. At time `t + 3 hours` a new version of the rule is drafted by calling the - `/v2/auth_rules/{auth_rule_token}/draft` endpoint. If a performance report is - requested right at this moment, it will only contain data for events to which - both the active version and the draft version is applied. Lithic does this to - ensure that performance reports represent a fair comparison between rules. - Because there may be no events in this window, and because there may be some - lag before data is available in a performance report, the requested - performance report could contain no to little data. - 5. At time `t + 4 hours` another performance report is requested: this time the - performance report will contain data from the window between `t + 3 hours` - and `t + 4 hours`, for any events to which both the current version of the - Auth rule (in enforcing mode) and the draft version of the Auth rule (in - shadow mode) applied. - - Note that generating a report may take up to 15 minutes and that delivery is not - guaranteed. Customers are required to have created an event subscription to - receive the webhook. Additionally, there is a delay of approximately 15 minutes - between when Lithic's transaction processing systems have processed the - transaction, and when a transaction will be included in the report. - - Args: - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not auth_rule_token: - raise ValueError(f"Expected a non-empty value for `auth_rule_token` but received {auth_rule_token!r}") - return await self._post( - f"/v2/auth_rules/{auth_rule_token}/report", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=V2ReportResponse, - ) - async def retrieve_features( self, auth_rule_token: str, @@ -1974,11 +1803,6 @@ def __init__(self, v2: V2) -> None: self.promote = _legacy_response.to_raw_response_wrapper( v2.promote, ) - self.report = ( # pyright: ignore[reportDeprecated] - _legacy_response.to_raw_response_wrapper( - v2.report, # pyright: ignore[reportDeprecated], - ) - ) self.retrieve_features = _legacy_response.to_raw_response_wrapper( v2.retrieve_features, ) @@ -2021,11 +1845,6 @@ def __init__(self, v2: AsyncV2) -> None: self.promote = _legacy_response.async_to_raw_response_wrapper( v2.promote, ) - self.report = ( # pyright: ignore[reportDeprecated] - _legacy_response.async_to_raw_response_wrapper( - v2.report, # pyright: ignore[reportDeprecated], - ) - ) self.retrieve_features = _legacy_response.async_to_raw_response_wrapper( v2.retrieve_features, ) @@ -2068,11 +1887,6 @@ def __init__(self, v2: V2) -> None: self.promote = to_streamed_response_wrapper( v2.promote, ) - self.report = ( # pyright: ignore[reportDeprecated] - to_streamed_response_wrapper( - v2.report, # pyright: ignore[reportDeprecated], - ) - ) self.retrieve_features = to_streamed_response_wrapper( v2.retrieve_features, ) @@ -2115,11 +1929,6 @@ def __init__(self, v2: AsyncV2) -> None: self.promote = async_to_streamed_response_wrapper( v2.promote, ) - self.report = ( # pyright: ignore[reportDeprecated] - async_to_streamed_response_wrapper( - v2.report, # pyright: ignore[reportDeprecated], - ) - ) self.retrieve_features = async_to_streamed_response_wrapper( v2.retrieve_features, ) diff --git a/src/lithic/resources/events/events.py b/src/lithic/resources/events/events.py index 99fdbb51..fdec4d03 100644 --- a/src/lithic/resources/events/events.py +++ b/src/lithic/resources/events/events.py @@ -111,7 +111,6 @@ def list( "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", @@ -380,7 +379,6 @@ def list( "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", diff --git a/src/lithic/resources/events/subscriptions.py b/src/lithic/resources/events/subscriptions.py index cfe0fe4d..3e6cefe3 100644 --- a/src/lithic/resources/events/subscriptions.py +++ b/src/lithic/resources/events/subscriptions.py @@ -63,7 +63,6 @@ def create( "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", @@ -202,7 +201,6 @@ def update( "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", @@ -647,7 +645,6 @@ def send_simulated_example( "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", @@ -762,7 +759,6 @@ async def create( "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", @@ -901,7 +897,6 @@ async def update( "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", @@ -1346,7 +1341,6 @@ async def send_simulated_example( "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", diff --git a/src/lithic/resources/external_bank_accounts/external_bank_accounts.py b/src/lithic/resources/external_bank_accounts/external_bank_accounts.py index 7a07ef0c..904c4080 100644 --- a/src/lithic/resources/external_bank_accounts/external_bank_accounts.py +++ b/src/lithic/resources/external_bank_accounts/external_bank_accounts.py @@ -148,59 +148,6 @@ def create( """ ... - @overload - def create( - self, - *, - owner: str, - owner_type: OwnerType, - processor_token: str, - verification_method: VerificationMethod, - account_token: str | Omit = omit, - company_id: str | Omit = omit, - dob: Union[str, date] | Omit = omit, - doing_business_as: str | Omit = omit, - user_defined_id: str | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> ExternalBankAccountCreateResponse: - """ - Creates an external bank account within a program or Lithic account. - - Args: - owner: Legal Name of the business or individual who owns the external account. This - will appear in statements - - owner_type: Owner Type - - verification_method: Verification Method - - account_token: Indicates which Lithic account the external account is associated with. For - external accounts that are associated with the program, account_token field - returned will be null - - company_id: Optional field that helps identify bank accounts in receipts - - dob: Date of Birth of the Individual that owns the external bank account - - doing_business_as: Doing Business As - - user_defined_id: User Defined ID - - 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 - """ - ... - @overload def create( self, @@ -361,7 +308,6 @@ def create( "type", "verification_method", ], - ["owner", "owner_type", "processor_token", "verification_method"], [ "account_number", "country", @@ -376,24 +322,23 @@ def create( def create( self, *, - account_number: str | Omit = omit, - country: str | Omit = omit, - currency: str | Omit = omit, + account_number: str, + country: str, + currency: str, financial_account_token: str | Omit = omit, owner: str, owner_type: OwnerType, - routing_number: str | Omit = omit, - type: Literal["CHECKING", "SAVINGS"] | Omit = omit, + routing_number: str, + type: Literal["CHECKING", "SAVINGS"], verification_method: VerificationMethod | Literal["EXTERNALLY_VERIFIED"] | Literal["UNVERIFIED"], account_token: str | Omit = omit, address: ExternalBankAccountAddressParam | Omit = omit, company_id: str | Omit = omit, - dob: Union[str, date] | Union[str, date] | Union[str, date] | Union[str, date] | Omit = omit, + dob: Union[str, date] | Union[str, date] | Union[str, date] | Omit = omit, doing_business_as: str | Omit = omit, name: str | Omit = omit, user_defined_id: str | Omit = omit, verification_enforcement: bool | Omit = omit, - processor_token: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -422,7 +367,6 @@ def create( "name": name, "user_defined_id": user_defined_id, "verification_enforcement": verification_enforcement, - "processor_token": processor_token, }, external_bank_account_create_params.ExternalBankAccountCreateParams, ), @@ -791,59 +735,6 @@ async def create( """ ... - @overload - async def create( - self, - *, - owner: str, - owner_type: OwnerType, - processor_token: str, - verification_method: VerificationMethod, - account_token: str | Omit = omit, - company_id: str | Omit = omit, - dob: Union[str, date] | Omit = omit, - doing_business_as: str | Omit = omit, - user_defined_id: str | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> ExternalBankAccountCreateResponse: - """ - Creates an external bank account within a program or Lithic account. - - Args: - owner: Legal Name of the business or individual who owns the external account. This - will appear in statements - - owner_type: Owner Type - - verification_method: Verification Method - - account_token: Indicates which Lithic account the external account is associated with. For - external accounts that are associated with the program, account_token field - returned will be null - - company_id: Optional field that helps identify bank accounts in receipts - - dob: Date of Birth of the Individual that owns the external bank account - - doing_business_as: Doing Business As - - user_defined_id: User Defined ID - - 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 - """ - ... - @overload async def create( self, @@ -1004,7 +895,6 @@ async def create( "type", "verification_method", ], - ["owner", "owner_type", "processor_token", "verification_method"], [ "account_number", "country", @@ -1019,24 +909,23 @@ async def create( async def create( self, *, - account_number: str | Omit = omit, - country: str | Omit = omit, - currency: str | Omit = omit, + account_number: str, + country: str, + currency: str, financial_account_token: str | Omit = omit, owner: str, owner_type: OwnerType, - routing_number: str | Omit = omit, - type: Literal["CHECKING", "SAVINGS"] | Omit = omit, + routing_number: str, + type: Literal["CHECKING", "SAVINGS"], verification_method: VerificationMethod | Literal["EXTERNALLY_VERIFIED"] | Literal["UNVERIFIED"], account_token: str | Omit = omit, address: ExternalBankAccountAddressParam | Omit = omit, company_id: str | Omit = omit, - dob: Union[str, date] | Union[str, date] | Union[str, date] | Union[str, date] | Omit = omit, + dob: Union[str, date] | Union[str, date] | Union[str, date] | Omit = omit, doing_business_as: str | Omit = omit, name: str | Omit = omit, user_defined_id: str | Omit = omit, verification_enforcement: bool | Omit = omit, - processor_token: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1065,7 +954,6 @@ async def create( "name": name, "user_defined_id": user_defined_id, "verification_enforcement": verification_enforcement, - "processor_token": processor_token, }, external_bank_account_create_params.ExternalBankAccountCreateParams, ), diff --git a/src/lithic/types/__init__.py b/src/lithic/types/__init__.py index 228ca5b7..b8b6c968 100644 --- a/src/lithic/types/__init__.py +++ b/src/lithic/types/__init__.py @@ -47,6 +47,7 @@ from .card_create_params import CardCreateParams as CardCreateParams from .card_update_params import CardUpdateParams as CardUpdateParams from .event_subscription import EventSubscription as EventSubscription +from .provision_response import ProvisionResponse as ProvisionResponse from .wire_party_details import WirePartyDetails as WirePartyDetails from .account_list_params import AccountListParams as AccountListParams from .balance_list_params import BalanceListParams as BalanceListParams diff --git a/src/lithic/types/account_activity_list_response.py b/src/lithic/types/account_activity_list_response.py index 356927b1..c24679a6 100644 --- a/src/lithic/types/account_activity_list_response.py +++ b/src/lithic/types/account_activity_list_response.py @@ -1,31 +1,18 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Union, Optional -from datetime import date, datetime -from typing_extensions import Literal, TypeAlias +from datetime import datetime +from typing_extensions import Literal, Annotated, TypeAlias +from .._utils import PropertyInfo +from .payment import Payment from .._models import BaseModel from .transaction import Transaction from .external_payment import ExternalPayment -from .external_resource import ExternalResource -from .wire_party_details import WirePartyDetails +from .book_transfer_response import BookTransferResponse from .management_operation_transaction import ManagementOperationTransaction -__all__ = [ - "AccountActivityListResponse", - "FinancialTransaction", - "FinancialTransactionEvent", - "BookTransferTransaction", - "BookTransferTransactionEvent", - "BookTransferTransactionTransactionSeries", - "CardTransaction", - "PaymentTransaction", - "PaymentTransactionEvent", - "PaymentTransactionMethodAttributes", - "PaymentTransactionMethodAttributesACHMethodAttributes", - "PaymentTransactionMethodAttributesWireMethodAttributes", - "PaymentTransactionRelatedAccountTokens", -] +__all__ = ["AccountActivityListResponse", "FinancialTransaction", "FinancialTransactionEvent", "CardTransaction"] class FinancialTransactionEvent(BaseModel): @@ -161,7 +148,8 @@ class FinancialTransaction(BaseModel): events: List[FinancialTransactionEvent] """List of transaction events""" - family: Literal["CARD", "PAYMENT", "TRANSFER", "INTERNAL", "EXTERNAL_PAYMENT", "MANAGEMENT_OPERATION"] + family: Literal["INTERNAL"] + """INTERNAL - Financial Transaction""" financial_account_token: str """Financial account token associated with the transaction""" @@ -182,380 +170,18 @@ class FinancialTransaction(BaseModel): """ISO 8601 timestamp of when the transaction was last updated""" -class BookTransferTransactionEvent(BaseModel): - token: str - """Globally unique identifier.""" - - amount: int - """ - Amount of the financial event that has been settled in the currency's smallest - unit (e.g., cents). - """ - - created: datetime - """Date and time when the financial event occurred. UTC time zone.""" - - detailed_results: Literal["APPROVED", "FUNDS_INSUFFICIENT"] - - memo: str - """Memo for the transfer.""" - - result: Literal["APPROVED", "DECLINED"] - """ - APPROVED financial events were successful while DECLINED financial events were - declined by user, Lithic, or the network. - """ - - subtype: str - """The program specific subtype code for the specified category/type.""" - - type: Literal[ - "ATM_BALANCE_INQUIRY", - "ATM_WITHDRAWAL", - "ATM_DECLINE", - "INTERNATIONAL_ATM_WITHDRAWAL", - "INACTIVITY", - "STATEMENT", - "MONTHLY", - "QUARTERLY", - "ANNUAL", - "CUSTOMER_SERVICE", - "ACCOUNT_MAINTENANCE", - "ACCOUNT_ACTIVATION", - "ACCOUNT_CLOSURE", - "CARD_REPLACEMENT", - "CARD_DELIVERY", - "CARD_CREATE", - "CURRENCY_CONVERSION", - "INTEREST", - "LATE_PAYMENT", - "BILL_PAYMENT", - "CASH_BACK", - "ACCOUNT_TO_ACCOUNT", - "CARD_TO_CARD", - "DISBURSE", - "BILLING_ERROR", - "LOSS_WRITE_OFF", - "EXPIRED_CARD", - "EARLY_DERECOGNITION", - "ESCHEATMENT", - "INACTIVITY_FEE_DOWN", - "PROVISIONAL_CREDIT", - "DISPUTE_WON", - "SERVICE", - "TRANSFER", - "COLLECTION", - ] - """Type of the book transfer""" - - -class BookTransferTransactionTransactionSeries(BaseModel): - related_transaction_event_token: Optional[str] = None - - related_transaction_token: Optional[str] = None - - type: str - - -class BookTransferTransaction(BaseModel): - token: str - """Unique identifier for the transaction""" - - category: Literal[ - "ADJUSTMENT", - "BALANCE_OR_FUNDING", - "DERECOGNITION", - "DISPUTE", - "FEE", - "INTERNAL", - "REWARD", - "PROGRAM_FUNDING", - "TRANSFER", - ] - - created: datetime - """ISO 8601 timestamp of when the transaction was created""" - - currency: str - """Currency of the transaction in ISO 4217 format""" - - events: List[BookTransferTransactionEvent] - """List of events associated with this book transfer""" - - family: Literal["CARD", "PAYMENT", "TRANSFER", "INTERNAL", "EXTERNAL_PAYMENT", "MANAGEMENT_OPERATION"] - - from_financial_account_token: str - """Source account token""" - - pending_amount: int - """The pending amount of the transaction in cents""" - - result: Literal["APPROVED", "DECLINED"] - - settled_amount: int - """The settled amount of the transaction in cents""" - - status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] - """The status of the transaction""" - - to_financial_account_token: str - """Destination account token""" - - updated: datetime - """ISO 8601 timestamp of when the transaction was last updated""" - - external_id: Optional[str] = None - """External identifier for the transaction""" - - external_resource: Optional[ExternalResource] = None - """External resource associated with the management operation""" - - transaction_series: Optional[BookTransferTransactionTransactionSeries] = None - - class CardTransaction(Transaction): - token: str # type: ignore - """Unique identifier for the transaction""" - - created: datetime # type: ignore - """ISO 8601 timestamp of when the transaction was created""" - - family: Literal["CARD", "PAYMENT", "TRANSFER", "INTERNAL", "EXTERNAL_PAYMENT", "MANAGEMENT_OPERATION"] - - status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] # type: ignore - """The status of the transaction""" - - updated: datetime # type: ignore - """ISO 8601 timestamp of when the transaction was last updated""" - - -class PaymentTransactionEvent(BaseModel): - token: str - """Globally unique identifier.""" - - amount: int - """ - Amount of the financial event that has been settled in the currency's smallest - unit (e.g., cents). - """ - - created: datetime - """Date and time when the financial event occurred. UTC time zone.""" - - result: Literal["APPROVED", "DECLINED"] - """ - APPROVED financial events were successful while DECLINED financial events were - declined by user, Lithic, or the network. - """ - - type: Literal[ - "ACH_ORIGINATION_CANCELLED", - "ACH_ORIGINATION_INITIATED", - "ACH_ORIGINATION_PROCESSED", - "ACH_ORIGINATION_SETTLED", - "ACH_ORIGINATION_RELEASED", - "ACH_ORIGINATION_REVIEWED", - "ACH_RECEIPT_PROCESSED", - "ACH_RECEIPT_SETTLED", - "ACH_RETURN_INITIATED", - "ACH_RETURN_PROCESSED", - "ACH_RETURN_SETTLED", - ] - """Event types: - - - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending - approval/release from an ACH hold. - - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. - - `ACH_ORIGINATION_CANCELLED` - ACH origination has been cancelled. - - `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to - the Federal Reserve. - - `ACH_ORIGINATION_SETTLED` - ACH origination has settled. - - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to - available balance. - - `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository - Financial Institution. - - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. - - `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. - - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. - - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available - balance. - - `ACH_RETURN_SETTLED` - ACH receipt return settled by the Receiving Depository - Financial Institution. - """ - - detailed_results: Optional[ - List[ - Literal[ - "APPROVED", - "FUNDS_INSUFFICIENT", - "ACCOUNT_INVALID", - "PROGRAM_TRANSACTION_LIMIT_EXCEEDED", - "PROGRAM_DAILY_LIMIT_EXCEEDED", - "PROGRAM_MONTHLY_LIMIT_EXCEEDED", - ] - ] - ] = None - """More detailed reasons for the event""" - - -class PaymentTransactionMethodAttributesACHMethodAttributes(BaseModel): - sec_code: Literal["CCD", "PPD", "WEB", "TEL", "CIE", "CTX"] - """SEC code for ACH transaction""" - - addenda: Optional[str] = None - """Addenda information""" - - company_id: Optional[str] = None - """Company ID for the ACH transaction""" - - receipt_routing_number: Optional[str] = None - """Receipt routing number""" - - retries: Optional[int] = None - """Number of retries attempted""" - - return_reason_code: Optional[str] = None - """Return reason code if the transaction was returned""" - - trace_numbers: Optional[List[str]] = None - """Trace numbers for the ACH transaction""" - - -class PaymentTransactionMethodAttributesWireMethodAttributes(BaseModel): - wire_network: Literal["FEDWIRE", "SWIFT"] - """Type of wire transfer""" - - creditor: Optional[WirePartyDetails] = None - - debtor: Optional[WirePartyDetails] = None - - message_id: Optional[str] = None - """ - Point to point reference identifier, as assigned by the instructing party, used - for tracking the message through the Fedwire system - """ - - remittance_information: Optional[str] = None - """Payment details or invoice reference""" - - wire_message_type: Optional[str] = None - """Type of wire message""" - - -PaymentTransactionMethodAttributes: TypeAlias = Union[ - PaymentTransactionMethodAttributesACHMethodAttributes, PaymentTransactionMethodAttributesWireMethodAttributes -] - - -class PaymentTransactionRelatedAccountTokens(BaseModel): - account_token: Optional[str] = None - """Globally unique identifier for the account""" - - business_account_token: Optional[str] = None - """Globally unique identifier for the business account""" - - -class PaymentTransaction(BaseModel): - token: str - """Unique identifier for the transaction""" - - category: Literal[ - "ACH", - "BALANCE_OR_FUNDING", - "FEE", - "REWARD", - "ADJUSTMENT", - "DERECOGNITION", - "DISPUTE", - "CARD", - "EXTERNAL_ACH", - "EXTERNAL_CHECK", - "EXTERNAL_TRANSFER", - "EXTERNAL_WIRE", - "MANAGEMENT_ADJUSTMENT", - "MANAGEMENT_DISPUTE", - "MANAGEMENT_FEE", - "MANAGEMENT_REWARD", - "MANAGEMENT_DISBURSEMENT", - "PROGRAM_FUNDING", - ] - """Transaction category""" - - created: datetime - """ISO 8601 timestamp of when the transaction was created""" - - descriptor: str - """Transaction descriptor""" - - direction: Literal["CREDIT", "DEBIT"] - """Transfer direction""" - - events: List[PaymentTransactionEvent] - """List of transaction events""" - - family: Literal["CARD", "PAYMENT", "TRANSFER", "INTERNAL", "EXTERNAL_PAYMENT", "MANAGEMENT_OPERATION"] - - financial_account_token: str - """Financial account token""" - - method: Literal["ACH_NEXT_DAY", "ACH_SAME_DAY", "WIRE"] - """Transfer method""" - - method_attributes: PaymentTransactionMethodAttributes - """Method-specific attributes""" - - pending_amount: int - """Pending amount in cents""" - - related_account_tokens: PaymentTransactionRelatedAccountTokens - """Related account tokens for the transaction""" - - result: Literal["APPROVED", "DECLINED"] - """Transaction result""" - - settled_amount: int - """Settled amount in cents""" - - source: Literal["LITHIC", "EXTERNAL", "CUSTOMER"] - """Transaction source""" - - status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] - """The status of the transaction""" - - updated: datetime - """ISO 8601 timestamp of when the transaction was last updated""" - - currency: Optional[str] = None - """Currency of the transaction in ISO 4217 format""" - - expected_release_date: Optional[date] = None - """Expected release date for the transaction""" - - external_bank_account_token: Optional[str] = None - """External bank account token""" - - type: Optional[ - Literal[ - "ORIGINATION_CREDIT", - "ORIGINATION_DEBIT", - "RECEIPT_CREDIT", - "RECEIPT_DEBIT", - "WIRE_INBOUND_PAYMENT", - "WIRE_INBOUND_ADMIN", - "WIRE_OUTBOUND_PAYMENT", - "WIRE_OUTBOUND_ADMIN", - ] - ] = None - - user_defined_id: Optional[str] = None - """User-defined identifier""" - - -AccountActivityListResponse: TypeAlias = Union[ - FinancialTransaction, - BookTransferTransaction, - CardTransaction, - PaymentTransaction, - ExternalPayment, - ManagementOperationTransaction, + pass + + +AccountActivityListResponse: TypeAlias = Annotated[ + Union[ + FinancialTransaction, + BookTransferResponse, + CardTransaction, + Payment, + ExternalPayment, + ManagementOperationTransaction, + ], + PropertyInfo(discriminator="family"), ] diff --git a/src/lithic/types/account_activity_retrieve_transaction_response.py b/src/lithic/types/account_activity_retrieve_transaction_response.py index f25ab7df..e9ea58d5 100644 --- a/src/lithic/types/account_activity_retrieve_transaction_response.py +++ b/src/lithic/types/account_activity_retrieve_transaction_response.py @@ -1,30 +1,22 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Union, Optional -from datetime import date, datetime -from typing_extensions import Literal, TypeAlias +from datetime import datetime +from typing_extensions import Literal, Annotated, TypeAlias +from .._utils import PropertyInfo +from .payment import Payment from .._models import BaseModel from .transaction import Transaction from .external_payment import ExternalPayment -from .external_resource import ExternalResource -from .wire_party_details import WirePartyDetails +from .book_transfer_response import BookTransferResponse from .management_operation_transaction import ManagementOperationTransaction __all__ = [ "AccountActivityRetrieveTransactionResponse", "FinancialTransaction", "FinancialTransactionEvent", - "BookTransferTransaction", - "BookTransferTransactionEvent", - "BookTransferTransactionTransactionSeries", "CardTransaction", - "PaymentTransaction", - "PaymentTransactionEvent", - "PaymentTransactionMethodAttributes", - "PaymentTransactionMethodAttributesACHMethodAttributes", - "PaymentTransactionMethodAttributesWireMethodAttributes", - "PaymentTransactionRelatedAccountTokens", ] @@ -161,7 +153,8 @@ class FinancialTransaction(BaseModel): events: List[FinancialTransactionEvent] """List of transaction events""" - family: Literal["CARD", "PAYMENT", "TRANSFER", "INTERNAL", "EXTERNAL_PAYMENT", "MANAGEMENT_OPERATION"] + family: Literal["INTERNAL"] + """INTERNAL - Financial Transaction""" financial_account_token: str """Financial account token associated with the transaction""" @@ -182,380 +175,18 @@ class FinancialTransaction(BaseModel): """ISO 8601 timestamp of when the transaction was last updated""" -class BookTransferTransactionEvent(BaseModel): - token: str - """Globally unique identifier.""" - - amount: int - """ - Amount of the financial event that has been settled in the currency's smallest - unit (e.g., cents). - """ - - created: datetime - """Date and time when the financial event occurred. UTC time zone.""" - - detailed_results: Literal["APPROVED", "FUNDS_INSUFFICIENT"] - - memo: str - """Memo for the transfer.""" - - result: Literal["APPROVED", "DECLINED"] - """ - APPROVED financial events were successful while DECLINED financial events were - declined by user, Lithic, or the network. - """ - - subtype: str - """The program specific subtype code for the specified category/type.""" - - type: Literal[ - "ATM_BALANCE_INQUIRY", - "ATM_WITHDRAWAL", - "ATM_DECLINE", - "INTERNATIONAL_ATM_WITHDRAWAL", - "INACTIVITY", - "STATEMENT", - "MONTHLY", - "QUARTERLY", - "ANNUAL", - "CUSTOMER_SERVICE", - "ACCOUNT_MAINTENANCE", - "ACCOUNT_ACTIVATION", - "ACCOUNT_CLOSURE", - "CARD_REPLACEMENT", - "CARD_DELIVERY", - "CARD_CREATE", - "CURRENCY_CONVERSION", - "INTEREST", - "LATE_PAYMENT", - "BILL_PAYMENT", - "CASH_BACK", - "ACCOUNT_TO_ACCOUNT", - "CARD_TO_CARD", - "DISBURSE", - "BILLING_ERROR", - "LOSS_WRITE_OFF", - "EXPIRED_CARD", - "EARLY_DERECOGNITION", - "ESCHEATMENT", - "INACTIVITY_FEE_DOWN", - "PROVISIONAL_CREDIT", - "DISPUTE_WON", - "SERVICE", - "TRANSFER", - "COLLECTION", - ] - """Type of the book transfer""" - - -class BookTransferTransactionTransactionSeries(BaseModel): - related_transaction_event_token: Optional[str] = None - - related_transaction_token: Optional[str] = None - - type: str - - -class BookTransferTransaction(BaseModel): - token: str - """Unique identifier for the transaction""" - - category: Literal[ - "ADJUSTMENT", - "BALANCE_OR_FUNDING", - "DERECOGNITION", - "DISPUTE", - "FEE", - "INTERNAL", - "REWARD", - "PROGRAM_FUNDING", - "TRANSFER", - ] - - created: datetime - """ISO 8601 timestamp of when the transaction was created""" - - currency: str - """Currency of the transaction in ISO 4217 format""" - - events: List[BookTransferTransactionEvent] - """List of events associated with this book transfer""" - - family: Literal["CARD", "PAYMENT", "TRANSFER", "INTERNAL", "EXTERNAL_PAYMENT", "MANAGEMENT_OPERATION"] - - from_financial_account_token: str - """Source account token""" - - pending_amount: int - """The pending amount of the transaction in cents""" - - result: Literal["APPROVED", "DECLINED"] - - settled_amount: int - """The settled amount of the transaction in cents""" - - status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] - """The status of the transaction""" - - to_financial_account_token: str - """Destination account token""" - - updated: datetime - """ISO 8601 timestamp of when the transaction was last updated""" - - external_id: Optional[str] = None - """External identifier for the transaction""" - - external_resource: Optional[ExternalResource] = None - """External resource associated with the management operation""" - - transaction_series: Optional[BookTransferTransactionTransactionSeries] = None - - class CardTransaction(Transaction): - token: str # type: ignore - """Unique identifier for the transaction""" - - created: datetime # type: ignore - """ISO 8601 timestamp of when the transaction was created""" - - family: Literal["CARD", "PAYMENT", "TRANSFER", "INTERNAL", "EXTERNAL_PAYMENT", "MANAGEMENT_OPERATION"] - - status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] # type: ignore - """The status of the transaction""" - - updated: datetime # type: ignore - """ISO 8601 timestamp of when the transaction was last updated""" - - -class PaymentTransactionEvent(BaseModel): - token: str - """Globally unique identifier.""" - - amount: int - """ - Amount of the financial event that has been settled in the currency's smallest - unit (e.g., cents). - """ - - created: datetime - """Date and time when the financial event occurred. UTC time zone.""" - - result: Literal["APPROVED", "DECLINED"] - """ - APPROVED financial events were successful while DECLINED financial events were - declined by user, Lithic, or the network. - """ - - type: Literal[ - "ACH_ORIGINATION_CANCELLED", - "ACH_ORIGINATION_INITIATED", - "ACH_ORIGINATION_PROCESSED", - "ACH_ORIGINATION_SETTLED", - "ACH_ORIGINATION_RELEASED", - "ACH_ORIGINATION_REVIEWED", - "ACH_RECEIPT_PROCESSED", - "ACH_RECEIPT_SETTLED", - "ACH_RETURN_INITIATED", - "ACH_RETURN_PROCESSED", - "ACH_RETURN_SETTLED", - ] - """Event types: - - - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending - approval/release from an ACH hold. - - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. - - `ACH_ORIGINATION_CANCELLED` - ACH origination has been cancelled. - - `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to - the Federal Reserve. - - `ACH_ORIGINATION_SETTLED` - ACH origination has settled. - - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to - available balance. - - `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository - Financial Institution. - - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. - - `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. - - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. - - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available - balance. - - `ACH_RETURN_SETTLED` - ACH receipt return settled by the Receiving Depository - Financial Institution. - """ - - detailed_results: Optional[ - List[ - Literal[ - "APPROVED", - "FUNDS_INSUFFICIENT", - "ACCOUNT_INVALID", - "PROGRAM_TRANSACTION_LIMIT_EXCEEDED", - "PROGRAM_DAILY_LIMIT_EXCEEDED", - "PROGRAM_MONTHLY_LIMIT_EXCEEDED", - ] - ] - ] = None - """More detailed reasons for the event""" - - -class PaymentTransactionMethodAttributesACHMethodAttributes(BaseModel): - sec_code: Literal["CCD", "PPD", "WEB", "TEL", "CIE", "CTX"] - """SEC code for ACH transaction""" - - addenda: Optional[str] = None - """Addenda information""" - - company_id: Optional[str] = None - """Company ID for the ACH transaction""" - - receipt_routing_number: Optional[str] = None - """Receipt routing number""" - - retries: Optional[int] = None - """Number of retries attempted""" - - return_reason_code: Optional[str] = None - """Return reason code if the transaction was returned""" - - trace_numbers: Optional[List[str]] = None - """Trace numbers for the ACH transaction""" - - -class PaymentTransactionMethodAttributesWireMethodAttributes(BaseModel): - wire_network: Literal["FEDWIRE", "SWIFT"] - """Type of wire transfer""" - - creditor: Optional[WirePartyDetails] = None - - debtor: Optional[WirePartyDetails] = None - - message_id: Optional[str] = None - """ - Point to point reference identifier, as assigned by the instructing party, used - for tracking the message through the Fedwire system - """ - - remittance_information: Optional[str] = None - """Payment details or invoice reference""" - - wire_message_type: Optional[str] = None - """Type of wire message""" - - -PaymentTransactionMethodAttributes: TypeAlias = Union[ - PaymentTransactionMethodAttributesACHMethodAttributes, PaymentTransactionMethodAttributesWireMethodAttributes -] - - -class PaymentTransactionRelatedAccountTokens(BaseModel): - account_token: Optional[str] = None - """Globally unique identifier for the account""" - - business_account_token: Optional[str] = None - """Globally unique identifier for the business account""" - - -class PaymentTransaction(BaseModel): - token: str - """Unique identifier for the transaction""" - - category: Literal[ - "ACH", - "BALANCE_OR_FUNDING", - "FEE", - "REWARD", - "ADJUSTMENT", - "DERECOGNITION", - "DISPUTE", - "CARD", - "EXTERNAL_ACH", - "EXTERNAL_CHECK", - "EXTERNAL_TRANSFER", - "EXTERNAL_WIRE", - "MANAGEMENT_ADJUSTMENT", - "MANAGEMENT_DISPUTE", - "MANAGEMENT_FEE", - "MANAGEMENT_REWARD", - "MANAGEMENT_DISBURSEMENT", - "PROGRAM_FUNDING", - ] - """Transaction category""" - - created: datetime - """ISO 8601 timestamp of when the transaction was created""" - - descriptor: str - """Transaction descriptor""" - - direction: Literal["CREDIT", "DEBIT"] - """Transfer direction""" - - events: List[PaymentTransactionEvent] - """List of transaction events""" - - family: Literal["CARD", "PAYMENT", "TRANSFER", "INTERNAL", "EXTERNAL_PAYMENT", "MANAGEMENT_OPERATION"] - - financial_account_token: str - """Financial account token""" - - method: Literal["ACH_NEXT_DAY", "ACH_SAME_DAY", "WIRE"] - """Transfer method""" - - method_attributes: PaymentTransactionMethodAttributes - """Method-specific attributes""" - - pending_amount: int - """Pending amount in cents""" - - related_account_tokens: PaymentTransactionRelatedAccountTokens - """Related account tokens for the transaction""" - - result: Literal["APPROVED", "DECLINED"] - """Transaction result""" - - settled_amount: int - """Settled amount in cents""" - - source: Literal["LITHIC", "EXTERNAL", "CUSTOMER"] - """Transaction source""" - - status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] - """The status of the transaction""" - - updated: datetime - """ISO 8601 timestamp of when the transaction was last updated""" - - currency: Optional[str] = None - """Currency of the transaction in ISO 4217 format""" - - expected_release_date: Optional[date] = None - """Expected release date for the transaction""" - - external_bank_account_token: Optional[str] = None - """External bank account token""" - - type: Optional[ - Literal[ - "ORIGINATION_CREDIT", - "ORIGINATION_DEBIT", - "RECEIPT_CREDIT", - "RECEIPT_DEBIT", - "WIRE_INBOUND_PAYMENT", - "WIRE_INBOUND_ADMIN", - "WIRE_OUTBOUND_PAYMENT", - "WIRE_OUTBOUND_ADMIN", - ] - ] = None - - user_defined_id: Optional[str] = None - """User-defined identifier""" - - -AccountActivityRetrieveTransactionResponse: TypeAlias = Union[ - FinancialTransaction, - BookTransferTransaction, - CardTransaction, - PaymentTransaction, - ExternalPayment, - ManagementOperationTransaction, + pass + + +AccountActivityRetrieveTransactionResponse: TypeAlias = Annotated[ + Union[ + FinancialTransaction, + BookTransferResponse, + CardTransaction, + Payment, + ExternalPayment, + ManagementOperationTransaction, + ], + PropertyInfo(discriminator="family"), ] diff --git a/src/lithic/types/auth_rules/__init__.py b/src/lithic/types/auth_rules/__init__.py index ff8112ad..7418e32d 100644 --- a/src/lithic/types/auth_rules/__init__.py +++ b/src/lithic/types/auth_rules/__init__.py @@ -12,7 +12,6 @@ from .v2_apply_response import V2ApplyResponse as V2ApplyResponse from .v2_draft_response import V2DraftResponse as V2DraftResponse from .v2_create_response import V2CreateResponse as V2CreateResponse -from .v2_report_response import V2ReportResponse as V2ReportResponse from .v2_update_response import V2UpdateResponse as V2UpdateResponse from .auth_rule_condition import AuthRuleCondition as AuthRuleCondition from .v2_promote_response import V2PromoteResponse as V2PromoteResponse diff --git a/src/lithic/types/auth_rules/auth_rule_condition.py b/src/lithic/types/auth_rules/auth_rule_condition.py index 4343710e..70b47ce7 100644 --- a/src/lithic/types/auth_rules/auth_rule_condition.py +++ b/src/lithic/types/auth_rules/auth_rule_condition.py @@ -58,6 +58,9 @@ class AuthRuleCondition(BaseModel): - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ diff --git a/src/lithic/types/auth_rules/auth_rule_condition_param.py b/src/lithic/types/auth_rules/auth_rule_condition_param.py index b0bf86d3..448d4436 100644 --- a/src/lithic/types/auth_rules/auth_rule_condition_param.py +++ b/src/lithic/types/auth_rules/auth_rule_condition_param.py @@ -60,6 +60,9 @@ class AuthRuleConditionParam(TypedDict, total=False): - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Literal[ diff --git a/src/lithic/types/auth_rules/conditional_3ds_action_parameters.py b/src/lithic/types/auth_rules/conditional_3ds_action_parameters.py index 1db7b1c1..7c434a8a 100644 --- a/src/lithic/types/auth_rules/conditional_3ds_action_parameters.py +++ b/src/lithic/types/auth_rules/conditional_3ds_action_parameters.py @@ -19,6 +19,7 @@ class Condition(BaseModel): "TRANSACTION_AMOUNT", "RISK_SCORE", "MESSAGE_CATEGORY", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -42,6 +43,9 @@ class Condition(BaseModel): - `RISK_SCORE`: Mastercard only: Assessment by the network of the authentication risk level, with a higher value indicating a higher amount of risk. - `MESSAGE_CATEGORY`: The category of the authentication being processed. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ diff --git a/src/lithic/types/auth_rules/conditional_3ds_action_parameters_param.py b/src/lithic/types/auth_rules/conditional_3ds_action_parameters_param.py index 43c4759b..7f04dded 100644 --- a/src/lithic/types/auth_rules/conditional_3ds_action_parameters_param.py +++ b/src/lithic/types/auth_rules/conditional_3ds_action_parameters_param.py @@ -20,6 +20,7 @@ class Condition(TypedDict, total=False): "TRANSACTION_AMOUNT", "RISK_SCORE", "MESSAGE_CATEGORY", + "ADDRESS_MATCH", ] """The attribute to target. @@ -42,6 +43,9 @@ class Condition(TypedDict, total=False): - `RISK_SCORE`: Mastercard only: Assessment by the network of the authentication risk level, with a higher value indicating a higher amount of risk. - `MESSAGE_CATEGORY`: The category of the authentication being processed. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Literal[ diff --git a/src/lithic/types/auth_rules/conditional_attribute.py b/src/lithic/types/auth_rules/conditional_attribute.py index 626ff59a..fbf3231a 100644 --- a/src/lithic/types/auth_rules/conditional_attribute.py +++ b/src/lithic/types/auth_rules/conditional_attribute.py @@ -21,4 +21,5 @@ "PIN_ENTERED", "PIN_STATUS", "WALLET_TYPE", + "ADDRESS_MATCH", ] diff --git a/src/lithic/types/auth_rules/v2_apply_response.py b/src/lithic/types/auth_rules/v2_apply_response.py index 968360a7..aa950d29 100644 --- a/src/lithic/types/auth_rules/v2_apply_response.py +++ b/src/lithic/types/auth_rules/v2_apply_response.py @@ -43,6 +43,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -96,6 +97,9 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ @@ -166,6 +170,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -219,6 +224,9 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ diff --git a/src/lithic/types/auth_rules/v2_create_params.py b/src/lithic/types/auth_rules/v2_create_params.py index 8fbca713..be9c4ebc 100644 --- a/src/lithic/types/auth_rules/v2_create_params.py +++ b/src/lithic/types/auth_rules/v2_create_params.py @@ -80,6 +80,7 @@ class CreateAuthRuleRequestAccountTokensParametersConditionalAuthorizationAction "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] """The attribute to target. @@ -132,6 +133,9 @@ class CreateAuthRuleRequestAccountTokensParametersConditionalAuthorizationAction `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Literal[ @@ -219,6 +223,7 @@ class CreateAuthRuleRequestCardTokensParametersConditionalAuthorizationActionPar "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] """The attribute to target. @@ -271,6 +276,9 @@ class CreateAuthRuleRequestCardTokensParametersConditionalAuthorizationActionPar `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Literal[ @@ -361,6 +369,7 @@ class CreateAuthRuleRequestProgramLevelParametersConditionalAuthorizationActionP "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] """The attribute to target. @@ -413,6 +422,9 @@ class CreateAuthRuleRequestProgramLevelParametersConditionalAuthorizationActionP `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Literal[ diff --git a/src/lithic/types/auth_rules/v2_create_response.py b/src/lithic/types/auth_rules/v2_create_response.py index 57c5f287..f533b2c8 100644 --- a/src/lithic/types/auth_rules/v2_create_response.py +++ b/src/lithic/types/auth_rules/v2_create_response.py @@ -43,6 +43,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -96,6 +97,9 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ @@ -166,6 +170,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -219,6 +224,9 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ diff --git a/src/lithic/types/auth_rules/v2_draft_params.py b/src/lithic/types/auth_rules/v2_draft_params.py index aa2152ea..a016e7c6 100644 --- a/src/lithic/types/auth_rules/v2_draft_params.py +++ b/src/lithic/types/auth_rules/v2_draft_params.py @@ -44,6 +44,7 @@ class ParametersConditionalAuthorizationActionParametersCondition(TypedDict, tot "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] """The attribute to target. @@ -96,6 +97,9 @@ class ParametersConditionalAuthorizationActionParametersCondition(TypedDict, tot `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Literal[ diff --git a/src/lithic/types/auth_rules/v2_draft_response.py b/src/lithic/types/auth_rules/v2_draft_response.py index b0ce06d7..6ddca9b8 100644 --- a/src/lithic/types/auth_rules/v2_draft_response.py +++ b/src/lithic/types/auth_rules/v2_draft_response.py @@ -43,6 +43,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -96,6 +97,9 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ @@ -166,6 +170,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -219,6 +224,9 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ diff --git a/src/lithic/types/auth_rules/v2_list_response.py b/src/lithic/types/auth_rules/v2_list_response.py index ddb4a535..524f0b37 100644 --- a/src/lithic/types/auth_rules/v2_list_response.py +++ b/src/lithic/types/auth_rules/v2_list_response.py @@ -43,6 +43,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -96,6 +97,9 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ @@ -166,6 +170,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -219,6 +224,9 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ diff --git a/src/lithic/types/auth_rules/v2_promote_response.py b/src/lithic/types/auth_rules/v2_promote_response.py index a363c62d..4e6e8c94 100644 --- a/src/lithic/types/auth_rules/v2_promote_response.py +++ b/src/lithic/types/auth_rules/v2_promote_response.py @@ -43,6 +43,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -96,6 +97,9 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ @@ -166,6 +170,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -219,6 +224,9 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ diff --git a/src/lithic/types/auth_rules/v2_report_response.py b/src/lithic/types/auth_rules/v2_report_response.py deleted file mode 100644 index 32aed0d1..00000000 --- a/src/lithic/types/auth_rules/v2_report_response.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["V2ReportResponse"] - - -class V2ReportResponse(BaseModel): - report_token: Optional[str] = None diff --git a/src/lithic/types/auth_rules/v2_retrieve_response.py b/src/lithic/types/auth_rules/v2_retrieve_response.py index 1dc4e2a5..c06d6141 100644 --- a/src/lithic/types/auth_rules/v2_retrieve_response.py +++ b/src/lithic/types/auth_rules/v2_retrieve_response.py @@ -43,6 +43,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -96,6 +97,9 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ @@ -166,6 +170,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -219,6 +224,9 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ diff --git a/src/lithic/types/auth_rules/v2_update_response.py b/src/lithic/types/auth_rules/v2_update_response.py index 5c90aa51..d51568b7 100644 --- a/src/lithic/types/auth_rules/v2_update_response.py +++ b/src/lithic/types/auth_rules/v2_update_response.py @@ -43,6 +43,7 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -96,6 +97,9 @@ class CurrentVersionParametersConditionalAuthorizationActionParametersCondition( `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ @@ -166,6 +170,7 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba "PIN_STATUS", "WALLET_TYPE", "TRANSACTION_INITIATOR", + "ADDRESS_MATCH", ] ] = None """The attribute to target. @@ -219,6 +224,9 @@ class DraftVersionParametersConditionalAuthorizationActionParametersCondition(Ba `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. - `TRANSACTION_INITIATOR`: The entity that initiated the transaction indicates the source of the token. Valid values are `CARDHOLDER`, `MERCHANT`, `UNKNOWN`. + - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address + data with the cardholder KYC data if it exists. Valid values are `MATCH`, + `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`. """ operation: Optional[ diff --git a/src/lithic/types/book_transfer_response.py b/src/lithic/types/book_transfer_response.py index 1952b755..e27fcdfa 100644 --- a/src/lithic/types/book_transfer_response.py +++ b/src/lithic/types/book_transfer_response.py @@ -87,10 +87,7 @@ class TransactionSeries(BaseModel): class BookTransferResponse(BaseModel): token: str - """Customer-provided token that will serve as an idempotency token. - - This token will become the transaction token. - """ + """Unique identifier for the transaction""" category: Literal[ "ADJUSTMENT", @@ -105,27 +102,24 @@ class BookTransferResponse(BaseModel): ] created: datetime - """Date and time when the transfer occurred. UTC time zone.""" + """ISO 8601 timestamp of when the transaction was created""" currency: str """ 3-character alphabetic ISO 4217 code for the settling currency of the - transaction. + transaction """ events: List[Event] - """A list of all financial events that have modified this transfer.""" - - external_id: Optional[str] = None - """External ID defined by the customer""" + """A list of all financial events that have modified this transfer""" - external_resource: Optional[ExternalResource] = None - """External resource associated with the management operation""" + family: Literal["TRANSFER"] + """TRANSFER - Book Transfer Transaction""" from_financial_account_token: str """ Globally unique identifier for the financial account or card that will send the - funds. Accepted type dependent on the program's use case. + funds. Accepted type dependent on the program's use case """ pending_amount: int @@ -142,25 +136,26 @@ class BookTransferResponse(BaseModel): settled_amount: int """ Amount of the transaction that has been settled in the currency's smallest unit - (e.g., cents). + (e.g., cents) """ - status: Literal["DECLINED", "REVERSED", "SETTLED"] - """Status types: - - - `DECLINED` - The transfer was declined. - - `REVERSED` - The transfer was reversed - - `SETTLED` - The transfer is completed. - """ + status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] + """The status of the transaction""" to_financial_account_token: str """ Globally unique identifier for the financial account or card that will receive - the funds. Accepted type dependent on the program's use case. + the funds. Accepted type dependent on the program's use case """ - transaction_series: Optional[TransactionSeries] = None - """A series of transactions that are grouped together.""" - updated: datetime - """Date and time when the financial transaction was last updated. UTC time zone.""" + """ISO 8601 timestamp of when the transaction was last updated""" + + external_id: Optional[str] = None + """External ID defined by the customer""" + + external_resource: Optional[ExternalResource] = None + """External resource associated with the management operation""" + + transaction_series: Optional[TransactionSeries] = None + """A series of transactions that are grouped together""" diff --git a/src/lithic/types/card_provision_response.py b/src/lithic/types/card_provision_response.py index fe565e0e..23069751 100644 --- a/src/lithic/types/card_provision_response.py +++ b/src/lithic/types/card_provision_response.py @@ -1,11 +1,19 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import Union, Optional +from typing_extensions import TypeAlias from .._models import BaseModel +from .provision_response import ProvisionResponse -__all__ = ["CardProvisionResponse"] +__all__ = ["CardProvisionResponse", "ProvisioningPayload"] + +ProvisioningPayload: TypeAlias = Union[str, ProvisionResponse] class CardProvisionResponse(BaseModel): - provisioning_payload: Optional[str] = None + provisioning_payload: Optional[ProvisioningPayload] = None + """ + Base64 encoded JSON payload representing a payment card that can be passed to a + device's digital wallet. Applies to Google and Samsung Pay wallets. + """ diff --git a/src/lithic/types/event.py b/src/lithic/types/event.py index a2c3a119..bc3cda33 100644 --- a/src/lithic/types/event.py +++ b/src/lithic/types/event.py @@ -23,7 +23,6 @@ class Event(BaseModel): "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", diff --git a/src/lithic/types/event_list_params.py b/src/lithic/types/event_list_params.py index 74a0f10e..8056d55d 100644 --- a/src/lithic/types/event_list_params.py +++ b/src/lithic/types/event_list_params.py @@ -35,7 +35,6 @@ class EventListParams(TypedDict, total=False): "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", diff --git a/src/lithic/types/event_subscription.py b/src/lithic/types/event_subscription.py index ddc838fc..5e78bd4a 100644 --- a/src/lithic/types/event_subscription.py +++ b/src/lithic/types/event_subscription.py @@ -26,7 +26,6 @@ class EventSubscription(BaseModel): "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", diff --git a/src/lithic/types/events/subscription_create_params.py b/src/lithic/types/events/subscription_create_params.py index 3d523cd7..8166f060 100644 --- a/src/lithic/types/events/subscription_create_params.py +++ b/src/lithic/types/events/subscription_create_params.py @@ -23,7 +23,6 @@ class SubscriptionCreateParams(TypedDict, total=False): "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", diff --git a/src/lithic/types/events/subscription_send_simulated_example_params.py b/src/lithic/types/events/subscription_send_simulated_example_params.py index 9e9ecbf8..b72343ec 100644 --- a/src/lithic/types/events/subscription_send_simulated_example_params.py +++ b/src/lithic/types/events/subscription_send_simulated_example_params.py @@ -12,7 +12,6 @@ class SubscriptionSendSimulatedExampleParams(TypedDict, total=False): "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", diff --git a/src/lithic/types/events/subscription_update_params.py b/src/lithic/types/events/subscription_update_params.py index 03a65dd9..8a330654 100644 --- a/src/lithic/types/events/subscription_update_params.py +++ b/src/lithic/types/events/subscription_update_params.py @@ -23,7 +23,6 @@ class SubscriptionUpdateParams(TypedDict, total=False): "account_holder.created", "account_holder.updated", "account_holder.verification", - "auth_rules.performance_report.created", "balance.updated", "book_transfer_transaction.created", "card.created", diff --git a/src/lithic/types/external_bank_account_create_params.py b/src/lithic/types/external_bank_account_create_params.py index 10cefa11..d0660aae 100644 --- a/src/lithic/types/external_bank_account_create_params.py +++ b/src/lithic/types/external_bank_account_create_params.py @@ -14,7 +14,6 @@ __all__ = [ "ExternalBankAccountCreateParams", "BankVerifiedCreateBankAccountAPIRequest", - "PlaidCreateBankAccountAPIRequest", "ExternallyVerifiedCreateBankAccountAPIRequest", "UnverifiedCreateBankAccountAPIRequest", ] @@ -82,45 +81,6 @@ class BankVerifiedCreateBankAccountAPIRequest(TypedDict, total=False): verification_enforcement: bool -class PlaidCreateBankAccountAPIRequest(TypedDict, total=False): - owner: Required[str] - """Legal Name of the business or individual who owns the external account. - - This will appear in statements - """ - - owner_type: Required[OwnerType] - """Owner Type""" - - processor_token: Required[str] - - verification_method: Required[VerificationMethod] - """Verification Method""" - - account_token: str - """Indicates which Lithic account the external account is associated with. - - For external accounts that are associated with the program, account_token field - returned will be null - """ - - company_id: str - """Optional field that helps identify bank accounts in receipts""" - - dob: Annotated[Union[str, date], PropertyInfo(format="iso8601")] - """Date of Birth of the Individual that owns the external bank account""" - - doing_business_as: str - """Doing Business As""" - - user_defined_id: str - """User Defined ID""" - - -ExternalBankAccountAddress = ExternalBankAccountAddressParam -"""This type is deprecated, please use ExternalBankAccountAddressParam instead""" - - class ExternallyVerifiedCreateBankAccountAPIRequest(TypedDict, total=False): account_number: Required[str] """Account Number""" @@ -237,7 +197,6 @@ class UnverifiedCreateBankAccountAPIRequest(TypedDict, total=False): ExternalBankAccountCreateParams: TypeAlias = Union[ BankVerifiedCreateBankAccountAPIRequest, - PlaidCreateBankAccountAPIRequest, ExternallyVerifiedCreateBankAccountAPIRequest, UnverifiedCreateBankAccountAPIRequest, ] diff --git a/src/lithic/types/external_payment.py b/src/lithic/types/external_payment.py index 98f2f952..666be1e2 100644 --- a/src/lithic/types/external_payment.py +++ b/src/lithic/types/external_payment.py @@ -55,8 +55,6 @@ class ExternalPayment(BaseModel): created: datetime """ISO 8601 timestamp of when the transaction was created""" - family: Literal["CARD", "PAYMENT", "TRANSFER", "INTERNAL", "EXTERNAL_PAYMENT", "MANAGEMENT_OPERATION"] - status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] """The status of the transaction""" @@ -69,6 +67,9 @@ class ExternalPayment(BaseModel): events: Optional[List[Event]] = None + family: Optional[Literal["EXTERNAL_PAYMENT"]] = None + """EXTERNAL_PAYMENT - External Payment Response""" + financial_account_token: Optional[str] = None payment_type: Optional[Literal["DEPOSIT", "WITHDRAWAL"]] = None diff --git a/src/lithic/types/financial_account.py b/src/lithic/types/financial_account.py index 0842fbf1..bb1492ba 100644 --- a/src/lithic/types/financial_account.py +++ b/src/lithic/types/financial_account.py @@ -15,8 +15,7 @@ class CreditConfigurationAutoCollectionConfiguration(BaseModel): class CreditConfiguration(BaseModel): - charged_off_reason: Optional[Literal["DELINQUENT", "FRAUD"]] = None - """Reason for the financial account being marked as Charged Off""" + auto_collection_configuration: CreditConfigurationAutoCollectionConfiguration credit_limit: Optional[int] = None @@ -25,15 +24,16 @@ class CreditConfiguration(BaseModel): external_bank_account_token: Optional[str] = None - financial_account_state: Optional[Literal["PENDING", "CURRENT", "DELINQUENT", "CHARGED_OFF"]] = None - """State of the financial account""" - - is_spend_blocked: bool - tier: Optional[str] = None """Tier assigned to the financial account""" - auto_collection_configuration: Optional[CreditConfigurationAutoCollectionConfiguration] = None + charged_off_reason: Optional[Literal["DELINQUENT", "FRAUD"]] = None + """Reason for the financial account being marked as Charged Off""" + + financial_account_state: Optional[Literal["PENDING", "CURRENT", "DELINQUENT", "CHARGED_OFF"]] = None + """State of the financial account""" + + is_spend_blocked: Optional[bool] = None class FinancialAccount(BaseModel): diff --git a/src/lithic/types/financial_accounts/financial_account_credit_config.py b/src/lithic/types/financial_accounts/financial_account_credit_config.py index 63ecb98a..daaf97e9 100644 --- a/src/lithic/types/financial_accounts/financial_account_credit_config.py +++ b/src/lithic/types/financial_accounts/financial_account_credit_config.py @@ -19,9 +19,6 @@ class FinancialAccountCreditConfig(BaseModel): auto_collection_configuration: AutoCollectionConfiguration - charged_off_reason: Optional[Literal["DELINQUENT", "FRAUD"]] = None - """Reason for the financial account being marked as Charged Off""" - credit_limit: Optional[int] = None credit_product_token: Optional[str] = None @@ -29,10 +26,13 @@ class FinancialAccountCreditConfig(BaseModel): external_bank_account_token: Optional[str] = None - financial_account_state: Literal["PENDING", "CURRENT", "DELINQUENT", "CHARGED_OFF"] - """State of the financial account""" - - is_spend_blocked: bool - tier: Optional[str] = None """Tier assigned to the financial account""" + + charged_off_reason: Optional[Literal["DELINQUENT", "FRAUD"]] = None + """Reason for the financial account being marked as Charged Off""" + + financial_account_state: Optional[Literal["PENDING", "CURRENT", "DELINQUENT", "CHARGED_OFF"]] = None + """State of the financial account""" + + is_spend_blocked: Optional[bool] = None diff --git a/src/lithic/types/management_operation_transaction.py b/src/lithic/types/management_operation_transaction.py index 797983d1..c8410b5b 100644 --- a/src/lithic/types/management_operation_transaction.py +++ b/src/lithic/types/management_operation_transaction.py @@ -65,8 +65,6 @@ class ManagementOperationTransaction(BaseModel): created: datetime """ISO 8601 timestamp of when the transaction was created""" - family: Literal["CARD", "PAYMENT", "TRANSFER", "INTERNAL", "EXTERNAL_PAYMENT", "MANAGEMENT_OPERATION"] - status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] """The status of the transaction""" @@ -92,6 +90,9 @@ class ManagementOperationTransaction(BaseModel): external_resource: Optional[ExternalResource] = None """External resource associated with the management operation""" + family: Optional[Literal["MANAGEMENT_OPERATION"]] = None + """MANAGEMENT_OPERATION - Management Operation Transaction""" + financial_account_token: Optional[str] = None pending_amount: Optional[int] = None diff --git a/src/lithic/types/payment.py b/src/lithic/types/payment.py index afd06438..de048263 100644 --- a/src/lithic/types/payment.py +++ b/src/lithic/types/payment.py @@ -1,12 +1,20 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import List, Union, Optional from datetime import date, datetime -from typing_extensions import Literal +from typing_extensions import Literal, TypeAlias from .._models import BaseModel +from .wire_party_details import WirePartyDetails -__all__ = ["Payment", "Event", "MethodAttributes", "RelatedAccountTokens"] +__all__ = [ + "Payment", + "Event", + "MethodAttributes", + "MethodAttributesACHMethodAttributes", + "MethodAttributesWireMethodAttributes", + "RelatedAccountTokens", +] class Event(BaseModel): @@ -78,20 +86,51 @@ class Event(BaseModel): """More detailed reasons for the event""" -class MethodAttributes(BaseModel): +class MethodAttributesACHMethodAttributes(BaseModel): + sec_code: Literal["CCD", "PPD", "WEB", "TEL", "CIE", "CTX"] + """SEC code for ACH transaction""" + + addenda: Optional[str] = None + """Addenda information""" + company_id: Optional[str] = None + """Company ID for the ACH transaction""" receipt_routing_number: Optional[str] = None + """Receipt routing number""" retries: Optional[int] = None + """Number of retries attempted""" return_reason_code: Optional[str] = None + """Return reason code if the transaction was returned""" - sec_code: Literal["CCD", "PPD", "WEB"] + trace_numbers: Optional[List[str]] = None + """Trace numbers for the ACH transaction""" - trace_numbers: List[Optional[str]] - addenda: Optional[str] = None +class MethodAttributesWireMethodAttributes(BaseModel): + wire_network: Literal["FEDWIRE", "SWIFT"] + """Type of wire transfer""" + + creditor: Optional[WirePartyDetails] = None + + debtor: Optional[WirePartyDetails] = None + + message_id: Optional[str] = None + """ + Point to point reference identifier, as assigned by the instructing party, used + for tracking the message through the Fedwire system + """ + + remittance_information: Optional[str] = None + """Payment details or invoice reference""" + + wire_message_type: Optional[str] = None + """Type of wire message""" + + +MethodAttributes: TypeAlias = Union[MethodAttributesACHMethodAttributes, MethodAttributesWireMethodAttributes] class RelatedAccountTokens(BaseModel): @@ -104,76 +143,83 @@ class RelatedAccountTokens(BaseModel): class Payment(BaseModel): token: str - """Globally unique identifier.""" - - category: Literal["ACH"] - """Payment category""" + """Unique identifier for the transaction""" + + category: Literal[ + "ACH", + "BALANCE_OR_FUNDING", + "FEE", + "REWARD", + "ADJUSTMENT", + "DERECOGNITION", + "DISPUTE", + "CARD", + "EXTERNAL_ACH", + "EXTERNAL_CHECK", + "EXTERNAL_TRANSFER", + "EXTERNAL_WIRE", + "MANAGEMENT_ADJUSTMENT", + "MANAGEMENT_DISPUTE", + "MANAGEMENT_FEE", + "MANAGEMENT_REWARD", + "MANAGEMENT_DISBURSEMENT", + "PROGRAM_FUNDING", + ] + """Transaction category""" created: datetime - """Date and time when the payment first occurred. UTC time zone.""" - - currency: str - """3-character alphabetic ISO 4217 code for the settling currency of the payment.""" + """ISO 8601 timestamp of when the transaction was created""" descriptor: str - """ - A string that provides a description of the payment; may be useful to display to - users. - """ + """Transaction descriptor""" direction: Literal["CREDIT", "DEBIT"] + """Transfer direction""" events: List[Event] - """A list of all payment events that have modified this payment.""" + """List of transaction events""" - external_bank_account_token: Optional[str] = None + family: Literal["PAYMENT"] + """PAYMENT - Payment Transaction""" financial_account_token: str + """Financial account token""" - method: Literal["ACH_NEXT_DAY", "ACH_SAME_DAY"] + method: Literal["ACH_NEXT_DAY", "ACH_SAME_DAY", "WIRE"] + """Transfer method""" method_attributes: MethodAttributes + """Method-specific attributes""" pending_amount: int - """ - Pending amount of the payment in the currency's smallest unit (e.g., cents). The - value of this field will go to zero over time once the payment is settled. - """ + """Pending amount in cents""" related_account_tokens: RelatedAccountTokens - """Account tokens related to a payment transaction""" + """Related account tokens for the transaction""" result: Literal["APPROVED", "DECLINED"] - """ - APPROVED payments were successful while DECLINED payments were declined by - Lithic or returned. - """ + """Transaction result""" settled_amount: int - """ - Amount of the payment that has been settled in the currency's smallest unit - (e.g., cents). - """ - - source: Literal["CUSTOMER", "LITHIC"] + """Settled amount in cents""" - status: Literal["DECLINED", "PENDING", "RETURNED", "SETTLED"] - """Status types: + source: Literal["LITHIC", "EXTERNAL", "CUSTOMER"] + """Transaction source""" - - `DECLINED` - The payment was declined. - - `PENDING` - The payment is being processed and has yet to settle or release - (origination debit). - - `RETURNED` - The payment has been returned. - - `SETTLED` - The payment is completed. - """ + status: Literal["PENDING", "SETTLED", "DECLINED", "REVERSED", "CANCELED"] + """The status of the transaction""" updated: datetime - """Date and time when the financial transaction was last updated. UTC time zone.""" + """ISO 8601 timestamp of when the transaction was last updated""" - user_defined_id: Optional[str] = None + currency: Optional[str] = None + """Currency of the transaction in ISO 4217 format""" expected_release_date: Optional[date] = None - """Date when the financial transaction expected to be released after settlement""" + """Expected release date for the transaction""" + + external_bank_account_token: Optional[str] = None + """External bank account token""" type: Optional[ Literal[ @@ -187,4 +233,6 @@ class Payment(BaseModel): "WIRE_OUTBOUND_ADMIN", ] ] = None - """Payment type indicating the specific ACH message or Fedwire transfer type""" + + user_defined_id: Optional[str] = None + """User-defined identifier""" diff --git a/src/lithic/types/provision_response.py b/src/lithic/types/provision_response.py new file mode 100644 index 00000000..0572d427 --- /dev/null +++ b/src/lithic/types/provision_response.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel + +__all__ = ["ProvisionResponse"] + + +class ProvisionResponse(BaseModel): + activation_data: Optional[str] = FieldInfo(alias="activationData", default=None) + + encrypted_data: Optional[str] = FieldInfo(alias="encryptedData", default=None) + + ephemeral_public_key: Optional[str] = FieldInfo(alias="ephemeralPublicKey", default=None) diff --git a/src/lithic/types/three_ds/authentication_retrieve_response.py b/src/lithic/types/three_ds/authentication_retrieve_response.py index c96d5ec9..3637b11b 100644 --- a/src/lithic/types/three_ds/authentication_retrieve_response.py +++ b/src/lithic/types/three_ds/authentication_retrieve_response.py @@ -76,6 +76,16 @@ class Cardholder(BaseModel): Maps to EMV 3DS field `addrMatch`. """ + address_on_file_match: Optional[ + Literal["MATCH", "MATCH_ADDRESS_ONLY", "MATCH_ZIP_ONLY", "MISMATCH", "NOT_PRESENT"] + ] = None + """ + Lithic's evaluation result comparing the transaction's address data with the + cardholder KYC data if it exists. In the event Lithic does not have any + Cardholder KYC data, or the transaction does not contain any address data, + NOT_PRESENT will be returned + """ + billing_address: Optional[CardholderBillingAddress] = None """Object containing data on the billing address provided during the transaction.""" diff --git a/src/lithic/types/tokenization.py b/src/lithic/types/tokenization.py index c6f6d12b..81e581b4 100644 --- a/src/lithic/types/tokenization.py +++ b/src/lithic/types/tokenization.py @@ -25,6 +25,7 @@ class Event(BaseModel): "TOKEN_ACTIVATED", "TOKEN_CREATED", "TOKEN_DEACTIVATED", + "TOKEN_DELETED_FROM_CONSUMER_APP", "TOKEN_INACTIVE", "TOKEN_STATE_UNKNOWN", "TOKEN_SUSPENDED", diff --git a/src/lithic/types/transaction.py b/src/lithic/types/transaction.py index 9f4d946d..f5c204d4 100644 --- a/src/lithic/types/transaction.py +++ b/src/lithic/types/transaction.py @@ -529,6 +529,8 @@ class EventRuleResult(BaseModel): "TRANSACTION_PREVIOUSLY_COMPLETED", "UNAUTHORIZED_MERCHANT", "VEHICLE_NUMBER_INVALID", + "CARDHOLDER_CHALLENGED", + "CARDHOLDER_CHALLENGE_FAILED", ] """The detailed_result associated with this rule's decline.""" @@ -641,6 +643,8 @@ class Event(BaseModel): "TRANSACTION_PREVIOUSLY_COMPLETED", "UNAUTHORIZED_MERCHANT", "VEHICLE_NUMBER_INVALID", + "CARDHOLDER_CHALLENGED", + "CARDHOLDER_CHALLENGE_FAILED", ] ] diff --git a/src/lithic/types/verification_method.py b/src/lithic/types/verification_method.py index b9aa0ee1..008d53fb 100644 --- a/src/lithic/types/verification_method.py +++ b/src/lithic/types/verification_method.py @@ -4,6 +4,4 @@ __all__ = ["VerificationMethod"] -VerificationMethod: TypeAlias = Literal[ - "MANUAL", "MICRO_DEPOSIT", "PLAID", "PRENOTE", "EXTERNALLY_VERIFIED", "UNVERIFIED" -] +VerificationMethod: TypeAlias = Literal["MANUAL", "MICRO_DEPOSIT", "PRENOTE", "EXTERNALLY_VERIFIED", "UNVERIFIED"] diff --git a/tests/api_resources/auth_rules/test_v2.py b/tests/api_resources/auth_rules/test_v2.py index 92208e8d..d2677553 100644 --- a/tests/api_resources/auth_rules/test_v2.py +++ b/tests/api_resources/auth_rules/test_v2.py @@ -16,7 +16,6 @@ V2ApplyResponse, V2DraftResponse, V2CreateResponse, - V2ReportResponse, V2UpdateResponse, V2PromoteResponse, V2RetrieveResponse, @@ -690,49 +689,6 @@ def test_path_params_promote(self, client: Lithic) -> None: "", ) - @parametrize - def test_method_report(self, client: Lithic) -> None: - with pytest.warns(DeprecationWarning): - v2 = client.auth_rules.v2.report( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ) - - assert_matches_type(V2ReportResponse, v2, path=["response"]) - - @parametrize - def test_raw_response_report(self, client: Lithic) -> None: - with pytest.warns(DeprecationWarning): - response = client.auth_rules.v2.with_raw_response.report( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - v2 = response.parse() - assert_matches_type(V2ReportResponse, v2, path=["response"]) - - @parametrize - def test_streaming_response_report(self, client: Lithic) -> None: - with pytest.warns(DeprecationWarning): - with client.auth_rules.v2.with_streaming_response.report( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - v2 = response.parse() - assert_matches_type(V2ReportResponse, v2, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_report(self, client: Lithic) -> None: - with pytest.warns(DeprecationWarning): - with pytest.raises(ValueError, match=r"Expected a non-empty value for `auth_rule_token` but received ''"): - client.auth_rules.v2.with_raw_response.report( - "", - ) - @parametrize def test_method_retrieve_features(self, client: Lithic) -> None: v2 = client.auth_rules.v2.retrieve_features( @@ -1490,49 +1446,6 @@ async def test_path_params_promote(self, async_client: AsyncLithic) -> None: "", ) - @parametrize - async def test_method_report(self, async_client: AsyncLithic) -> None: - with pytest.warns(DeprecationWarning): - v2 = await async_client.auth_rules.v2.report( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ) - - assert_matches_type(V2ReportResponse, v2, path=["response"]) - - @parametrize - async def test_raw_response_report(self, async_client: AsyncLithic) -> None: - with pytest.warns(DeprecationWarning): - response = await async_client.auth_rules.v2.with_raw_response.report( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - v2 = response.parse() - assert_matches_type(V2ReportResponse, v2, path=["response"]) - - @parametrize - async def test_streaming_response_report(self, async_client: AsyncLithic) -> None: - with pytest.warns(DeprecationWarning): - async with async_client.auth_rules.v2.with_streaming_response.report( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - v2 = await response.parse() - assert_matches_type(V2ReportResponse, v2, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_report(self, async_client: AsyncLithic) -> None: - with pytest.warns(DeprecationWarning): - with pytest.raises(ValueError, match=r"Expected a non-empty value for `auth_rule_token` but received ''"): - await async_client.auth_rules.v2.with_raw_response.report( - "", - ) - @parametrize async def test_method_retrieve_features(self, async_client: AsyncLithic) -> None: v2 = await async_client.auth_rules.v2.retrieve_features( diff --git a/tests/api_resources/test_external_bank_accounts.py b/tests/api_resources/test_external_bank_accounts.py index 0d2a7650..5b7ae910 100644 --- a/tests/api_resources/test_external_bank_accounts.py +++ b/tests/api_resources/test_external_bank_accounts.py @@ -113,61 +113,6 @@ def test_streaming_response_create_overload_1(self, client: Lithic) -> None: @parametrize def test_method_create_overload_2(self, client: Lithic) -> None: - external_bank_account = client.external_bank_accounts.create( - owner="owner", - owner_type="INDIVIDUAL", - processor_token="x", - verification_method="MANUAL", - ) - assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) - - @parametrize - def test_method_create_with_all_params_overload_2(self, client: Lithic) -> None: - external_bank_account = client.external_bank_accounts.create( - owner="owner", - owner_type="INDIVIDUAL", - processor_token="x", - verification_method="MANUAL", - account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - company_id="sq", - dob=parse_date("2019-12-27"), - doing_business_as="x", - user_defined_id="x", - ) - assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) - - @parametrize - def test_raw_response_create_overload_2(self, client: Lithic) -> None: - response = client.external_bank_accounts.with_raw_response.create( - owner="owner", - owner_type="INDIVIDUAL", - processor_token="x", - verification_method="MANUAL", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_bank_account = response.parse() - assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) - - @parametrize - def test_streaming_response_create_overload_2(self, client: Lithic) -> None: - with client.external_bank_accounts.with_streaming_response.create( - owner="owner", - owner_type="INDIVIDUAL", - processor_token="x", - verification_method="MANUAL", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - external_bank_account = response.parse() - assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_create_overload_3(self, client: Lithic) -> None: external_bank_account = client.external_bank_accounts.create( account_number="12345678901234567", country="USD", @@ -181,7 +126,7 @@ def test_method_create_overload_3(self, client: Lithic) -> None: assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) @parametrize - def test_method_create_with_all_params_overload_3(self, client: Lithic) -> None: + def test_method_create_with_all_params_overload_2(self, client: Lithic) -> None: external_bank_account = client.external_bank_accounts.create( account_number="12345678901234567", country="USD", @@ -209,7 +154,7 @@ def test_method_create_with_all_params_overload_3(self, client: Lithic) -> None: assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) @parametrize - def test_raw_response_create_overload_3(self, client: Lithic) -> None: + def test_raw_response_create_overload_2(self, client: Lithic) -> None: response = client.external_bank_accounts.with_raw_response.create( account_number="12345678901234567", country="USD", @@ -227,7 +172,7 @@ def test_raw_response_create_overload_3(self, client: Lithic) -> None: assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) @parametrize - def test_streaming_response_create_overload_3(self, client: Lithic) -> None: + def test_streaming_response_create_overload_2(self, client: Lithic) -> None: with client.external_bank_accounts.with_streaming_response.create( account_number="12345678901234567", country="USD", @@ -247,7 +192,7 @@ def test_streaming_response_create_overload_3(self, client: Lithic) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_method_create_overload_4(self, client: Lithic) -> None: + def test_method_create_overload_3(self, client: Lithic) -> None: external_bank_account = client.external_bank_accounts.create( account_number="12345678901234567", country="USD", @@ -261,7 +206,7 @@ def test_method_create_overload_4(self, client: Lithic) -> None: assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) @parametrize - def test_method_create_with_all_params_overload_4(self, client: Lithic) -> None: + def test_method_create_with_all_params_overload_3(self, client: Lithic) -> None: external_bank_account = client.external_bank_accounts.create( account_number="12345678901234567", country="USD", @@ -289,7 +234,7 @@ def test_method_create_with_all_params_overload_4(self, client: Lithic) -> None: assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) @parametrize - def test_raw_response_create_overload_4(self, client: Lithic) -> None: + def test_raw_response_create_overload_3(self, client: Lithic) -> None: response = client.external_bank_accounts.with_raw_response.create( account_number="12345678901234567", country="USD", @@ -307,7 +252,7 @@ def test_raw_response_create_overload_4(self, client: Lithic) -> None: assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) @parametrize - def test_streaming_response_create_overload_4(self, client: Lithic) -> None: + def test_streaming_response_create_overload_3(self, client: Lithic) -> None: with client.external_bank_accounts.with_streaming_response.create( account_number="12345678901234567", country="USD", @@ -660,61 +605,6 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncLit @parametrize async def test_method_create_overload_2(self, async_client: AsyncLithic) -> None: - external_bank_account = await async_client.external_bank_accounts.create( - owner="owner", - owner_type="INDIVIDUAL", - processor_token="x", - verification_method="MANUAL", - ) - assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) - - @parametrize - async def test_method_create_with_all_params_overload_2(self, async_client: AsyncLithic) -> None: - external_bank_account = await async_client.external_bank_accounts.create( - owner="owner", - owner_type="INDIVIDUAL", - processor_token="x", - verification_method="MANUAL", - account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - company_id="sq", - dob=parse_date("2019-12-27"), - doing_business_as="x", - user_defined_id="x", - ) - assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) - - @parametrize - async def test_raw_response_create_overload_2(self, async_client: AsyncLithic) -> None: - response = await async_client.external_bank_accounts.with_raw_response.create( - owner="owner", - owner_type="INDIVIDUAL", - processor_token="x", - verification_method="MANUAL", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_bank_account = response.parse() - assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) - - @parametrize - async def test_streaming_response_create_overload_2(self, async_client: AsyncLithic) -> None: - async with async_client.external_bank_accounts.with_streaming_response.create( - owner="owner", - owner_type="INDIVIDUAL", - processor_token="x", - verification_method="MANUAL", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - external_bank_account = await response.parse() - assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_create_overload_3(self, async_client: AsyncLithic) -> None: external_bank_account = await async_client.external_bank_accounts.create( account_number="12345678901234567", country="USD", @@ -728,7 +618,7 @@ async def test_method_create_overload_3(self, async_client: AsyncLithic) -> None assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) @parametrize - async def test_method_create_with_all_params_overload_3(self, async_client: AsyncLithic) -> None: + async def test_method_create_with_all_params_overload_2(self, async_client: AsyncLithic) -> None: external_bank_account = await async_client.external_bank_accounts.create( account_number="12345678901234567", country="USD", @@ -756,7 +646,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) @parametrize - async def test_raw_response_create_overload_3(self, async_client: AsyncLithic) -> None: + async def test_raw_response_create_overload_2(self, async_client: AsyncLithic) -> None: response = await async_client.external_bank_accounts.with_raw_response.create( account_number="12345678901234567", country="USD", @@ -774,7 +664,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncLithic) - assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) @parametrize - async def test_streaming_response_create_overload_3(self, async_client: AsyncLithic) -> None: + async def test_streaming_response_create_overload_2(self, async_client: AsyncLithic) -> None: async with async_client.external_bank_accounts.with_streaming_response.create( account_number="12345678901234567", country="USD", @@ -794,7 +684,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncLit assert cast(Any, response.is_closed) is True @parametrize - async def test_method_create_overload_4(self, async_client: AsyncLithic) -> None: + async def test_method_create_overload_3(self, async_client: AsyncLithic) -> None: external_bank_account = await async_client.external_bank_accounts.create( account_number="12345678901234567", country="USD", @@ -808,7 +698,7 @@ async def test_method_create_overload_4(self, async_client: AsyncLithic) -> None assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) @parametrize - async def test_method_create_with_all_params_overload_4(self, async_client: AsyncLithic) -> None: + async def test_method_create_with_all_params_overload_3(self, async_client: AsyncLithic) -> None: external_bank_account = await async_client.external_bank_accounts.create( account_number="12345678901234567", country="USD", @@ -836,7 +726,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) @parametrize - async def test_raw_response_create_overload_4(self, async_client: AsyncLithic) -> None: + async def test_raw_response_create_overload_3(self, async_client: AsyncLithic) -> None: response = await async_client.external_bank_accounts.with_raw_response.create( account_number="12345678901234567", country="USD", @@ -854,7 +744,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncLithic) - assert_matches_type(ExternalBankAccountCreateResponse, external_bank_account, path=["response"]) @parametrize - async def test_streaming_response_create_overload_4(self, async_client: AsyncLithic) -> None: + async def test_streaming_response_create_overload_3(self, async_client: AsyncLithic) -> None: async with async_client.external_bank_accounts.with_streaming_response.create( account_number="12345678901234567", country="USD",