From 612a9506aa13378bb23bc6689bb44b18b8053b3f Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Mon, 19 Feb 2024 17:43:09 -0500 Subject: [PATCH] feat(api): update financial_account_type and documentation (#363) --- src/lithic/resources/aggregate_balances.py | 4 +-- src/lithic/resources/balances.py | 4 +-- src/lithic/resources/cards/cards.py | 32 ++++++++++++------- .../financial_accounts/financial_accounts.py | 4 +-- src/lithic/types/aggregate_balance.py | 2 +- .../types/aggregate_balance_list_params.py | 2 +- src/lithic/types/balance.py | 2 +- src/lithic/types/balance_list_params.py | 2 +- src/lithic/types/card.py | 8 +++-- src/lithic/types/card_create_params.py | 8 +++-- src/lithic/types/card_update_params.py | 8 +++-- src/lithic/types/financial_account.py | 2 +- .../types/financial_account_list_params.py | 2 +- src/lithic/types/settlement_detail.py | 10 +++--- 14 files changed, 52 insertions(+), 38 deletions(-) diff --git a/src/lithic/resources/aggregate_balances.py b/src/lithic/resources/aggregate_balances.py index 07920f5e..502542ca 100644 --- a/src/lithic/resources/aggregate_balances.py +++ b/src/lithic/resources/aggregate_balances.py @@ -34,7 +34,7 @@ def with_streaming_response(self) -> AggregateBalancesWithStreamingResponse: def list( self, *, - financial_account_type: Literal["ISSUING", "RESERVE"] | NotGiven = NOT_GIVEN, + financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -86,7 +86,7 @@ def with_streaming_response(self) -> AsyncAggregateBalancesWithStreamingResponse def list( self, *, - financial_account_type: Literal["ISSUING", "RESERVE"] | NotGiven = NOT_GIVEN, + financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/lithic/resources/balances.py b/src/lithic/resources/balances.py index 9b876c90..ff18ab1c 100644 --- a/src/lithic/resources/balances.py +++ b/src/lithic/resources/balances.py @@ -38,7 +38,7 @@ def list( *, account_token: str | NotGiven = NOT_GIVEN, balance_date: Union[str, datetime] | NotGiven = NOT_GIVEN, - financial_account_type: Literal["ISSUING", "RESERVE"] | NotGiven = NOT_GIVEN, + financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -100,7 +100,7 @@ def list( *, account_token: str | NotGiven = NOT_GIVEN, balance_date: Union[str, datetime] | NotGiven = NOT_GIVEN, - financial_account_type: Literal["ISSUING", "RESERVE"] | NotGiven = NOT_GIVEN, + financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/lithic/resources/cards/cards.py b/src/lithic/resources/cards/cards.py index 1a5d7349..d2c1234b 100644 --- a/src/lithic/resources/cards/cards.py +++ b/src/lithic/resources/cards/cards.py @@ -196,12 +196,14 @@ def create( spend_limit_duration: Spend limit duration values: - - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar - year. + - `ANNUALLY` - Card will authorize transactions up to spend limit for the + trailing year. - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card. - `MONTHLY` - Card will authorize transactions up to spend limit for the - trailing month. Month is calculated as this calendar date one month prior. + trailing month. To support recurring monthly payments, which can occur on + different day every month, the time window we consider for monthly velocity + starts 6 days after the current calendar date one month prior. - `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit. @@ -334,12 +336,14 @@ def update( spend_limit_duration: Spend limit duration values: - - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar - year. + - `ANNUALLY` - Card will authorize transactions up to spend limit for the + trailing year. - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card. - `MONTHLY` - Card will authorize transactions up to spend limit for the - trailing month. Month is calculated as this calendar date one month prior. + trailing month. To support recurring monthly payments, which can occur on + different day every month, the time window we consider for monthly velocity + starts 6 days after the current calendar date one month prior. - `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit. @@ -1056,12 +1060,14 @@ async def create( spend_limit_duration: Spend limit duration values: - - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar - year. + - `ANNUALLY` - Card will authorize transactions up to spend limit for the + trailing year. - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card. - `MONTHLY` - Card will authorize transactions up to spend limit for the - trailing month. Month is calculated as this calendar date one month prior. + trailing month. To support recurring monthly payments, which can occur on + different day every month, the time window we consider for monthly velocity + starts 6 days after the current calendar date one month prior. - `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit. @@ -1194,12 +1200,14 @@ async def update( spend_limit_duration: Spend limit duration values: - - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar - year. + - `ANNUALLY` - Card will authorize transactions up to spend limit for the + trailing year. - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card. - `MONTHLY` - Card will authorize transactions up to spend limit for the - trailing month. Month is calculated as this calendar date one month prior. + trailing month. To support recurring monthly payments, which can occur on + different day every month, the time window we consider for monthly velocity + starts 6 days after the current calendar date one month prior. - `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit. diff --git a/src/lithic/resources/financial_accounts/financial_accounts.py b/src/lithic/resources/financial_accounts/financial_accounts.py index a8d80684..3b0d35af 100644 --- a/src/lithic/resources/financial_accounts/financial_accounts.py +++ b/src/lithic/resources/financial_accounts/financial_accounts.py @@ -145,7 +145,7 @@ def list( *, account_token: str | NotGiven = NOT_GIVEN, business_account_token: str | NotGiven = NOT_GIVEN, - type: Literal["ISSUING", "RESERVE", "OPERATING"] | NotGiven = NOT_GIVEN, + type: Literal["ISSUING", "OPERATING", "RESERVE"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -291,7 +291,7 @@ def list( *, account_token: str | NotGiven = NOT_GIVEN, business_account_token: str | NotGiven = NOT_GIVEN, - type: Literal["ISSUING", "RESERVE", "OPERATING"] | NotGiven = NOT_GIVEN, + type: Literal["ISSUING", "OPERATING", "RESERVE"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/lithic/types/aggregate_balance.py b/src/lithic/types/aggregate_balance.py index e630bf3b..32829ace 100644 --- a/src/lithic/types/aggregate_balance.py +++ b/src/lithic/types/aggregate_balance.py @@ -18,7 +18,7 @@ class AggregateBalance(BaseModel): currency: str """3-digit alphabetic ISO 4217 code for the local currency of the balance.""" - financial_account_type: Literal["ISSUING", "RESERVE", "OPERATING"] + financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE"] """Type of financial account""" last_financial_account_token: str diff --git a/src/lithic/types/aggregate_balance_list_params.py b/src/lithic/types/aggregate_balance_list_params.py index a078dd76..c093df18 100644 --- a/src/lithic/types/aggregate_balance_list_params.py +++ b/src/lithic/types/aggregate_balance_list_params.py @@ -8,5 +8,5 @@ class AggregateBalanceListParams(TypedDict, total=False): - financial_account_type: Literal["ISSUING", "RESERVE"] + financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE"] """Get the aggregate balance for a given Financial Account type.""" diff --git a/src/lithic/types/balance.py b/src/lithic/types/balance.py index d8790fbd..edc571e1 100644 --- a/src/lithic/types/balance.py +++ b/src/lithic/types/balance.py @@ -21,7 +21,7 @@ class Balance(BaseModel): financial_account_token: str """Globally unique identifier for the financial account that holds this balance.""" - financial_account_type: Literal["ISSUING", "RESERVE", "OPERATING"] + financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE"] """Type of financial account.""" last_transaction_event_token: str diff --git a/src/lithic/types/balance_list_params.py b/src/lithic/types/balance_list_params.py index 67d842a8..94a52f3a 100644 --- a/src/lithic/types/balance_list_params.py +++ b/src/lithic/types/balance_list_params.py @@ -21,5 +21,5 @@ class BalanceListParams(TypedDict, total=False): Defaults to latest available balances """ - financial_account_type: Literal["ISSUING", "RESERVE"] + financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE"] """List balances for a given Financial Account type.""" diff --git a/src/lithic/types/card.py b/src/lithic/types/card.py index 44b51677..65a45b61 100644 --- a/src/lithic/types/card.py +++ b/src/lithic/types/card.py @@ -79,12 +79,14 @@ class Card(BaseModel): spend_limit_duration: SpendLimitDuration """Spend limit duration values: - - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar - year. + - `ANNUALLY` - Card will authorize transactions up to spend limit for the + trailing year. - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card. - `MONTHLY` - Card will authorize transactions up to spend limit for the - trailing month. Month is calculated as this calendar date one month prior. + trailing month. To support recurring monthly payments, which can occur on + different day every month, the time window we consider for monthly velocity + starts 6 days after the current calendar date one month prior. - `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit. """ diff --git a/src/lithic/types/card_create_params.py b/src/lithic/types/card_create_params.py index d7fcf660..02ff4c76 100644 --- a/src/lithic/types/card_create_params.py +++ b/src/lithic/types/card_create_params.py @@ -127,12 +127,14 @@ class CardCreateParams(TypedDict, total=False): spend_limit_duration: SpendLimitDuration """Spend limit duration values: - - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar - year. + - `ANNUALLY` - Card will authorize transactions up to spend limit for the + trailing year. - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card. - `MONTHLY` - Card will authorize transactions up to spend limit for the - trailing month. Month is calculated as this calendar date one month prior. + trailing month. To support recurring monthly payments, which can occur on + different day every month, the time window we consider for monthly velocity + starts 6 days after the current calendar date one month prior. - `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit. """ diff --git a/src/lithic/types/card_update_params.py b/src/lithic/types/card_update_params.py index bf9b7788..e5d52a7c 100644 --- a/src/lithic/types/card_update_params.py +++ b/src/lithic/types/card_update_params.py @@ -50,12 +50,14 @@ class CardUpdateParams(TypedDict, total=False): spend_limit_duration: SpendLimitDuration """Spend limit duration values: - - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar - year. + - `ANNUALLY` - Card will authorize transactions up to spend limit for the + trailing year. - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card. - `MONTHLY` - Card will authorize transactions up to spend limit for the - trailing month. Month is calculated as this calendar date one month prior. + trailing month. To support recurring monthly payments, which can occur on + different day every month, the time window we consider for monthly velocity + starts 6 days after the current calendar date one month prior. - `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is under the spend limit. """ diff --git a/src/lithic/types/financial_account.py b/src/lithic/types/financial_account.py index 5b1456b5..9c5cee34 100644 --- a/src/lithic/types/financial_account.py +++ b/src/lithic/types/financial_account.py @@ -16,7 +16,7 @@ class FinancialAccount(BaseModel): created: datetime """Date and time for when the financial account was first created.""" - type: Literal["ISSUING", "RESERVE", "OPERATING"] + type: Literal["ISSUING", "OPERATING", "RESERVE"] """Type of financial account""" updated: datetime diff --git a/src/lithic/types/financial_account_list_params.py b/src/lithic/types/financial_account_list_params.py index 5f5376a6..86cb0d10 100644 --- a/src/lithic/types/financial_account_list_params.py +++ b/src/lithic/types/financial_account_list_params.py @@ -14,5 +14,5 @@ class FinancialAccountListParams(TypedDict, total=False): business_account_token: str """List financial accounts for a given business_account_token""" - type: Literal["ISSUING", "RESERVE", "OPERATING"] + type: Literal["ISSUING", "OPERATING", "RESERVE"] """List financial accounts of a given type""" diff --git a/src/lithic/types/settlement_detail.py b/src/lithic/types/settlement_detail.py index 0c9555b2..d1ec8ce1 100644 --- a/src/lithic/types/settlement_detail.py +++ b/src/lithic/types/settlement_detail.py @@ -88,15 +88,15 @@ class SettlementDetail(BaseModel): """ type: Literal[ + "ADJUSTMENT", + "ARBITRATION", + "CHARGEBACK", "CLEARING", + "FEE", "FINANCIAL", "NON-FINANCIAL", - "ADJUSTMENT", - "CHARGEBACK", - "REPRESENTMENT", "PREARBITRATION", - "ARBITRATION", - "FEE", + "REPRESENTMENT", ] """The type of settlement record."""