diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f32bafea..fcf5daf7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.160.0" + ".": "0.161.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index e6f6388b..ffcfc72d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-20b5808422396f14819d54eb4e784f9cb93645d7bddbc3129e8fcf0b39e377b7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3a8cddc4ecee394a7253767a8c87cf9f8a188ac4912ed2646bb2e17f6e75c967.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index bdc43c82..6a920781 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.161.0 (2024-11-13) + +Full Changelog: [v0.160.0...v0.161.0](https://github.com/Increase/increase-python/compare/v0.160.0...v0.161.0) + +### Features + +* **api:** api update ([#829](https://github.com/Increase/increase-python/issues/829)) ([25b1e0e](https://github.com/Increase/increase-python/commit/25b1e0e9891df0d6f45e947c9e3ddf9b90c2d8e6)) + ## 0.160.0 (2024-11-13) Full Changelog: [v0.159.0...v0.160.0](https://github.com/Increase/increase-python/compare/v0.159.0...v0.160.0) diff --git a/pyproject.toml b/pyproject.toml index 99040f41..e6cb027e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.160.0" +version = "0.161.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 277448c4..ace8180d 100644 --- a/src/increase/_version.py +++ b/src/increase/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "increase" -__version__ = "0.160.0" # x-release-please-version +__version__ = "0.161.0" # x-release-please-version diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index a1cb1504..832f8d25 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -81,6 +81,32 @@ class CardAuthorization(TypedDict, total=False): - `decline` - Decline the authorization. """ + decline_reason: Literal[ + "insufficient_funds", + "transaction_never_allowed", + "exceeds_approval_limit", + "card_temporarily_disabled", + "suspected_fraud", + "other", + ] + """The reason the card authorization was declined. + + This translates to a specific decline code that is sent to the card network. + + - `insufficient_funds` - The cardholder does not have sufficient funds to cover + the transaction. The merchant may attempt to process the transaction again. + - `transaction_never_allowed` - This type of transaction is not allowed for this + card. This transaction should not be retried. + - `exceeds_approval_limit` - The transaction amount exceeds the cardholder's + approval limit. The merchant may attempt to process the transaction again. + - `card_temporarily_disabled` - The card has been temporarily disabled or not + yet activated. The merchant may attempt to process the transaction again. + - `suspected_fraud` - The transaction is suspected to be fraudulent. The + merchant may attempt to process the transaction again. + - `other` - The transaction was declined for another reason. The merchant may + attempt to process the transaction again. This should be used sparingly. + """ + class DigitalWalletAuthenticationSuccess(TypedDict, total=False): email: str diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index f90f43f1..d49e4331 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -68,7 +68,10 @@ def test_method_action_with_all_params(self, client: Increase) -> None: real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", card_authentication={"decision": "approve"}, card_authentication_challenge={"result": "success"}, - card_authorization={"decision": "approve"}, + card_authorization={ + "decision": "approve", + "decline_reason": "insufficient_funds", + }, digital_wallet_authentication={ "result": "success", "success": { @@ -172,7 +175,10 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", card_authentication={"decision": "approve"}, card_authentication_challenge={"result": "success"}, - card_authorization={"decision": "approve"}, + card_authorization={ + "decision": "approve", + "decline_reason": "insufficient_funds", + }, digital_wallet_authentication={ "result": "success", "success": {