Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.428.0"
".": "0.429.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 236
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f46fe8b546ee1a4ad24918ef0803f48e6586e061d5445ae1aeb6abc7b8cf64a3.yml
openapi_spec_hash: 440b743a615d5ecc832affd6c3154809
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4699565aad7b519933c0f8789762574139b2ca7ad57c008b747eebe6a3f91eec.yml
openapi_spec_hash: 3c7cf6b8f8d59763cbdac549682f61c3
config_hash: dda988c5565c2f15cc708122984d7691
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.429.0 (2026-03-10)

Full Changelog: [v0.428.0...v0.429.0](https://github.com/Increase/increase-python/compare/v0.428.0...v0.429.0)

### Features

* **api:** api update ([951c5a2](https://github.com/Increase/increase-python/commit/951c5a29464b99b351e4ae8a4d629173a7b2c7cc))

## 0.428.0 (2026-03-10)

Full Changelog: [v0.427.0...v0.428.0](https://github.com/Increase/increase-python/compare/v0.427.0...v0.428.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "increase"
version = "0.428.0"
version = "0.429.0"
description = "The official Python library for the increase API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/increase/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "increase"
__version__ = "0.428.0" # x-release-please-version
__version__ = "0.429.0" # x-release-please-version
8 changes: 8 additions & 0 deletions src/increase/resources/simulations/card_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def create(
capabilities: Iterable[card_token_create_params.Capability] | Omit = omit,
expiration: Union[str, date] | Omit = omit,
last4: str | Omit = omit,
outcome: card_token_create_params.Outcome | Omit = omit,
prefix: str | Omit = omit,
primary_account_number_length: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -70,6 +71,8 @@ def create(

last4: The last 4 digits of the card number.

outcome: The outcome to simulate for card push transfers using this token.

prefix: The prefix of the card number, usually the first 8 digits.

primary_account_number_length: The total length of the card number, including prefix and last4.
Expand All @@ -91,6 +94,7 @@ def create(
"capabilities": capabilities,
"expiration": expiration,
"last4": last4,
"outcome": outcome,
"prefix": prefix,
"primary_account_number_length": primary_account_number_length,
},
Expand Down Expand Up @@ -133,6 +137,7 @@ async def create(
capabilities: Iterable[card_token_create_params.Capability] | Omit = omit,
expiration: Union[str, date] | Omit = omit,
last4: str | Omit = omit,
outcome: card_token_create_params.Outcome | Omit = omit,
prefix: str | Omit = omit,
primary_account_number_length: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -153,6 +158,8 @@ async def create(

last4: The last 4 digits of the card number.

outcome: The outcome to simulate for card push transfers using this token.

prefix: The prefix of the card number, usually the first 8 digits.

primary_account_number_length: The total length of the card number, including prefix and last4.
Expand All @@ -174,6 +181,7 @@ async def create(
"capabilities": capabilities,
"expiration": expiration,
"last4": last4,
"outcome": outcome,
"prefix": prefix,
"primary_account_number_length": primary_account_number_length,
},
Expand Down
144 changes: 143 additions & 1 deletion src/increase/types/simulations/card_token_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from ..._utils import PropertyInfo

__all__ = ["CardTokenCreateParams", "Capability"]
__all__ = ["CardTokenCreateParams", "Capability", "Outcome", "OutcomeDecline"]


class CardTokenCreateParams(TypedDict, total=False):
Expand All @@ -21,6 +21,9 @@ class CardTokenCreateParams(TypedDict, total=False):
last4: str
"""The last 4 digits of the card number."""

outcome: Outcome
"""The outcome to simulate for card push transfers using this token."""

prefix: str
"""The prefix of the card number, usually the first 8 digits."""

Expand Down Expand Up @@ -49,3 +52,142 @@ class Capability(TypedDict, total=False):
- `visa` - Visa and Interlink
- `mastercard` - Mastercard and Maestro
"""


class OutcomeDecline(TypedDict, total=False):
"""If the result is declined, the details of the decline."""

reason: Literal[
"do_not_honor",
"activity_count_limit_exceeded",
"refer_to_card_issuer",
"refer_to_card_issuer_special_condition",
"invalid_merchant",
"pick_up_card",
"error",
"pick_up_card_special",
"invalid_transaction",
"invalid_amount",
"invalid_account_number",
"no_such_issuer",
"re_enter_transaction",
"no_credit_account",
"pick_up_card_lost",
"pick_up_card_stolen",
"closed_account",
"insufficient_funds",
"no_checking_account",
"no_savings_account",
"expired_card",
"transaction_not_permitted_to_cardholder",
"transaction_not_allowed_at_terminal",
"suspected_fraud",
"activity_amount_limit_exceeded",
"restricted_card",
"security_violation",
"transaction_does_not_fulfill_anti_money_laundering_requirement",
"blocked_first_use",
"credit_issuer_unavailable",
"negative_card_verification_value_results",
"issuer_unavailable",
"financial_institution_cannot_be_found",
"transaction_cannot_be_completed",
"duplicate_transaction",
"system_malfunction",
"additional_customer_authentication_required",
"surcharge_amount_not_permitted",
"decline_for_cvv2_failure",
"stop_payment_order",
"revocation_of_authorization_order",
"revocation_of_all_authorizations_order",
]
"""The reason for the decline.

- `do_not_honor` - The card issuer has declined the transaction without
providing a specific reason.
- `activity_count_limit_exceeded` - The number of transactions for the card has
exceeded the limit set by the issuer.
- `refer_to_card_issuer` - The card issuer requires the cardholder to contact
them for further information regarding the transaction.
- `refer_to_card_issuer_special_condition` - The card issuer requires the
cardholder to contact them due to a special condition related to the
transaction.
- `invalid_merchant` - The merchant is not valid for this transaction.
- `pick_up_card` - The card should be retained by the terminal.
- `error` - An error occurred during processing of the transaction.
- `pick_up_card_special` - The card should be retained by the terminal due to a
special condition.
- `invalid_transaction` - The transaction is invalid and cannot be processed.
- `invalid_amount` - The amount of the transaction is invalid.
- `invalid_account_number` - The account number provided is invalid.
- `no_such_issuer` - The issuer of the card could not be found.
- `re_enter_transaction` - The transaction should be re-entered for processing.
- `no_credit_account` - There is no credit account associated with the card.
- `pick_up_card_lost` - The card should be retained by the terminal because it
has been reported lost.
- `pick_up_card_stolen` - The card should be retained by the terminal because it
has been reported stolen.
- `closed_account` - The account associated with the card has been closed.
- `insufficient_funds` - There are insufficient funds in the account to complete
the transaction.
- `no_checking_account` - There is no checking account associated with the card.
- `no_savings_account` - There is no savings account associated with the card.
- `expired_card` - The card has expired and cannot be used for transactions.
- `transaction_not_permitted_to_cardholder` - The transaction is not permitted
for this cardholder.
- `transaction_not_allowed_at_terminal` - The transaction is not allowed at this
terminal.
- `suspected_fraud` - The transaction has been flagged as suspected fraud and
cannot be processed.
- `activity_amount_limit_exceeded` - The amount of activity on the card has
exceeded the limit set by the issuer.
- `restricted_card` - The card has restrictions that prevent it from being used
for this transaction.
- `security_violation` - A security violation has occurred, preventing the
transaction from being processed.
- `transaction_does_not_fulfill_anti_money_laundering_requirement` - The
transaction does not meet the anti-money laundering requirements set by the
issuer.
- `blocked_first_use` - The first use of the card has been blocked by the
issuer.
- `credit_issuer_unavailable` - The credit issuer is currently unavailable to
process the transaction.
- `negative_card_verification_value_results` - The card verification value (CVV)
results were negative, indicating a potential issue with the card.
- `issuer_unavailable` - The issuer of the card is currently unavailable to
process the transaction.
- `financial_institution_cannot_be_found` - The financial institution associated
with the card could not be found.
- `transaction_cannot_be_completed` - The transaction cannot be completed due to
an unspecified reason.
- `duplicate_transaction` - The transaction is a duplicate of a previous
transaction and cannot be processed again.
- `system_malfunction` - A system malfunction occurred, preventing the
transaction from being processed.
- `additional_customer_authentication_required` - Additional customer
authentication is required to complete the transaction.
- `surcharge_amount_not_permitted` - The surcharge amount applied to the
transaction is not permitted by the issuer.
- `decline_for_cvv2_failure` - The transaction was declined due to a failure in
verifying the CVV2 code.
- `stop_payment_order` - A stop payment order has been placed on this
transaction.
- `revocation_of_authorization_order` - An order has been placed to revoke
authorization for this transaction.
- `revocation_of_all_authorizations_order` - An order has been placed to revoke
all authorizations for this cardholder.
"""


class Outcome(TypedDict, total=False):
"""The outcome to simulate for card push transfers using this token."""

result: Required[Literal["approve", "decline"]]
"""Whether card push transfers or validations will be approved or declined.

- `approve` - Any card push transfers or validations will be approved.
- `decline` - Any card push transfers or validations will be declined.
"""

decline: OutcomeDecline
"""If the result is declined, the details of the decline."""
8 changes: 8 additions & 0 deletions tests/api_resources/simulations/test_card_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None:
],
expiration=parse_date("2019-12-27"),
last4="1234",
outcome={
"result": "approve",
"decline": {"reason": "do_not_honor"},
},
prefix="41234567",
primary_account_number_length=16,
)
Expand Down Expand Up @@ -83,6 +87,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease)
],
expiration=parse_date("2019-12-27"),
last4="1234",
outcome={
"result": "approve",
"decline": {"reason": "do_not_honor"},
},
prefix="41234567",
primary_account_number_length=16,
)
Expand Down