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.190.0"
".": "0.191.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 201
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5e0974f81d8dea4e99659c75d479605f1661bcd04e3c22722f451bba180b308a.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b3b6572700500a421109ac83ef56b3046e9f1510ca7d1f583d329d1b8ecf5516.yml
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.191.0 (2025-02-12)

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

### Features

* **api:** api update ([#967](https://github.com/Increase/increase-python/issues/967)) ([d451149](https://github.com/Increase/increase-python/commit/d451149b25fbc96abe741b37fa53660e2580d0d3))


### Chores

* **internal:** update client tests ([#965](https://github.com/Increase/increase-python/issues/965)) ([90021f2](https://github.com/Increase/increase-python/commit/90021f217d112066dc15d0291ba9d6e300de2cf3))

## 0.190.0 (2025-02-11)

Full Changelog: [v0.189.0...v0.190.0](https://github.com/Increase/increase-python/compare/v0.189.0...v0.190.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.190.0"
version = "0.191.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.190.0" # x-release-please-version
__version__ = "0.191.0" # x-release-please-version
8 changes: 8 additions & 0 deletions src/increase/resources/simulations/card_authorizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def create(
merchant_country: str | NotGiven = NOT_GIVEN,
merchant_descriptor: str | NotGiven = NOT_GIVEN,
merchant_state: str | NotGiven = NOT_GIVEN,
network_details: card_authorization_create_params.NetworkDetails | NotGiven = NOT_GIVEN,
physical_card_id: str | NotGiven = NOT_GIVEN,
terminal_id: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -162,6 +163,8 @@ def create(

merchant_state: The state the merchant resides in.

network_details: Fields specific to a given card network.

physical_card_id: The identifier of the Physical Card to be authorized.

terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card
Expand Down Expand Up @@ -194,6 +197,7 @@ def create(
"merchant_country": merchant_country,
"merchant_descriptor": merchant_descriptor,
"merchant_state": merchant_state,
"network_details": network_details,
"physical_card_id": physical_card_id,
"terminal_id": terminal_id,
},
Expand Down Expand Up @@ -263,6 +267,7 @@ async def create(
merchant_country: str | NotGiven = NOT_GIVEN,
merchant_descriptor: str | NotGiven = NOT_GIVEN,
merchant_state: str | NotGiven = NOT_GIVEN,
network_details: card_authorization_create_params.NetworkDetails | NotGiven = NOT_GIVEN,
physical_card_id: str | NotGiven = NOT_GIVEN,
terminal_id: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -346,6 +351,8 @@ async def create(

merchant_state: The state the merchant resides in.

network_details: Fields specific to a given card network.

physical_card_id: The identifier of the Physical Card to be authorized.

terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card
Expand Down Expand Up @@ -378,6 +385,7 @@ async def create(
"merchant_country": merchant_country,
"merchant_descriptor": merchant_descriptor,
"merchant_state": merchant_state,
"network_details": network_details,
"physical_card_id": physical_card_id,
"terminal_id": terminal_id,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from typing_extensions import Literal, Required, TypedDict

__all__ = ["CardAuthorizationCreateParams"]
__all__ = ["CardAuthorizationCreateParams", "NetworkDetails", "NetworkDetailsVisa"]


class CardAuthorizationCreateParams(TypedDict, total=False):
Expand Down Expand Up @@ -111,6 +111,9 @@ class CardAuthorizationCreateParams(TypedDict, total=False):
merchant_state: str
"""The state the merchant resides in."""

network_details: NetworkDetails
"""Fields specific to a given card network."""

physical_card_id: str
"""The identifier of the Physical Card to be authorized."""

Expand All @@ -119,3 +122,40 @@ class CardAuthorizationCreateParams(TypedDict, total=False):
The terminal identifier (commonly abbreviated as TID) of the terminal the card
is transacting with.
"""


class NetworkDetailsVisa(TypedDict, total=False):
stand_in_processing_reason: Literal[
"issuer_error",
"invalid_physical_card",
"invalid_cardholder_authentication_verification_value",
"internal_visa_error",
"merchant_transaction_advisory_service_authentication_required",
"payment_fraud_disruption_acquirer_block",
"other",
]
"""The reason code for the stand-in processing.

- `issuer_error` - Increase failed to process the authorization in a timely
manner.
- `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or
authorization request cryptogram.
- `invalid_cardholder_authentication_verification_value` - The 3DS cardholder
authentication verification value was invalid.
- `internal_visa_error` - An internal Visa error occurred. Visa uses this reason
code for certain expected occurrences as well, such as Application Transaction
Counter (ATC) replays.
- `merchant_transaction_advisory_service_authentication_required` - The merchant
has enabled Visa's Transaction Advisory Service and requires further
authentication to perform the transaction. In practice this is often utilized
at fuel pumps to tell the cardholder to see the cashier.
- `payment_fraud_disruption_acquirer_block` - The transaction was blocked by
Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior,
such as card testing.
- `other` - An unspecific reason for stand-in processing.
"""


class NetworkDetails(TypedDict, total=False):
visa: Required[NetworkDetailsVisa]
"""Fields specific to the Visa network."""
2 changes: 2 additions & 0 deletions tests/api_resources/simulations/test_card_authorizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None:
merchant_country="US",
merchant_descriptor="AMAZON.COM",
merchant_state="NY",
network_details={"visa": {"stand_in_processing_reason": "issuer_error"}},
physical_card_id="physical_card_id",
terminal_id="x",
)
Expand Down Expand Up @@ -96,6 +97,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease)
merchant_country="US",
merchant_descriptor="AMAZON.COM",
merchant_state="NY",
network_details={"visa": {"stand_in_processing_reason": "issuer_error"}},
physical_card_id="physical_card_id",
terminal_id="x",
)
Expand Down
46 changes: 30 additions & 16 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

from increase import Increase, AsyncIncrease, APIResponseValidationError
from increase._types import Omit
from increase._utils import maybe_transform
from increase._models import BaseModel, FinalRequestOptions
from increase._constants import RAW_RESPONSE_HEADER
from increase._exceptions import IncreaseError, APIStatusError, APITimeoutError, APIResponseValidationError
Expand All @@ -32,6 +33,7 @@
BaseClient,
make_request_options,
)
from increase.types.account_create_params import AccountCreateParams

from .utils import update_env

Expand Down Expand Up @@ -760,10 +762,13 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
"/accounts",
body=cast(
object,
dict(
name="New Account!",
entity_id="entity_n8y8tnk2p9339ti393yi",
program_id="program_i2v2os4mwza1oetokh9i",
maybe_transform(
dict(
name="New Account!",
entity_id="entity_n8y8tnk2p9339ti393yi",
program_id="program_i2v2os4mwza1oetokh9i",
),
AccountCreateParams,
),
),
cast_to=httpx.Response,
Expand All @@ -782,10 +787,13 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non
"/accounts",
body=cast(
object,
dict(
name="New Account!",
entity_id="entity_n8y8tnk2p9339ti393yi",
program_id="program_i2v2os4mwza1oetokh9i",
maybe_transform(
dict(
name="New Account!",
entity_id="entity_n8y8tnk2p9339ti393yi",
program_id="program_i2v2os4mwza1oetokh9i",
),
AccountCreateParams,
),
),
cast_to=httpx.Response,
Expand Down Expand Up @@ -1595,10 +1603,13 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
"/accounts",
body=cast(
object,
dict(
name="New Account!",
entity_id="entity_n8y8tnk2p9339ti393yi",
program_id="program_i2v2os4mwza1oetokh9i",
maybe_transform(
dict(
name="New Account!",
entity_id="entity_n8y8tnk2p9339ti393yi",
program_id="program_i2v2os4mwza1oetokh9i",
),
AccountCreateParams,
),
),
cast_to=httpx.Response,
Expand All @@ -1617,10 +1628,13 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter)
"/accounts",
body=cast(
object,
dict(
name="New Account!",
entity_id="entity_n8y8tnk2p9339ti393yi",
program_id="program_i2v2os4mwza1oetokh9i",
maybe_transform(
dict(
name="New Account!",
entity_id="entity_n8y8tnk2p9339ti393yi",
program_id="program_i2v2os4mwza1oetokh9i",
),
AccountCreateParams,
),
),
cast_to=httpx.Response,
Expand Down