From d70cab37a0ef4a4cb76bce9ceb27a0591de65044 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Mon, 6 Nov 2023 21:22:45 +0000 Subject: [PATCH 1/5] feat(client): support passing httpx.Timeout to method timeout argument (#234) --- src/lithic/_base_client.py | 2 +- src/lithic/_client.py | 4 +- src/lithic/resources/account_holders.py | 42 +++++++++-------- src/lithic/resources/accounts/accounts.py | 14 +++--- .../accounts/credit_configurations.py | 10 ++-- src/lithic/resources/aggregate_balances.py | 6 ++- src/lithic/resources/auth_rules.py | 26 ++++++----- .../resources/auth_stream_enrollment.py | 22 +++++---- src/lithic/resources/balances.py | 6 ++- src/lithic/resources/card_product.py | 6 ++- src/lithic/resources/card_programs.py | 10 ++-- .../resources/cards/aggregate_balances.py | 6 ++- src/lithic/resources/cards/balances.py | 6 ++- src/lithic/resources/cards/cards.py | 33 ++++++------- .../resources/cards/financial_transactions.py | 10 ++-- src/lithic/resources/digital_card_art.py | 6 ++- src/lithic/resources/disputes.py | 38 +++++++-------- src/lithic/resources/events/events.py | 14 +++--- src/lithic/resources/events/subscriptions.py | 46 ++++++++++--------- .../external_bank_accounts.py | 26 ++++++----- .../external_bank_accounts/micro_deposits.py | 6 ++- .../resources/financial_accounts/balances.py | 6 ++- .../financial_accounts/financial_accounts.py | 6 ++- .../financial_transactions.py | 10 ++-- .../statements/line_items.py | 6 ++- .../statements/statements.py | 10 ++-- src/lithic/resources/payments.py | 26 ++++++----- src/lithic/resources/reports/settlement.py | 10 ++-- src/lithic/resources/responder_endpoints.py | 14 +++--- .../resources/three_ds/authentication.py | 10 ++-- src/lithic/resources/three_ds/decisioning.py | 10 ++-- .../resources/tokenization_decisioning.py | 10 ++-- src/lithic/resources/tokenizations.py | 6 ++- src/lithic/resources/transactions.py | 38 +++++++-------- 34 files changed, 282 insertions(+), 219 deletions(-) diff --git a/src/lithic/_base_client.py b/src/lithic/_base_client.py index 22f90050..e37759cd 100644 --- a/src/lithic/_base_client.py +++ b/src/lithic/_base_client.py @@ -1537,7 +1537,7 @@ def make_request_options( extra_query: Query | None = None, extra_body: Body | None = None, idempotency_key: str | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, post_parser: PostParser | NotGiven = NOT_GIVEN, ) -> RequestOptions: """Create a dict of type RequestOptions without keys of NotGiven values.""" diff --git a/src/lithic/_client.py b/src/lithic/_client.py index be7fc379..f31583a8 100644 --- a/src/lithic/_client.py +++ b/src/lithic/_client.py @@ -297,7 +297,7 @@ def api_status( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> APIStatus: """API status check""" return self.get( @@ -584,7 +584,7 @@ async def api_status( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> APIStatus: """API status check""" return await self.get( diff --git a/src/lithic/resources/account_holders.py b/src/lithic/resources/account_holders.py index ec717a4b..dd7c8400 100644 --- a/src/lithic/resources/account_holders.py +++ b/src/lithic/resources/account_holders.py @@ -5,6 +5,8 @@ from typing import TYPE_CHECKING, List, overload from typing_extensions import Literal +import httpx + from ..types import ( AccountHolder, AccountHolderDocument, @@ -53,7 +55,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = 300, + timeout: float | httpx.Timeout | None | NotGiven = 300, idempotency_key: str | None = None, ) -> AccountHolder: """ @@ -135,7 +137,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = 300, + timeout: float | httpx.Timeout | None | NotGiven = 300, idempotency_key: str | None = None, ) -> AccountHolder: """ @@ -191,7 +193,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = 300, + timeout: float | httpx.Timeout | None | NotGiven = 300, idempotency_key: str | None = None, ) -> AccountHolder: """ @@ -277,7 +279,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = 300, + timeout: float | httpx.Timeout | None | NotGiven = 300, idempotency_key: str | None = None, ) -> AccountHolder: return self._post( @@ -324,7 +326,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AccountHolder: """ Get an Individual or Business Account Holder and/or their KYC or KYB evaluation @@ -359,7 +361,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AccountHolderUpdateResponse: """ @@ -417,7 +419,7 @@ def list_documents( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AccountHolderListDocumentsResponse: """ Retrieve the status of account holder document uploads, or retrieve the upload @@ -465,7 +467,7 @@ def resubmit( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AccountHolder: """Resubmit a KYC submission. @@ -527,7 +529,7 @@ def retrieve_document( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AccountHolderDocument: """ Check the status of an account holder document upload, or retrieve the upload @@ -572,7 +574,7 @@ def upload_document( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AccountHolderDocument: """ @@ -650,7 +652,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = 300, + timeout: float | httpx.Timeout | None | NotGiven = 300, idempotency_key: str | None = None, ) -> AccountHolder: """ @@ -732,7 +734,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = 300, + timeout: float | httpx.Timeout | None | NotGiven = 300, idempotency_key: str | None = None, ) -> AccountHolder: """ @@ -788,7 +790,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = 300, + timeout: float | httpx.Timeout | None | NotGiven = 300, idempotency_key: str | None = None, ) -> AccountHolder: """ @@ -874,7 +876,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = 300, + timeout: float | httpx.Timeout | None | NotGiven = 300, idempotency_key: str | None = None, ) -> AccountHolder: return await self._post( @@ -921,7 +923,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AccountHolder: """ Get an Individual or Business Account Holder and/or their KYC or KYB evaluation @@ -956,7 +958,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AccountHolderUpdateResponse: """ @@ -1014,7 +1016,7 @@ async def list_documents( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AccountHolderListDocumentsResponse: """ Retrieve the status of account holder document uploads, or retrieve the upload @@ -1062,7 +1064,7 @@ async def resubmit( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AccountHolder: """Resubmit a KYC submission. @@ -1124,7 +1126,7 @@ async def retrieve_document( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AccountHolderDocument: """ Check the status of an account holder document upload, or retrieve the upload @@ -1169,7 +1171,7 @@ async def upload_document( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AccountHolderDocument: """ diff --git a/src/lithic/resources/accounts/accounts.py b/src/lithic/resources/accounts/accounts.py index c6d032a3..f1dbec13 100644 --- a/src/lithic/resources/accounts/accounts.py +++ b/src/lithic/resources/accounts/accounts.py @@ -6,6 +6,8 @@ from datetime import datetime from typing_extensions import Literal +import httpx + from ...types import Account, account_list_params, account_update_params from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform @@ -44,7 +46,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Account: """ Get account configuration such as spend limits. @@ -80,7 +82,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Account: """Update account configuration such as spend limits and verification address. @@ -156,7 +158,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[Account]: """List account configurations. @@ -226,7 +228,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Account: """ Get account configuration such as spend limits. @@ -262,7 +264,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Account: """Update account configuration such as spend limits and verification address. @@ -338,7 +340,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Account, AsyncCursorPage[Account]]: """List account configurations. diff --git a/src/lithic/resources/accounts/credit_configurations.py b/src/lithic/resources/accounts/credit_configurations.py index f9d5f34a..a4a2a657 100644 --- a/src/lithic/resources/accounts/credit_configurations.py +++ b/src/lithic/resources/accounts/credit_configurations.py @@ -4,6 +4,8 @@ from typing import TYPE_CHECKING +import httpx + from ...types import BusinessAccount from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform @@ -34,7 +36,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> BusinessAccount: """ Get an Account's credit configuration @@ -69,7 +71,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> BusinessAccount: """ @@ -132,7 +134,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> BusinessAccount: """ Get an Account's credit configuration @@ -167,7 +169,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> BusinessAccount: """ diff --git a/src/lithic/resources/aggregate_balances.py b/src/lithic/resources/aggregate_balances.py index 42d45e54..d3645458 100644 --- a/src/lithic/resources/aggregate_balances.py +++ b/src/lithic/resources/aggregate_balances.py @@ -5,6 +5,8 @@ from typing import TYPE_CHECKING from typing_extensions import Literal +import httpx + from ..types import AggregateBalance, aggregate_balance_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform @@ -35,7 +37,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[AggregateBalance]: """ Get the aggregated balance across all end-user accounts by financial account @@ -85,7 +87,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[AggregateBalance, AsyncSinglePage[AggregateBalance]]: """ Get the aggregated balance across all end-user accounts by financial account diff --git a/src/lithic/resources/auth_rules.py b/src/lithic/resources/auth_rules.py index bd4b5ac6..927ba282 100644 --- a/src/lithic/resources/auth_rules.py +++ b/src/lithic/resources/auth_rules.py @@ -4,6 +4,8 @@ from typing import TYPE_CHECKING, List +import httpx + from ..types import ( AuthRule, AuthRuleRemoveResponse, @@ -49,7 +51,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AuthRule: """ @@ -120,7 +122,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AuthRuleRetrieveResponse: """ Detail the properties and entities (program, accounts, and cards) associated @@ -156,7 +158,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AuthRule: """ @@ -221,7 +223,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[AuthRule]: """ Return all of the Auth Rules under the program. @@ -275,7 +277,7 @@ def apply( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AuthRule: """ @@ -333,7 +335,7 @@ def remove( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AuthRuleRemoveResponse: """ @@ -403,7 +405,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AuthRule: """ @@ -474,7 +476,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AuthRuleRetrieveResponse: """ Detail the properties and entities (program, accounts, and cards) associated @@ -510,7 +512,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AuthRule: """ @@ -575,7 +577,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[AuthRule, AsyncCursorPage[AuthRule]]: """ Return all of the Auth Rules under the program. @@ -629,7 +631,7 @@ async def apply( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AuthRule: """ @@ -687,7 +689,7 @@ async def remove( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AuthRuleRemoveResponse: """ diff --git a/src/lithic/resources/auth_stream_enrollment.py b/src/lithic/resources/auth_stream_enrollment.py index 227b3ac7..6069c7fc 100644 --- a/src/lithic/resources/auth_stream_enrollment.py +++ b/src/lithic/resources/auth_stream_enrollment.py @@ -4,6 +4,8 @@ from typing import TYPE_CHECKING +import httpx + from ..types import ( AuthStreamSecret, AuthStreamEnrollment, @@ -36,7 +38,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AuthStreamEnrollment: """ Check status for whether you have enrolled in Authorization Stream Access (ASA) @@ -58,7 +60,7 @@ def disenroll( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """Disenroll Authorization Stream Access (ASA) in Sandbox.""" @@ -83,7 +85,7 @@ def enroll( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """ @@ -136,7 +138,7 @@ def retrieve_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AuthStreamSecret: """Retrieve the ASA HMAC secret key. @@ -163,7 +165,7 @@ def rotate_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """Generate a new ASA HMAC secret key. @@ -201,7 +203,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AuthStreamEnrollment: """ Check status for whether you have enrolled in Authorization Stream Access (ASA) @@ -223,7 +225,7 @@ async def disenroll( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """Disenroll Authorization Stream Access (ASA) in Sandbox.""" @@ -248,7 +250,7 @@ async def enroll( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """ @@ -301,7 +303,7 @@ async def retrieve_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AuthStreamSecret: """Retrieve the ASA HMAC secret key. @@ -328,7 +330,7 @@ async def rotate_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """Generate a new ASA HMAC secret key. diff --git a/src/lithic/resources/balances.py b/src/lithic/resources/balances.py index 7beca31e..32dc0958 100644 --- a/src/lithic/resources/balances.py +++ b/src/lithic/resources/balances.py @@ -6,6 +6,8 @@ from datetime import datetime from typing_extensions import Literal +import httpx + from ..types import Balance, balance_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform @@ -38,7 +40,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[Balance]: """ Get the balances for a program or a given end-user account @@ -98,7 +100,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Balance, AsyncSinglePage[Balance]]: """ Get the balances for a program or a given end-user account diff --git a/src/lithic/resources/card_product.py b/src/lithic/resources/card_product.py index 612acc4c..7108af32 100644 --- a/src/lithic/resources/card_product.py +++ b/src/lithic/resources/card_product.py @@ -4,6 +4,8 @@ from typing import TYPE_CHECKING +import httpx + from ..types import CardProductCreditDetailResponse from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._resource import SyncAPIResource, AsyncAPIResource @@ -31,7 +33,7 @@ def credit_detail( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> CardProductCreditDetailResponse: """Get the Credit Detail for the card product""" return self._get( @@ -58,7 +60,7 @@ async def credit_detail( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> CardProductCreditDetailResponse: """Get the Credit Detail for the card product""" return await self._get( diff --git a/src/lithic/resources/card_programs.py b/src/lithic/resources/card_programs.py index 57424f36..32cb78db 100644 --- a/src/lithic/resources/card_programs.py +++ b/src/lithic/resources/card_programs.py @@ -4,6 +4,8 @@ from typing import TYPE_CHECKING +import httpx + from ..types import CardProgram, card_program_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform @@ -34,7 +36,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> CardProgram: """ Get card program. @@ -67,7 +69,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[CardProgram]: """ List card programs. @@ -126,7 +128,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> CardProgram: """ Get card program. @@ -159,7 +161,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[CardProgram, AsyncCursorPage[CardProgram]]: """ List card programs. diff --git a/src/lithic/resources/cards/aggregate_balances.py b/src/lithic/resources/cards/aggregate_balances.py index 329b4a8c..07311419 100644 --- a/src/lithic/resources/cards/aggregate_balances.py +++ b/src/lithic/resources/cards/aggregate_balances.py @@ -4,6 +4,8 @@ from typing import TYPE_CHECKING +import httpx + from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource @@ -35,7 +37,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[AggregateBalanceListResponse]: """ Get the aggregated card balance across all end-user accounts. @@ -90,7 +92,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[AggregateBalanceListResponse, AsyncSinglePage[AggregateBalanceListResponse]]: """ Get the aggregated card balance across all end-user accounts. diff --git a/src/lithic/resources/cards/balances.py b/src/lithic/resources/cards/balances.py index 0a985b41..9a479fae 100644 --- a/src/lithic/resources/cards/balances.py +++ b/src/lithic/resources/cards/balances.py @@ -5,6 +5,8 @@ from typing import TYPE_CHECKING, Union from datetime import datetime +import httpx + from ...types import Balance from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform @@ -38,7 +40,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[Balance]: """ Get the balances for a given card. @@ -96,7 +98,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Balance, AsyncSinglePage[Balance]]: """ Get the balances for a given card. diff --git a/src/lithic/resources/cards/cards.py b/src/lithic/resources/cards/cards.py index f4388d51..6d1239fb 100644 --- a/src/lithic/resources/cards/cards.py +++ b/src/lithic/resources/cards/cards.py @@ -10,6 +10,7 @@ from datetime import datetime, timezone, timedelta from typing_extensions import Literal +import httpx from httpx import URL from ...types import ( @@ -93,7 +94,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Card: """Create a new virtual or physical card. @@ -240,7 +241,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Card: """ Get card configuration such as spend limit and state. @@ -278,7 +279,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Card: """Update the specified properties of the card. @@ -382,7 +383,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[Card]: """ List cards. @@ -448,7 +449,7 @@ def embed( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> str: """ Handling full card PANs and CVV codes requires that you comply with the Payment @@ -522,7 +523,7 @@ def get_embed_html( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> str: """ @@ -636,7 +637,7 @@ def provision( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> CardProvisionResponse: """ @@ -708,7 +709,7 @@ def reissue( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Card: """ @@ -807,7 +808,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Card: """Create a new virtual or physical card. @@ -954,7 +955,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Card: """ Get card configuration such as spend limit and state. @@ -992,7 +993,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Card: """Update the specified properties of the card. @@ -1096,7 +1097,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Card, AsyncCursorPage[Card]]: """ List cards. @@ -1162,7 +1163,7 @@ async def embed( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> str: """ Handling full card PANs and CVV codes requires that you comply with the Payment @@ -1236,7 +1237,7 @@ async def get_embed_html( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> str: """ @@ -1350,7 +1351,7 @@ async def provision( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> CardProvisionResponse: """ @@ -1422,7 +1423,7 @@ async def reissue( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Card: """ diff --git a/src/lithic/resources/cards/financial_transactions.py b/src/lithic/resources/cards/financial_transactions.py index 0e8698de..b56a9605 100644 --- a/src/lithic/resources/cards/financial_transactions.py +++ b/src/lithic/resources/cards/financial_transactions.py @@ -6,6 +6,8 @@ from datetime import datetime from typing_extensions import Literal +import httpx + from ...types import FinancialTransaction from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform @@ -38,7 +40,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> FinancialTransaction: """ Get the card financial transaction for the provided token. @@ -76,7 +78,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[FinancialTransaction]: """ List the financial transactions for a given card. @@ -150,7 +152,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> FinancialTransaction: """ Get the card financial transaction for the provided token. @@ -188,7 +190,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[FinancialTransaction, AsyncSinglePage[FinancialTransaction]]: """ List the financial transactions for a given card. diff --git a/src/lithic/resources/digital_card_art.py b/src/lithic/resources/digital_card_art.py index 3a8b614c..c0c41621 100644 --- a/src/lithic/resources/digital_card_art.py +++ b/src/lithic/resources/digital_card_art.py @@ -4,6 +4,8 @@ from typing import TYPE_CHECKING +import httpx + from ..types import DigitalCardArt, digital_card_art_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform @@ -36,7 +38,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[DigitalCardArt]: """ List digital card art. @@ -97,7 +99,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[DigitalCardArt, AsyncCursorPage[DigitalCardArt]]: """ List digital card art. diff --git a/src/lithic/resources/disputes.py b/src/lithic/resources/disputes.py index b44e134b..7ce04091 100644 --- a/src/lithic/resources/disputes.py +++ b/src/lithic/resources/disputes.py @@ -6,6 +6,8 @@ from datetime import datetime from typing_extensions import Literal +import httpx + from ..types import ( Dispute, DisputeEvidence, @@ -72,7 +74,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Dispute: """ @@ -130,7 +132,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Dispute: """ Get dispute. @@ -181,7 +183,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Dispute: """Update dispute. @@ -253,7 +255,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[Dispute]: """List disputes. @@ -319,7 +321,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Dispute: """ @@ -358,7 +360,7 @@ def delete_evidence( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> DisputeEvidence: """Soft delete evidence for a dispute. @@ -399,7 +401,7 @@ def initiate_evidence_upload( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> DisputeEvidence: """Use this endpoint to upload evidences for the dispute. @@ -452,7 +454,7 @@ def list_evidences( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[DisputeEvidence]: """ List evidence metadata for a dispute. @@ -512,7 +514,7 @@ def retrieve_evidence( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> DisputeEvidence: """ Get a dispute's evidence metadata. @@ -592,7 +594,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Dispute: """ @@ -650,7 +652,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Dispute: """ Get dispute. @@ -701,7 +703,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Dispute: """Update dispute. @@ -773,7 +775,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Dispute, AsyncCursorPage[Dispute]]: """List disputes. @@ -839,7 +841,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Dispute: """ @@ -878,7 +880,7 @@ async def delete_evidence( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> DisputeEvidence: """Soft delete evidence for a dispute. @@ -919,7 +921,7 @@ async def initiate_evidence_upload( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> DisputeEvidence: """Use this endpoint to upload evidences for the dispute. @@ -972,7 +974,7 @@ def list_evidences( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[DisputeEvidence, AsyncCursorPage[DisputeEvidence]]: """ List evidence metadata for a dispute. @@ -1032,7 +1034,7 @@ async def retrieve_evidence( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> DisputeEvidence: """ Get a dispute's evidence metadata. diff --git a/src/lithic/resources/events/events.py b/src/lithic/resources/events/events.py index dd30d1d5..8f6bdf9a 100644 --- a/src/lithic/resources/events/events.py +++ b/src/lithic/resources/events/events.py @@ -6,6 +6,8 @@ from datetime import datetime from typing_extensions import Literal +import httpx + from ...types import ( Event, MessageAttempt, @@ -49,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Event: """ Get an event. @@ -105,7 +107,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[Event]: """List all events. @@ -177,7 +179,7 @@ def list_attempts( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[MessageAttempt]: """ List all the message attempts for a given event. @@ -263,7 +265,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Event: """ Get an event. @@ -319,7 +321,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Event, AsyncCursorPage[Event]]: """List all events. @@ -391,7 +393,7 @@ def list_attempts( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[MessageAttempt, AsyncCursorPage[MessageAttempt]]: """ List all the message attempts for a given event. diff --git a/src/lithic/resources/events/subscriptions.py b/src/lithic/resources/events/subscriptions.py index cd9b962d..bfd72a01 100644 --- a/src/lithic/resources/events/subscriptions.py +++ b/src/lithic/resources/events/subscriptions.py @@ -6,6 +6,8 @@ from datetime import datetime from typing_extensions import Literal +import httpx + from ...types import MessageAttempt, EventSubscription from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven from ..._utils import maybe_transform @@ -68,7 +70,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> EventSubscription: """ @@ -124,7 +126,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EventSubscription: """ Get an event subscription. @@ -178,7 +180,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> EventSubscription: """ @@ -236,7 +238,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[EventSubscription]: """ List all the event subscriptions. @@ -287,7 +289,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """ @@ -331,7 +333,7 @@ def list_attempts( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[MessageAttempt]: """ List all the message attempts for a given event subscription. @@ -393,7 +395,7 @@ def recover( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """ @@ -446,7 +448,7 @@ def replay_missing( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """Replays messages to the endpoint. @@ -502,7 +504,7 @@ def retrieve_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SubscriptionRetrieveSecretResponse: """ Get the secret for an event subscription. @@ -533,7 +535,7 @@ def rotate_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """Rotate the secret for an event subscription. @@ -591,7 +593,7 @@ def send_simulated_example( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """ @@ -665,7 +667,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> EventSubscription: """ @@ -721,7 +723,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> EventSubscription: """ Get an event subscription. @@ -775,7 +777,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> EventSubscription: """ @@ -833,7 +835,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[EventSubscription, AsyncCursorPage[EventSubscription]]: """ List all the event subscriptions. @@ -884,7 +886,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """ @@ -928,7 +930,7 @@ def list_attempts( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[MessageAttempt, AsyncCursorPage[MessageAttempt]]: """ List all the message attempts for a given event subscription. @@ -990,7 +992,7 @@ async def recover( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """ @@ -1043,7 +1045,7 @@ async def replay_missing( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """Replays messages to the endpoint. @@ -1099,7 +1101,7 @@ async def retrieve_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SubscriptionRetrieveSecretResponse: """ Get the secret for an event subscription. @@ -1130,7 +1132,7 @@ async def rotate_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """Rotate the secret for an event subscription. @@ -1188,7 +1190,7 @@ async def send_simulated_example( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """ 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 64411797..693b5478 100644 --- a/src/lithic/resources/external_bank_accounts/external_bank_accounts.py +++ b/src/lithic/resources/external_bank_accounts/external_bank_accounts.py @@ -6,6 +6,8 @@ from datetime import date from typing_extensions import Literal +import httpx + from ...types import ( OwnerType, VerificationMethod, @@ -64,7 +66,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ExternalBankAccountCreateResponse: """ @@ -110,7 +112,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ExternalBankAccountCreateResponse: """ @@ -177,7 +179,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ExternalBankAccountCreateResponse: return self._post( @@ -223,7 +225,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ExternalBankAccountRetrieveResponse: """ Get the external bank account by token. @@ -262,7 +264,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ExternalBankAccountUpdateResponse: """ @@ -326,7 +328,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[ExternalBankAccountListResponse]: """ List all the external bank accounts for the provided search criteria. @@ -402,7 +404,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ExternalBankAccountCreateResponse: """ @@ -448,7 +450,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ExternalBankAccountCreateResponse: """ @@ -515,7 +517,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ExternalBankAccountCreateResponse: return await self._post( @@ -561,7 +563,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ExternalBankAccountRetrieveResponse: """ Get the external bank account by token. @@ -600,7 +602,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ExternalBankAccountUpdateResponse: """ @@ -664,7 +666,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[ExternalBankAccountListResponse, AsyncCursorPage[ExternalBankAccountListResponse]]: """ List all the external bank accounts for the provided search criteria. diff --git a/src/lithic/resources/external_bank_accounts/micro_deposits.py b/src/lithic/resources/external_bank_accounts/micro_deposits.py index 7153b28f..77d39f85 100644 --- a/src/lithic/resources/external_bank_accounts/micro_deposits.py +++ b/src/lithic/resources/external_bank_accounts/micro_deposits.py @@ -4,6 +4,8 @@ from typing import TYPE_CHECKING, List +import httpx + from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource @@ -37,7 +39,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> MicroDepositCreateResponse: """ @@ -87,7 +89,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> MicroDepositCreateResponse: """ diff --git a/src/lithic/resources/financial_accounts/balances.py b/src/lithic/resources/financial_accounts/balances.py index ca900afd..f6232491 100644 --- a/src/lithic/resources/financial_accounts/balances.py +++ b/src/lithic/resources/financial_accounts/balances.py @@ -5,6 +5,8 @@ from typing import TYPE_CHECKING, Union from datetime import datetime +import httpx + from ...types import Balance from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform @@ -38,7 +40,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[Balance]: """ Get the balances for a given financial account. @@ -96,7 +98,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Balance, AsyncSinglePage[Balance]]: """ Get the balances for a given financial account. diff --git a/src/lithic/resources/financial_accounts/financial_accounts.py b/src/lithic/resources/financial_accounts/financial_accounts.py index 2773f0f9..297eb240 100644 --- a/src/lithic/resources/financial_accounts/financial_accounts.py +++ b/src/lithic/resources/financial_accounts/financial_accounts.py @@ -5,6 +5,8 @@ from typing import TYPE_CHECKING from typing_extensions import Literal +import httpx + from ...types import FinancialAccount, financial_account_list_params from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform @@ -60,7 +62,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[FinancialAccount]: """ Retrieve information on your financial accounts including routing and account @@ -122,7 +124,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[FinancialAccount, AsyncSinglePage[FinancialAccount]]: """ Retrieve information on your financial accounts including routing and account diff --git a/src/lithic/resources/financial_accounts/financial_transactions.py b/src/lithic/resources/financial_accounts/financial_transactions.py index 6b939908..7e3182eb 100644 --- a/src/lithic/resources/financial_accounts/financial_transactions.py +++ b/src/lithic/resources/financial_accounts/financial_transactions.py @@ -6,6 +6,8 @@ from datetime import datetime from typing_extensions import Literal +import httpx + from ...types import FinancialTransaction from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform @@ -38,7 +40,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> FinancialTransaction: """ Get the financial transaction for the provided token. @@ -76,7 +78,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSinglePage[FinancialTransaction]: """ List the financial transactions for a given financial account. @@ -150,7 +152,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> FinancialTransaction: """ Get the financial transaction for the provided token. @@ -188,7 +190,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[FinancialTransaction, AsyncSinglePage[FinancialTransaction]]: """ List the financial transactions for a given financial account. diff --git a/src/lithic/resources/financial_accounts/statements/line_items.py b/src/lithic/resources/financial_accounts/statements/line_items.py index a97b7811..30e7e64f 100644 --- a/src/lithic/resources/financial_accounts/statements/line_items.py +++ b/src/lithic/resources/financial_accounts/statements/line_items.py @@ -4,6 +4,8 @@ from typing import TYPE_CHECKING +import httpx + from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._utils import maybe_transform from ...._resource import SyncAPIResource, AsyncAPIResource @@ -41,7 +43,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[LineItemListResponse]: """ List the line items for a given statement within a given financial account. @@ -104,7 +106,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[LineItemListResponse, AsyncCursorPage[LineItemListResponse]]: """ List the line items for a given statement within a given financial account. diff --git a/src/lithic/resources/financial_accounts/statements/statements.py b/src/lithic/resources/financial_accounts/statements/statements.py index 9086e7d0..7fcff684 100644 --- a/src/lithic/resources/financial_accounts/statements/statements.py +++ b/src/lithic/resources/financial_accounts/statements/statements.py @@ -5,6 +5,8 @@ from typing import TYPE_CHECKING, Union from datetime import date +import httpx + from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._utils import maybe_transform from .line_items import ( @@ -44,7 +46,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Statement: """ Get a specific statement for a given financial account. @@ -80,7 +82,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[Statement]: """ List the statements for a given financial account. @@ -150,7 +152,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Statement: """ Get a specific statement for a given financial account. @@ -186,7 +188,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Statement, AsyncCursorPage[Statement]]: """ List the statements for a given financial account. diff --git a/src/lithic/resources/payments.py b/src/lithic/resources/payments.py index 47ebf656..00a37625 100644 --- a/src/lithic/resources/payments.py +++ b/src/lithic/resources/payments.py @@ -5,6 +5,8 @@ from typing import TYPE_CHECKING from typing_extensions import Literal +import httpx + from ..types import ( Payment, PaymentRetryResponse, @@ -53,7 +55,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> PaymentCreateResponse: """ @@ -105,7 +107,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Payment: """ Get the payment by token. @@ -141,7 +143,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[Payment]: """ List all the payments for the provided search criteria. @@ -195,7 +197,7 @@ def retry( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> PaymentRetryResponse: """ @@ -233,7 +235,7 @@ def simulate_release( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> PaymentSimulateReleaseResponse: """ @@ -275,7 +277,7 @@ def simulate_return( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> PaymentSimulateReturnResponse: """ @@ -336,7 +338,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> PaymentCreateResponse: """ @@ -388,7 +390,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Payment: """ Get the payment by token. @@ -424,7 +426,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Payment, AsyncCursorPage[Payment]]: """ List all the payments for the provided search criteria. @@ -478,7 +480,7 @@ async def retry( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> PaymentRetryResponse: """ @@ -516,7 +518,7 @@ async def simulate_release( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> PaymentSimulateReleaseResponse: """ @@ -558,7 +560,7 @@ async def simulate_return( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> PaymentSimulateReturnResponse: """ diff --git a/src/lithic/resources/reports/settlement.py b/src/lithic/resources/reports/settlement.py index 0dfbbeb3..b533db65 100644 --- a/src/lithic/resources/reports/settlement.py +++ b/src/lithic/resources/reports/settlement.py @@ -5,6 +5,8 @@ from typing import TYPE_CHECKING, Union from datetime import date +import httpx + from ...types import SettlementDetail from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform @@ -39,7 +41,7 @@ def list_details( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[SettlementDetail]: """ List details. @@ -90,7 +92,7 @@ def summary( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SettlementSummaryResponse: """ Get the settlement report for a specified report date. @@ -132,7 +134,7 @@ def list_details( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[SettlementDetail, AsyncCursorPage[SettlementDetail]]: """ List details. @@ -183,7 +185,7 @@ async def summary( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SettlementSummaryResponse: """ Get the settlement report for a specified report date. diff --git a/src/lithic/resources/responder_endpoints.py b/src/lithic/resources/responder_endpoints.py index 3ea19b9d..b98d3305 100644 --- a/src/lithic/resources/responder_endpoints.py +++ b/src/lithic/resources/responder_endpoints.py @@ -5,6 +5,8 @@ from typing import TYPE_CHECKING from typing_extensions import Literal +import httpx + from ..types import ( ResponderEndpointStatus, ResponderEndpointCreateResponse, @@ -41,7 +43,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ResponderEndpointCreateResponse: """ @@ -90,7 +92,7 @@ def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """ @@ -131,7 +133,7 @@ def check_status( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ResponderEndpointStatus: """ Check the status of a responder endpoint @@ -179,7 +181,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> ResponderEndpointCreateResponse: """ @@ -228,7 +230,7 @@ async def delete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """ @@ -269,7 +271,7 @@ async def check_status( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> ResponderEndpointStatus: """ Check the status of a responder endpoint diff --git a/src/lithic/resources/three_ds/authentication.py b/src/lithic/resources/three_ds/authentication.py index 576b2a41..d8495bac 100644 --- a/src/lithic/resources/three_ds/authentication.py +++ b/src/lithic/resources/three_ds/authentication.py @@ -4,6 +4,8 @@ from typing import TYPE_CHECKING +import httpx + from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import maybe_transform from ..._resource import SyncAPIResource, AsyncAPIResource @@ -37,7 +39,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AuthenticationRetrieveResponse: """ Get 3DS Authentication by token @@ -70,7 +72,7 @@ def simulate( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AuthenticationSimulateResponse: """ @@ -129,7 +131,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AuthenticationRetrieveResponse: """ Get 3DS Authentication by token @@ -162,7 +164,7 @@ async def simulate( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> AuthenticationSimulateResponse: """ diff --git a/src/lithic/resources/three_ds/decisioning.py b/src/lithic/resources/three_ds/decisioning.py index 0190c97d..9b499479 100644 --- a/src/lithic/resources/three_ds/decisioning.py +++ b/src/lithic/resources/three_ds/decisioning.py @@ -4,6 +4,8 @@ from typing import TYPE_CHECKING +import httpx + from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_raw_response_wrapper, async_to_raw_response_wrapper @@ -31,7 +33,7 @@ def retrieve_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> DecisioningRetrieveSecretResponse: """Retrieve the 3DS Decisioning HMAC secret key. @@ -58,7 +60,7 @@ def rotate_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """Generate a new 3DS Decisioning HMAC secret key. @@ -96,7 +98,7 @@ async def retrieve_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> DecisioningRetrieveSecretResponse: """Retrieve the 3DS Decisioning HMAC secret key. @@ -123,7 +125,7 @@ async def rotate_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> None: """Generate a new 3DS Decisioning HMAC secret key. diff --git a/src/lithic/resources/tokenization_decisioning.py b/src/lithic/resources/tokenization_decisioning.py index c7c97c74..53fb8578 100644 --- a/src/lithic/resources/tokenization_decisioning.py +++ b/src/lithic/resources/tokenization_decisioning.py @@ -4,6 +4,8 @@ from typing import TYPE_CHECKING +import httpx + from ..types import TokenizationSecret, TokenizationDecisioningRotateSecretResponse from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._resource import SyncAPIResource, AsyncAPIResource @@ -31,7 +33,7 @@ def retrieve_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> TokenizationSecret: """Retrieve the Tokenization Decisioning secret key. @@ -58,7 +60,7 @@ def rotate_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TokenizationDecisioningRotateSecretResponse: """Generate a new Tokenization Decisioning secret key. @@ -95,7 +97,7 @@ async def retrieve_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> TokenizationSecret: """Retrieve the Tokenization Decisioning secret key. @@ -122,7 +124,7 @@ async def rotate_secret( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TokenizationDecisioningRotateSecretResponse: """Generate a new Tokenization Decisioning secret key. diff --git a/src/lithic/resources/tokenizations.py b/src/lithic/resources/tokenizations.py index f185a2ef..7a4aa210 100644 --- a/src/lithic/resources/tokenizations.py +++ b/src/lithic/resources/tokenizations.py @@ -5,6 +5,8 @@ from typing import TYPE_CHECKING from typing_extensions import Literal +import httpx + from ..types import TokenizationSimulateResponse, tokenization_simulate_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform @@ -41,7 +43,7 @@ def simulate( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TokenizationSimulateResponse: """ @@ -123,7 +125,7 @@ async def simulate( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TokenizationSimulateResponse: """ diff --git a/src/lithic/resources/transactions.py b/src/lithic/resources/transactions.py index e633192f..c1d8e560 100644 --- a/src/lithic/resources/transactions.py +++ b/src/lithic/resources/transactions.py @@ -6,6 +6,8 @@ from datetime import datetime from typing_extensions import Literal +import httpx + from ..types import ( Transaction, TransactionSimulateVoidResponse, @@ -53,7 +55,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Transaction: """ Get specific card transaction. @@ -91,7 +93,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncCursorPage[Transaction]: """ List card transactions. @@ -175,7 +177,7 @@ def simulate_authorization( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateAuthorizationResponse: """ @@ -276,7 +278,7 @@ def simulate_authorization_advice( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateAuthorizationAdviceResponse: """ @@ -329,7 +331,7 @@ def simulate_clearing( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateClearingResponse: """Clears an existing authorization. @@ -393,7 +395,7 @@ def simulate_credit_authorization( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateCreditAuthorizationResponse: """Simulates a credit authorization advice message from the payment network. @@ -460,7 +462,7 @@ def simulate_return( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateReturnResponse: """Returns (aka refunds) an amount back to a card. @@ -514,7 +516,7 @@ def simulate_return_reversal( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateReturnReversalResponse: """ @@ -561,7 +563,7 @@ def simulate_void( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateVoidResponse: """Voids an existing, uncleared (aka pending) authorization. @@ -631,7 +633,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> Transaction: """ Get specific card transaction. @@ -669,7 +671,7 @@ def list( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Transaction, AsyncCursorPage[Transaction]]: """ List card transactions. @@ -753,7 +755,7 @@ async def simulate_authorization( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateAuthorizationResponse: """ @@ -854,7 +856,7 @@ async def simulate_authorization_advice( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateAuthorizationAdviceResponse: """ @@ -907,7 +909,7 @@ async def simulate_clearing( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateClearingResponse: """Clears an existing authorization. @@ -971,7 +973,7 @@ async def simulate_credit_authorization( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateCreditAuthorizationResponse: """Simulates a credit authorization advice message from the payment network. @@ -1038,7 +1040,7 @@ async def simulate_return( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateReturnResponse: """Returns (aka refunds) an amount back to a card. @@ -1092,7 +1094,7 @@ async def simulate_return_reversal( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateReturnReversalResponse: """ @@ -1139,7 +1141,7 @@ async def simulate_void( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> TransactionSimulateVoidResponse: """Voids an existing, uncleared (aka pending) authorization. From ac4058660e21d2a5248fb4f354854be495f533ee Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Tue, 7 Nov 2023 16:54:48 +0000 Subject: [PATCH 2/5] chore(internal): fix some typos (#236) --- src/lithic/_utils/_transform.py | 6 +++--- tests/api_resources/test_webhooks.py | 4 ++-- tests/test_extract_files.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lithic/_utils/_transform.py b/src/lithic/_utils/_transform.py index db40bff2..dc497ea3 100644 --- a/src/lithic/_utils/_transform.py +++ b/src/lithic/_utils/_transform.py @@ -95,7 +95,7 @@ class Params(TypedDict, total=False): return cast(_T, transformed) -def _get_annoted_type(type_: type) -> type | None: +def _get_annotated_type(type_: type) -> type | None: """If the given type is an `Annotated` type then it is returned, if not `None` is returned. This also unwraps the type when applicable, e.g. `Required[Annotated[T, ...]]` @@ -115,7 +115,7 @@ def _maybe_transform_key(key: str, type_: type) -> str: Note: this function only looks at `Annotated` types that contain `PropertInfo` metadata. """ - annotated_type = _get_annoted_type(type_) + annotated_type = _get_annotated_type(type_) if annotated_type is None: # no `Annotated` definition for this type, no transformation needed return key @@ -174,7 +174,7 @@ def _transform_recursive( def _transform_value(data: object, type_: type) -> object: - annotated_type = _get_annoted_type(type_) + annotated_type = _get_annotated_type(type_) if annotated_type is None: return data diff --git a/tests/api_resources/test_webhooks.py b/tests/api_resources/test_webhooks.py index 0d49df88..6752c2d7 100644 --- a/tests/api_resources/test_webhooks.py +++ b/tests/api_resources/test_webhooks.py @@ -83,7 +83,7 @@ def test_verify_signature(self) -> None: is None ) - # different signaature version + # different signature version with pytest.raises(ValueError, match=invalid_signature_message): verify( payload=payload, @@ -183,7 +183,7 @@ def test_verify_signature(self) -> None: is None ) - # different signaature version + # different signature version with pytest.raises(ValueError, match=invalid_signature_message): verify( payload=payload, diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py index ef968ef9..77b1fb75 100644 --- a/tests/test_extract_files.py +++ b/tests/test_extract_files.py @@ -54,7 +54,7 @@ def test_multiple_files() -> None: [], ], ], - ids=["dict expecting array", "arraye expecting dict", "unknown keys"], + ids=["dict expecting array", "array expecting dict", "unknown keys"], ) def test_ignores_incorrect_paths( query: dict[str, object], From d747b8c91d76843003394ccadca00f191fc19f81 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Tue, 7 Nov 2023 17:35:09 +0000 Subject: [PATCH 3/5] chore(docs): fix github links (#237) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b47ac325..f27e449e 100644 --- a/README.md +++ b/README.md @@ -326,7 +326,7 @@ card = response.parse() # get the object that `cards.create()` would have retur print(card.token) ``` -These methods return an [`APIResponse`](https://github.com/lithic-com/lithic-python/src/lithic/_response.py) object. +These methods return an [`APIResponse`](https://github.com/lithic-com/lithic-python/tree/main/src/lithic/_response.py) object. ### Configuring the HTTP client From 3e4efea1d64c2dd51e9884dc7fd270d851424d41 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:17:58 +0000 Subject: [PATCH 4/5] fix(api): correct type for other fees details (#238) --- src/lithic/types/payment.py | 4 ++++ src/lithic/types/payment_create_params.py | 4 ++++ src/lithic/types/settlement_detail.py | 8 ++++---- tests/api_resources/test_payments.py | 4 ++++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/lithic/types/payment.py b/src/lithic/types/payment.py index c12eebd2..67bb7f15 100644 --- a/src/lithic/types/payment.py +++ b/src/lithic/types/payment.py @@ -12,6 +12,10 @@ class PaymentMethodAttributes(BaseModel): sec_code: Literal["PPD", "CCD", "WEB"] + company_id: Optional[str] = None + + receipt_routing_number: Optional[str] = None + retries: Optional[int] = None return_reason_code: Optional[str] = None diff --git a/src/lithic/types/payment_create_params.py b/src/lithic/types/payment_create_params.py index 5f3877cc..d6568c8b 100644 --- a/src/lithic/types/payment_create_params.py +++ b/src/lithic/types/payment_create_params.py @@ -30,6 +30,10 @@ class PaymentCreateParams(TypedDict, total=False): class MethodAttributes(TypedDict, total=False): sec_code: Required[Literal["PPD", "CCD", "WEB"]] + company_id: str + + receipt_routing_number: str + retries: int return_reason_code: str diff --git a/src/lithic/types/settlement_detail.py b/src/lithic/types/settlement_detail.py index 4c3e5b8e..7e7864cd 100644 --- a/src/lithic/types/settlement_detail.py +++ b/src/lithic/types/settlement_detail.py @@ -4,15 +4,15 @@ from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["SettlementDetail", "OtherFeesDetails"] class OtherFeesDetails(BaseModel): - title: Optional[object] = None - - type: Optional[object] = None + isa: Optional[int] = FieldInfo(alias="ISA", default=None) class SettlementDetail(BaseModel): @@ -46,7 +46,7 @@ class SettlementDetail(BaseModel): disputes_gross_amount: int """The total gross amount of disputes settlements.""" - event_tokens: List[object] + event_tokens: List[str] """ Globally unique identifiers denoting the Events associated with this settlement. """ diff --git a/tests/api_resources/test_payments.py b/tests/api_resources/test_payments.py index 40a07784..75504a9e 100644 --- a/tests/api_resources/test_payments.py +++ b/tests/api_resources/test_payments.py @@ -50,6 +50,8 @@ def test_method_create_with_all_params(self, client: Lithic) -> None: "retries": 0, "return_reason_code": "string", "sec_code": "PPD", + "company_id": "string", + "receipt_routing_number": "string", }, type="PAYMENT", token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", @@ -197,6 +199,8 @@ async def test_method_create_with_all_params(self, client: AsyncLithic) -> None: "retries": 0, "return_reason_code": "string", "sec_code": "PPD", + "company_id": "string", + "receipt_routing_number": "string", }, type="PAYMENT", token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", From 5ec1fb9300871b795e362df0cbe97f4f72019994 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:18:22 +0000 Subject: [PATCH 5/5] release: 0.23.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ pyproject.toml | 2 +- src/lithic/_version.py | 2 +- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 79df23ff..7f3f5c84 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.22.2" + ".": "0.23.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a314e21c..c5ad16f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 0.23.0 (2023-11-08) + +Full Changelog: [v0.22.2...v0.23.0](https://github.com/lithic-com/lithic-python/compare/v0.22.2...v0.23.0) + +### Features + +* **client:** support passing httpx.Timeout to method timeout argument ([#234](https://github.com/lithic-com/lithic-python/issues/234)) ([d70cab3](https://github.com/lithic-com/lithic-python/commit/d70cab37a0ef4a4cb76bce9ceb27a0591de65044)) + + +### Bug Fixes + +* **api:** correct type for other fees details ([#238](https://github.com/lithic-com/lithic-python/issues/238)) ([3e4efea](https://github.com/lithic-com/lithic-python/commit/3e4efea1d64c2dd51e9884dc7fd270d851424d41)) + + +### Chores + +* **docs:** fix github links ([#237](https://github.com/lithic-com/lithic-python/issues/237)) ([d747b8c](https://github.com/lithic-com/lithic-python/commit/d747b8c91d76843003394ccadca00f191fc19f81)) +* **internal:** fix some typos ([#236](https://github.com/lithic-com/lithic-python/issues/236)) ([ac40586](https://github.com/lithic-com/lithic-python/commit/ac4058660e21d2a5248fb4f354854be495f533ee)) + ## 0.22.2 (2023-11-06) Full Changelog: [v0.22.1...v0.22.2](https://github.com/lithic-com/lithic-python/compare/v0.22.1...v0.22.2) diff --git a/pyproject.toml b/pyproject.toml index e8bbfa48..1b4feaff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "lithic" -version = "0.22.2" +version = "0.23.0" description = "Client library for the lithic API" readme = "README.md" license = "Apache-2.0" diff --git a/src/lithic/_version.py b/src/lithic/_version.py index 18497979..8665294d 100644 --- a/src/lithic/_version.py +++ b/src/lithic/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. __title__ = "lithic" -__version__ = "0.22.2" # x-release-please-version +__version__ = "0.23.0" # x-release-please-version