From a03616d1719be5e408433ec751cd7d3aba5aa291 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 19 Sep 2025 17:42:15 +0000
Subject: [PATCH 1/3] chore: do not install brew dependencies in
./scripts/bootstrap by default
---
scripts/bootstrap | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/scripts/bootstrap b/scripts/bootstrap
index e84fe62c3..b430fee36 100755
--- a/scripts/bootstrap
+++ b/scripts/bootstrap
@@ -4,10 +4,18 @@ set -e
cd "$(dirname "$0")/.."
-if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
+if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
brew bundle check >/dev/null 2>&1 || {
- echo "==> Installing Homebrew dependencies…"
- brew bundle
+ echo -n "==> Install Homebrew dependencies? (y/N): "
+ read -r response
+ case "$response" in
+ [yY][eE][sS]|[yY])
+ brew bundle
+ ;;
+ *)
+ ;;
+ esac
+ echo
}
fi
From 30dbad15f8b552e52e70c3b75a619f121abe89ff Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 19 Sep 2025 20:17:22 +0000
Subject: [PATCH 2/3] feat(api): api update
---
.stats.yml | 8 +-
api.md | 20 +-
src/increase/_client.py | 9 +
src/increase/resources/__init__.py | 14 +
src/increase/resources/card_details.py | 392 ++++++++++++++++++
src/increase/resources/cards.py | 210 +---------
.../resources/simulations/physical_cards.py | 216 +++++-----
src/increase/types/__init__.py | 5 +-
...rd_detail_create_details_iframe_params.py} | 4 +-
.../types/card_detail_update_params.py | 12 +
src/increase/types/card_update_params.py | 3 +
src/increase/types/simulations/__init__.py | 4 +-
...rams.py => physical_card_create_params.py} | 4 +-
.../simulations/test_physical_cards.py | 144 +++----
tests/api_resources/test_card_details.py | 279 +++++++++++++
tests/api_resources/test_cards.py | 176 +-------
16 files changed, 930 insertions(+), 570 deletions(-)
create mode 100644 src/increase/resources/card_details.py
rename src/increase/types/{card_create_details_iframe_params.py => card_detail_create_details_iframe_params.py} (69%)
create mode 100644 src/increase/types/card_detail_update_params.py
rename src/increase/types/simulations/{physical_card_tracking_updates_params.py => physical_card_create_params.py} (91%)
create mode 100644 tests/api_resources/test_card_details.py
diff --git a/.stats.yml b/.stats.yml
index d5dac36dd..876bf2616 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 213
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8d71e78a4afd7e1ce2436bf2428777d623f468bb3b6c37c36ed8ed3155fe6c77.yml
-openapi_spec_hash: 3064d7c7468a53e4797ef16b648fd06d
-config_hash: e1e8bc2138a13f290956ae6687f099cd
+configured_endpoints: 214
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6241d4f5ad4269845e96fe2c674d19f586894ca27456095fee5a70dede9ea19c.yml
+openapi_spec_hash: 81e8f749b8ca89085b599b2c346a773d
+config_hash: 8dadd60eab7ab858cf06c6a8633ed9f3
diff --git a/api.md b/api.md
index a47477046..9df83d18c 100644
--- a/api.md
+++ b/api.md
@@ -51,7 +51,7 @@ Methods:
Types:
```python
-from increase.types import Card, CardDetails, CardIframeURL
+from increase.types import Card
```
Methods:
@@ -60,8 +60,20 @@ Methods:
- client.cards.retrieve(card_id) -> Card
- client.cards.update(card_id, \*\*params) -> Card
- client.cards.list(\*\*params) -> SyncPage[Card]
-- client.cards.create_details_iframe(card_id, \*\*params) -> CardIframeURL
-- client.cards.details(card_id) -> CardDetails
+
+# CardDetails
+
+Types:
+
+```python
+from increase.types import CardDetails, CardIframeURL
+```
+
+Methods:
+
+- client.card_details.update(card_id, \*\*params) -> CardDetails
+- client.card_details.create_details_iframe(card_id, \*\*params) -> CardIframeURL
+- client.card_details.details(card_id) -> CardDetails
# CardPayments
@@ -830,8 +842,8 @@ Methods:
Methods:
+- client.simulations.physical_cards.create(physical_card_id, \*\*params) -> PhysicalCard
- client.simulations.physical_cards.advance_shipment(physical_card_id, \*\*params) -> PhysicalCard
-- client.simulations.physical_cards.tracking_updates(physical_card_id, \*\*params) -> PhysicalCard
## DigitalWalletTokenRequests
diff --git a/src/increase/_client.py b/src/increase/_client.py
index acbde35b9..94c7372b9 100644
--- a/src/increase/_client.py
+++ b/src/increase/_client.py
@@ -39,6 +39,7 @@
lockboxes,
file_links,
card_tokens,
+ card_details,
oauth_tokens,
transactions,
ach_transfers,
@@ -113,6 +114,7 @@ class Increase(SyncAPIClient):
account_numbers: account_numbers.AccountNumbersResource
account_transfers: account_transfers.AccountTransfersResource
cards: cards.CardsResource
+ card_details: card_details.CardDetailsResource
card_payments: card_payments.CardPaymentsResource
card_purchase_supplements: card_purchase_supplements.CardPurchaseSupplementsResource
physical_cards: physical_cards.PhysicalCardsResource
@@ -259,6 +261,7 @@ def __init__(
self.account_numbers = account_numbers.AccountNumbersResource(self)
self.account_transfers = account_transfers.AccountTransfersResource(self)
self.cards = cards.CardsResource(self)
+ self.card_details = card_details.CardDetailsResource(self)
self.card_payments = card_payments.CardPaymentsResource(self)
self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResource(self)
self.physical_cards = physical_cards.PhysicalCardsResource(self)
@@ -474,6 +477,7 @@ class AsyncIncrease(AsyncAPIClient):
account_numbers: account_numbers.AsyncAccountNumbersResource
account_transfers: account_transfers.AsyncAccountTransfersResource
cards: cards.AsyncCardsResource
+ card_details: card_details.AsyncCardDetailsResource
card_payments: card_payments.AsyncCardPaymentsResource
card_purchase_supplements: card_purchase_supplements.AsyncCardPurchaseSupplementsResource
physical_cards: physical_cards.AsyncPhysicalCardsResource
@@ -622,6 +626,7 @@ def __init__(
self.account_numbers = account_numbers.AsyncAccountNumbersResource(self)
self.account_transfers = account_transfers.AsyncAccountTransfersResource(self)
self.cards = cards.AsyncCardsResource(self)
+ self.card_details = card_details.AsyncCardDetailsResource(self)
self.card_payments = card_payments.AsyncCardPaymentsResource(self)
self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResource(self)
self.physical_cards = physical_cards.AsyncPhysicalCardsResource(self)
@@ -840,6 +845,7 @@ def __init__(self, client: Increase) -> None:
self.account_numbers = account_numbers.AccountNumbersResourceWithRawResponse(client.account_numbers)
self.account_transfers = account_transfers.AccountTransfersResourceWithRawResponse(client.account_transfers)
self.cards = cards.CardsResourceWithRawResponse(client.cards)
+ self.card_details = card_details.CardDetailsResourceWithRawResponse(client.card_details)
self.card_payments = card_payments.CardPaymentsResourceWithRawResponse(client.card_payments)
self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithRawResponse(
client.card_purchase_supplements
@@ -950,6 +956,7 @@ def __init__(self, client: AsyncIncrease) -> None:
client.account_transfers
)
self.cards = cards.AsyncCardsResourceWithRawResponse(client.cards)
+ self.card_details = card_details.AsyncCardDetailsResourceWithRawResponse(client.card_details)
self.card_payments = card_payments.AsyncCardPaymentsResourceWithRawResponse(client.card_payments)
self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithRawResponse(
client.card_purchase_supplements
@@ -1074,6 +1081,7 @@ def __init__(self, client: Increase) -> None:
client.account_transfers
)
self.cards = cards.CardsResourceWithStreamingResponse(client.cards)
+ self.card_details = card_details.CardDetailsResourceWithStreamingResponse(client.card_details)
self.card_payments = card_payments.CardPaymentsResourceWithStreamingResponse(client.card_payments)
self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithStreamingResponse(
client.card_purchase_supplements
@@ -1198,6 +1206,7 @@ def __init__(self, client: AsyncIncrease) -> None:
client.account_transfers
)
self.cards = cards.AsyncCardsResourceWithStreamingResponse(client.cards)
+ self.card_details = card_details.AsyncCardDetailsResourceWithStreamingResponse(client.card_details)
self.card_payments = card_payments.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments)
self.card_purchase_supplements = (
card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithStreamingResponse(
diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py
index 64fc78c87..11ef3d99c 100644
--- a/src/increase/resources/__init__.py
+++ b/src/increase/resources/__init__.py
@@ -105,6 +105,14 @@
SimulationsResourceWithStreamingResponse,
AsyncSimulationsResourceWithStreamingResponse,
)
+from .card_details import (
+ CardDetailsResource,
+ AsyncCardDetailsResource,
+ CardDetailsResourceWithRawResponse,
+ AsyncCardDetailsResourceWithRawResponse,
+ CardDetailsResourceWithStreamingResponse,
+ AsyncCardDetailsResourceWithStreamingResponse,
+)
from .oauth_tokens import (
OAuthTokensResource,
AsyncOAuthTokensResource,
@@ -459,6 +467,12 @@
"AsyncCardsResourceWithRawResponse",
"CardsResourceWithStreamingResponse",
"AsyncCardsResourceWithStreamingResponse",
+ "CardDetailsResource",
+ "AsyncCardDetailsResource",
+ "CardDetailsResourceWithRawResponse",
+ "AsyncCardDetailsResourceWithRawResponse",
+ "CardDetailsResourceWithStreamingResponse",
+ "AsyncCardDetailsResourceWithStreamingResponse",
"CardPaymentsResource",
"AsyncCardPaymentsResource",
"CardPaymentsResourceWithRawResponse",
diff --git a/src/increase/resources/card_details.py b/src/increase/resources/card_details.py
new file mode 100644
index 000000000..b328b9fab
--- /dev/null
+++ b/src/increase/resources/card_details.py
@@ -0,0 +1,392 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from ..types import card_detail_update_params, card_detail_create_details_iframe_params
+from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from .._utils import maybe_transform, async_maybe_transform
+from .._compat import cached_property
+from .._resource import SyncAPIResource, AsyncAPIResource
+from .._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from .._base_client import make_request_options
+from ..types.card_details import CardDetails
+from ..types.card_iframe_url import CardIframeURL
+
+__all__ = ["CardDetailsResource", "AsyncCardDetailsResource"]
+
+
+class CardDetailsResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> CardDetailsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers
+ """
+ return CardDetailsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> CardDetailsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/Increase/increase-python#with_streaming_response
+ """
+ return CardDetailsResourceWithStreamingResponse(self)
+
+ def update(
+ self,
+ card_id: str,
+ *,
+ pin: str,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ idempotency_key: str | None = None,
+ ) -> CardDetails:
+ """
+ Update a Card's Details
+
+ Args:
+ card_id: The card identifier.
+
+ pin: The 4-digit PIN for the card, for use with ATMs.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+
+ idempotency_key: Specify a custom idempotency key for this request
+ """
+ if not card_id:
+ raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}")
+ return self._patch(
+ f"/cards/{card_id}/details",
+ body=maybe_transform({"pin": pin}, card_detail_update_params.CardDetailUpdateParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ idempotency_key=idempotency_key,
+ ),
+ cast_to=CardDetails,
+ )
+
+ def create_details_iframe(
+ self,
+ card_id: str,
+ *,
+ physical_card_id: str | Omit = omit,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ idempotency_key: str | None = None,
+ ) -> CardIframeURL:
+ """Create an iframe URL for a Card to display the card details.
+
+ More details about
+ styling and usage can be found in the
+ [documentation](/documentation/embedded-card-component).
+
+ Args:
+ card_id: The identifier of the Card to retrieve details for.
+
+ physical_card_id: The identifier of the Physical Card to retrieve details for.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+
+ idempotency_key: Specify a custom idempotency key for this request
+ """
+ if not card_id:
+ raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}")
+ return self._post(
+ f"/cards/{card_id}/create_details_iframe",
+ body=maybe_transform(
+ {"physical_card_id": physical_card_id},
+ card_detail_create_details_iframe_params.CardDetailCreateDetailsIframeParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ idempotency_key=idempotency_key,
+ ),
+ cast_to=CardIframeURL,
+ )
+
+ def details(
+ self,
+ card_id: str,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> CardDetails:
+ """
+ Sensitive details for a Card include the primary account number, expiry, card
+ verification code, and PIN.
+
+ Args:
+ card_id: The identifier of the Card to retrieve details for.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not card_id:
+ raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}")
+ return self._get(
+ f"/cards/{card_id}/details",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CardDetails,
+ )
+
+
+class AsyncCardDetailsResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncCardDetailsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncCardDetailsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncCardDetailsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/Increase/increase-python#with_streaming_response
+ """
+ return AsyncCardDetailsResourceWithStreamingResponse(self)
+
+ async def update(
+ self,
+ card_id: str,
+ *,
+ pin: str,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ idempotency_key: str | None = None,
+ ) -> CardDetails:
+ """
+ Update a Card's Details
+
+ Args:
+ card_id: The card identifier.
+
+ pin: The 4-digit PIN for the card, for use with ATMs.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+
+ idempotency_key: Specify a custom idempotency key for this request
+ """
+ if not card_id:
+ raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}")
+ return await self._patch(
+ f"/cards/{card_id}/details",
+ body=await async_maybe_transform({"pin": pin}, card_detail_update_params.CardDetailUpdateParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ idempotency_key=idempotency_key,
+ ),
+ cast_to=CardDetails,
+ )
+
+ async def create_details_iframe(
+ self,
+ card_id: str,
+ *,
+ physical_card_id: str | Omit = omit,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ idempotency_key: str | None = None,
+ ) -> CardIframeURL:
+ """Create an iframe URL for a Card to display the card details.
+
+ More details about
+ styling and usage can be found in the
+ [documentation](/documentation/embedded-card-component).
+
+ Args:
+ card_id: The identifier of the Card to retrieve details for.
+
+ physical_card_id: The identifier of the Physical Card to retrieve details for.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+
+ idempotency_key: Specify a custom idempotency key for this request
+ """
+ if not card_id:
+ raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}")
+ return await self._post(
+ f"/cards/{card_id}/create_details_iframe",
+ body=await async_maybe_transform(
+ {"physical_card_id": physical_card_id},
+ card_detail_create_details_iframe_params.CardDetailCreateDetailsIframeParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ idempotency_key=idempotency_key,
+ ),
+ cast_to=CardIframeURL,
+ )
+
+ async def details(
+ self,
+ card_id: str,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> CardDetails:
+ """
+ Sensitive details for a Card include the primary account number, expiry, card
+ verification code, and PIN.
+
+ Args:
+ card_id: The identifier of the Card to retrieve details for.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not card_id:
+ raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}")
+ return await self._get(
+ f"/cards/{card_id}/details",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CardDetails,
+ )
+
+
+class CardDetailsResourceWithRawResponse:
+ def __init__(self, card_details: CardDetailsResource) -> None:
+ self._card_details = card_details
+
+ self.update = to_raw_response_wrapper(
+ card_details.update,
+ )
+ self.create_details_iframe = to_raw_response_wrapper(
+ card_details.create_details_iframe,
+ )
+ self.details = to_raw_response_wrapper(
+ card_details.details,
+ )
+
+
+class AsyncCardDetailsResourceWithRawResponse:
+ def __init__(self, card_details: AsyncCardDetailsResource) -> None:
+ self._card_details = card_details
+
+ self.update = async_to_raw_response_wrapper(
+ card_details.update,
+ )
+ self.create_details_iframe = async_to_raw_response_wrapper(
+ card_details.create_details_iframe,
+ )
+ self.details = async_to_raw_response_wrapper(
+ card_details.details,
+ )
+
+
+class CardDetailsResourceWithStreamingResponse:
+ def __init__(self, card_details: CardDetailsResource) -> None:
+ self._card_details = card_details
+
+ self.update = to_streamed_response_wrapper(
+ card_details.update,
+ )
+ self.create_details_iframe = to_streamed_response_wrapper(
+ card_details.create_details_iframe,
+ )
+ self.details = to_streamed_response_wrapper(
+ card_details.details,
+ )
+
+
+class AsyncCardDetailsResourceWithStreamingResponse:
+ def __init__(self, card_details: AsyncCardDetailsResource) -> None:
+ self._card_details = card_details
+
+ self.update = async_to_streamed_response_wrapper(
+ card_details.update,
+ )
+ self.create_details_iframe = async_to_streamed_response_wrapper(
+ card_details.create_details_iframe,
+ )
+ self.details = async_to_streamed_response_wrapper(
+ card_details.details,
+ )
diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py
index 5256867bb..93b4025bc 100644
--- a/src/increase/resources/cards.py
+++ b/src/increase/resources/cards.py
@@ -6,7 +6,7 @@
import httpx
-from ..types import card_list_params, card_create_params, card_update_params, card_create_details_iframe_params
+from ..types import card_list_params, card_create_params, card_update_params
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
@@ -20,8 +20,6 @@
from ..pagination import SyncPage, AsyncPage
from ..types.card import Card
from .._base_client import AsyncPaginator, make_request_options
-from ..types.card_details import CardDetails
-from ..types.card_iframe_url import CardIframeURL
__all__ = ["CardsResource", "AsyncCardsResource"]
@@ -156,6 +154,7 @@ def update(
description: str | Omit = omit,
digital_wallet: card_update_params.DigitalWallet | Omit = omit,
entity_id: str | Omit = omit,
+ pin: str | Omit = omit,
status: Literal["active", "disabled", "canceled"] | Omit = omit,
# 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.
@@ -182,6 +181,8 @@ def update(
entity_id: The Entity the card belongs to. You only need to supply this in rare situations
when the card is not for the Account holder.
+ pin: The 4-digit PIN for the card, for use with ATMs.
+
status: The status to update the Card with.
- `active` - The card is active.
@@ -208,6 +209,7 @@ def update(
"description": description,
"digital_wallet": digital_wallet,
"entity_id": entity_id,
+ "pin": pin,
"status": status,
},
card_update_params.CardUpdateParams,
@@ -285,93 +287,6 @@ def list(
model=Card,
)
- def create_details_iframe(
- self,
- card_id: str,
- *,
- physical_card_id: str | Omit = omit,
- # 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,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- idempotency_key: str | None = None,
- ) -> CardIframeURL:
- """Create an iframe URL for a Card to display the card details.
-
- More details about
- styling and usage can be found in the
- [documentation](/documentation/embedded-card-component).
-
- Args:
- card_id: The identifier of the Card to retrieve details for.
-
- physical_card_id: The identifier of the Physical Card to retrieve details for.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
-
- idempotency_key: Specify a custom idempotency key for this request
- """
- if not card_id:
- raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}")
- return self._post(
- f"/cards/{card_id}/create_details_iframe",
- body=maybe_transform(
- {"physical_card_id": physical_card_id}, card_create_details_iframe_params.CardCreateDetailsIframeParams
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- idempotency_key=idempotency_key,
- ),
- cast_to=CardIframeURL,
- )
-
- def details(
- self,
- card_id: str,
- *,
- # 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,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> CardDetails:
- """
- Sensitive details for a Card include the primary account number, expiry, card
- verification code, and PIN.
-
- Args:
- card_id: The identifier of the Card to retrieve details for.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not card_id:
- raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}")
- return self._get(
- f"/cards/{card_id}/details",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=CardDetails,
- )
-
class AsyncCardsResource(AsyncAPIResource):
@cached_property
@@ -503,6 +418,7 @@ async def update(
description: str | Omit = omit,
digital_wallet: card_update_params.DigitalWallet | Omit = omit,
entity_id: str | Omit = omit,
+ pin: str | Omit = omit,
status: Literal["active", "disabled", "canceled"] | Omit = omit,
# 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.
@@ -529,6 +445,8 @@ async def update(
entity_id: The Entity the card belongs to. You only need to supply this in rare situations
when the card is not for the Account holder.
+ pin: The 4-digit PIN for the card, for use with ATMs.
+
status: The status to update the Card with.
- `active` - The card is active.
@@ -555,6 +473,7 @@ async def update(
"description": description,
"digital_wallet": digital_wallet,
"entity_id": entity_id,
+ "pin": pin,
"status": status,
},
card_update_params.CardUpdateParams,
@@ -632,93 +551,6 @@ def list(
model=Card,
)
- async def create_details_iframe(
- self,
- card_id: str,
- *,
- physical_card_id: str | Omit = omit,
- # 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,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- idempotency_key: str | None = None,
- ) -> CardIframeURL:
- """Create an iframe URL for a Card to display the card details.
-
- More details about
- styling and usage can be found in the
- [documentation](/documentation/embedded-card-component).
-
- Args:
- card_id: The identifier of the Card to retrieve details for.
-
- physical_card_id: The identifier of the Physical Card to retrieve details for.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
-
- idempotency_key: Specify a custom idempotency key for this request
- """
- if not card_id:
- raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}")
- return await self._post(
- f"/cards/{card_id}/create_details_iframe",
- body=await async_maybe_transform(
- {"physical_card_id": physical_card_id}, card_create_details_iframe_params.CardCreateDetailsIframeParams
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- idempotency_key=idempotency_key,
- ),
- cast_to=CardIframeURL,
- )
-
- async def details(
- self,
- card_id: str,
- *,
- # 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,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> CardDetails:
- """
- Sensitive details for a Card include the primary account number, expiry, card
- verification code, and PIN.
-
- Args:
- card_id: The identifier of the Card to retrieve details for.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not card_id:
- raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}")
- return await self._get(
- f"/cards/{card_id}/details",
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
- ),
- cast_to=CardDetails,
- )
-
class CardsResourceWithRawResponse:
def __init__(self, cards: CardsResource) -> None:
@@ -736,12 +568,6 @@ def __init__(self, cards: CardsResource) -> None:
self.list = to_raw_response_wrapper(
cards.list,
)
- self.create_details_iframe = to_raw_response_wrapper(
- cards.create_details_iframe,
- )
- self.details = to_raw_response_wrapper(
- cards.details,
- )
class AsyncCardsResourceWithRawResponse:
@@ -760,12 +586,6 @@ def __init__(self, cards: AsyncCardsResource) -> None:
self.list = async_to_raw_response_wrapper(
cards.list,
)
- self.create_details_iframe = async_to_raw_response_wrapper(
- cards.create_details_iframe,
- )
- self.details = async_to_raw_response_wrapper(
- cards.details,
- )
class CardsResourceWithStreamingResponse:
@@ -784,12 +604,6 @@ def __init__(self, cards: CardsResource) -> None:
self.list = to_streamed_response_wrapper(
cards.list,
)
- self.create_details_iframe = to_streamed_response_wrapper(
- cards.create_details_iframe,
- )
- self.details = to_streamed_response_wrapper(
- cards.details,
- )
class AsyncCardsResourceWithStreamingResponse:
@@ -808,9 +622,3 @@ def __init__(self, cards: AsyncCardsResource) -> None:
self.list = async_to_streamed_response_wrapper(
cards.list,
)
- self.create_details_iframe = async_to_streamed_response_wrapper(
- cards.create_details_iframe,
- )
- self.details = async_to_streamed_response_wrapper(
- cards.details,
- )
diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py
index 740bf9106..bc2b3413d 100644
--- a/src/increase/resources/simulations/physical_cards.py
+++ b/src/increase/resources/simulations/physical_cards.py
@@ -19,7 +19,7 @@
async_to_streamed_response_wrapper,
)
from ..._base_client import make_request_options
-from ...types.simulations import physical_card_advance_shipment_params, physical_card_tracking_updates_params
+from ...types.simulations import physical_card_create_params, physical_card_advance_shipment_params
from ...types.physical_card import PhysicalCard
__all__ = ["PhysicalCardsResource", "AsyncPhysicalCardsResource"]
@@ -45,74 +45,7 @@ def with_streaming_response(self) -> PhysicalCardsResourceWithStreamingResponse:
"""
return PhysicalCardsResourceWithStreamingResponse(self)
- def advance_shipment(
- self,
- physical_card_id: str,
- *,
- shipment_status: Literal[
- "pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned", "requires_attention"
- ],
- # 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,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- idempotency_key: str | None = None,
- ) -> PhysicalCard:
- """
- This endpoint allows you to simulate advancing the shipment status of a Physical
- Card, to simulate e.g., that a physical card was attempted shipped but then
- failed delivery.
-
- Args:
- physical_card_id: The Physical Card you would like to action.
-
- shipment_status: The shipment status to move the Physical Card to.
-
- - `pending` - The physical card has not yet been shipped.
- - `canceled` - The physical card shipment was canceled prior to submission.
- - `submitted` - The physical card shipment has been submitted to the card
- fulfillment provider.
- - `acknowledged` - The physical card shipment has been acknowledged by the card
- fulfillment provider and will be processed in their next batch.
- - `rejected` - The physical card shipment was rejected by the card printer due
- to an error.
- - `shipped` - The physical card has been shipped.
- - `returned` - The physical card shipment was returned to the sender and
- destroyed by the production facility.
- - `requires_attention` - The physical card shipment requires attention from
- Increase before progressing.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
-
- idempotency_key: Specify a custom idempotency key for this request
- """
- if not physical_card_id:
- raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}")
- return self._post(
- f"/simulations/physical_cards/{physical_card_id}/advance_shipment",
- body=maybe_transform(
- {"shipment_status": shipment_status},
- physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- idempotency_key=idempotency_key,
- ),
- cast_to=PhysicalCard,
- )
-
- def tracking_updates(
+ def create(
self,
physical_card_id: str,
*,
@@ -175,7 +108,7 @@ def tracking_updates(
"postal_code": postal_code,
"state": state,
},
- physical_card_tracking_updates_params.PhysicalCardTrackingUpdatesParams,
+ physical_card_create_params.PhysicalCardCreateParams,
),
options=make_request_options(
extra_headers=extra_headers,
@@ -187,28 +120,7 @@ def tracking_updates(
cast_to=PhysicalCard,
)
-
-class AsyncPhysicalCardsResource(AsyncAPIResource):
- @cached_property
- def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse:
- """
- This property can be used as a prefix for any HTTP method call to return
- the raw response object instead of the parsed content.
-
- For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers
- """
- return AsyncPhysicalCardsResourceWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncPhysicalCardsResourceWithStreamingResponse:
- """
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
-
- For more information, see https://www.github.com/Increase/increase-python#with_streaming_response
- """
- return AsyncPhysicalCardsResourceWithStreamingResponse(self)
-
- async def advance_shipment(
+ def advance_shipment(
self,
physical_card_id: str,
*,
@@ -259,9 +171,9 @@ async def advance_shipment(
"""
if not physical_card_id:
raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}")
- return await self._post(
+ return self._post(
f"/simulations/physical_cards/{physical_card_id}/advance_shipment",
- body=await async_maybe_transform(
+ body=maybe_transform(
{"shipment_status": shipment_status},
physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams,
),
@@ -275,7 +187,28 @@ async def advance_shipment(
cast_to=PhysicalCard,
)
- async def tracking_updates(
+
+class AsyncPhysicalCardsResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncPhysicalCardsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncPhysicalCardsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/Increase/increase-python#with_streaming_response
+ """
+ return AsyncPhysicalCardsResourceWithStreamingResponse(self)
+
+ async def create(
self,
physical_card_id: str,
*,
@@ -338,7 +271,74 @@ async def tracking_updates(
"postal_code": postal_code,
"state": state,
},
- physical_card_tracking_updates_params.PhysicalCardTrackingUpdatesParams,
+ physical_card_create_params.PhysicalCardCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ idempotency_key=idempotency_key,
+ ),
+ cast_to=PhysicalCard,
+ )
+
+ async def advance_shipment(
+ self,
+ physical_card_id: str,
+ *,
+ shipment_status: Literal[
+ "pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned", "requires_attention"
+ ],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ idempotency_key: str | None = None,
+ ) -> PhysicalCard:
+ """
+ This endpoint allows you to simulate advancing the shipment status of a Physical
+ Card, to simulate e.g., that a physical card was attempted shipped but then
+ failed delivery.
+
+ Args:
+ physical_card_id: The Physical Card you would like to action.
+
+ shipment_status: The shipment status to move the Physical Card to.
+
+ - `pending` - The physical card has not yet been shipped.
+ - `canceled` - The physical card shipment was canceled prior to submission.
+ - `submitted` - The physical card shipment has been submitted to the card
+ fulfillment provider.
+ - `acknowledged` - The physical card shipment has been acknowledged by the card
+ fulfillment provider and will be processed in their next batch.
+ - `rejected` - The physical card shipment was rejected by the card printer due
+ to an error.
+ - `shipped` - The physical card has been shipped.
+ - `returned` - The physical card shipment was returned to the sender and
+ destroyed by the production facility.
+ - `requires_attention` - The physical card shipment requires attention from
+ Increase before progressing.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+
+ idempotency_key: Specify a custom idempotency key for this request
+ """
+ if not physical_card_id:
+ raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}")
+ return await self._post(
+ f"/simulations/physical_cards/{physical_card_id}/advance_shipment",
+ body=await async_maybe_transform(
+ {"shipment_status": shipment_status},
+ physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams,
),
options=make_request_options(
extra_headers=extra_headers,
@@ -355,45 +355,45 @@ class PhysicalCardsResourceWithRawResponse:
def __init__(self, physical_cards: PhysicalCardsResource) -> None:
self._physical_cards = physical_cards
+ self.create = to_raw_response_wrapper(
+ physical_cards.create,
+ )
self.advance_shipment = to_raw_response_wrapper(
physical_cards.advance_shipment,
)
- self.tracking_updates = to_raw_response_wrapper(
- physical_cards.tracking_updates,
- )
class AsyncPhysicalCardsResourceWithRawResponse:
def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None:
self._physical_cards = physical_cards
+ self.create = async_to_raw_response_wrapper(
+ physical_cards.create,
+ )
self.advance_shipment = async_to_raw_response_wrapper(
physical_cards.advance_shipment,
)
- self.tracking_updates = async_to_raw_response_wrapper(
- physical_cards.tracking_updates,
- )
class PhysicalCardsResourceWithStreamingResponse:
def __init__(self, physical_cards: PhysicalCardsResource) -> None:
self._physical_cards = physical_cards
+ self.create = to_streamed_response_wrapper(
+ physical_cards.create,
+ )
self.advance_shipment = to_streamed_response_wrapper(
physical_cards.advance_shipment,
)
- self.tracking_updates = to_streamed_response_wrapper(
- physical_cards.tracking_updates,
- )
class AsyncPhysicalCardsResourceWithStreamingResponse:
def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None:
self._physical_cards = physical_cards
+ self.create = async_to_streamed_response_wrapper(
+ physical_cards.create,
+ )
self.advance_shipment = async_to_streamed_response_wrapper(
physical_cards.advance_shipment,
)
- self.tracking_updates = async_to_streamed_response_wrapper(
- physical_cards.tracking_updates,
- )
diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py
index eae146400..a9c02408e 100644
--- a/src/increase/types/__init__.py
+++ b/src/increase/types/__init__.py
@@ -80,6 +80,7 @@
from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams
from .card_payment_list_params import CardPaymentListParams as CardPaymentListParams
from .card_purchase_supplement import CardPurchaseSupplement as CardPurchaseSupplement
+from .card_detail_update_params import CardDetailUpdateParams as CardDetailUpdateParams
from .check_deposit_list_params import CheckDepositListParams as CheckDepositListParams
from .oauth_token_create_params import OAuthTokenCreateParams as OAuthTokenCreateParams
from .physical_card_list_params import PhysicalCardListParams as PhysicalCardListParams
@@ -133,7 +134,6 @@
from .bookkeeping_account_create_params import BookkeepingAccountCreateParams as BookkeepingAccountCreateParams
from .bookkeeping_account_update_params import BookkeepingAccountUpdateParams as BookkeepingAccountUpdateParams
from .bookkeeping_entry_set_list_params import BookkeepingEntrySetListParams as BookkeepingEntrySetListParams
-from .card_create_details_iframe_params import CardCreateDetailsIframeParams as CardCreateDetailsIframeParams
from .digital_card_profile_clone_params import DigitalCardProfileCloneParams as DigitalCardProfileCloneParams
from .inbound_check_deposit_list_params import InboundCheckDepositListParams as InboundCheckDepositListParams
from .inbound_wire_transfer_list_params import InboundWireTransferListParams as InboundWireTransferListParams
@@ -167,6 +167,9 @@
from .real_time_payments_transfer_list_params import (
RealTimePaymentsTransferListParams as RealTimePaymentsTransferListParams,
)
+from .card_detail_create_details_iframe_params import (
+ CardDetailCreateDetailsIframeParams as CardDetailCreateDetailsIframeParams,
+)
from .intrafi_account_enrollment_create_params import (
IntrafiAccountEnrollmentCreateParams as IntrafiAccountEnrollmentCreateParams,
)
diff --git a/src/increase/types/card_create_details_iframe_params.py b/src/increase/types/card_detail_create_details_iframe_params.py
similarity index 69%
rename from src/increase/types/card_create_details_iframe_params.py
rename to src/increase/types/card_detail_create_details_iframe_params.py
index 9af571640..47efe4422 100644
--- a/src/increase/types/card_create_details_iframe_params.py
+++ b/src/increase/types/card_detail_create_details_iframe_params.py
@@ -4,9 +4,9 @@
from typing_extensions import TypedDict
-__all__ = ["CardCreateDetailsIframeParams"]
+__all__ = ["CardDetailCreateDetailsIframeParams"]
-class CardCreateDetailsIframeParams(TypedDict, total=False):
+class CardDetailCreateDetailsIframeParams(TypedDict, total=False):
physical_card_id: str
"""The identifier of the Physical Card to retrieve details for."""
diff --git a/src/increase/types/card_detail_update_params.py b/src/increase/types/card_detail_update_params.py
new file mode 100644
index 000000000..dfed669fc
--- /dev/null
+++ b/src/increase/types/card_detail_update_params.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["CardDetailUpdateParams"]
+
+
+class CardDetailUpdateParams(TypedDict, total=False):
+ pin: Required[str]
+ """The 4-digit PIN for the card, for use with ATMs."""
diff --git a/src/increase/types/card_update_params.py b/src/increase/types/card_update_params.py
index 85c1842d9..800728156 100644
--- a/src/increase/types/card_update_params.py
+++ b/src/increase/types/card_update_params.py
@@ -28,6 +28,9 @@ class CardUpdateParams(TypedDict, total=False):
Account holder.
"""
+ pin: str
+ """The 4-digit PIN for the card, for use with ATMs."""
+
status: Literal["active", "disabled", "canceled"]
"""The status to update the Card with.
diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py
index 669de5026..7adcf989d 100644
--- a/src/increase/types/simulations/__init__.py
+++ b/src/increase/types/simulations/__init__.py
@@ -9,6 +9,7 @@
from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams
from .ach_transfer_settle_params import ACHTransferSettleParams as ACHTransferSettleParams
from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams
+from .physical_card_create_params import PhysicalCardCreateParams as PhysicalCardCreateParams
from .card_increment_create_params import CardIncrementCreateParams as CardIncrementCreateParams
from .card_settlement_create_params import CardSettlementCreateParams as CardSettlementCreateParams
from .interest_payment_create_params import InterestPaymentCreateParams as InterestPaymentCreateParams
@@ -23,9 +24,6 @@
from .physical_card_advance_shipment_params import (
PhysicalCardAdvanceShipmentParams as PhysicalCardAdvanceShipmentParams,
)
-from .physical_card_tracking_updates_params import (
- PhysicalCardTrackingUpdatesParams as PhysicalCardTrackingUpdatesParams,
-)
from .digital_wallet_token_request_create_params import (
DigitalWalletTokenRequestCreateParams as DigitalWalletTokenRequestCreateParams,
)
diff --git a/src/increase/types/simulations/physical_card_tracking_updates_params.py b/src/increase/types/simulations/physical_card_create_params.py
similarity index 91%
rename from src/increase/types/simulations/physical_card_tracking_updates_params.py
rename to src/increase/types/simulations/physical_card_create_params.py
index fb60b17eb..b51e71093 100644
--- a/src/increase/types/simulations/physical_card_tracking_updates_params.py
+++ b/src/increase/types/simulations/physical_card_create_params.py
@@ -8,10 +8,10 @@
from ..._utils import PropertyInfo
-__all__ = ["PhysicalCardTrackingUpdatesParams"]
+__all__ = ["PhysicalCardCreateParams"]
-class PhysicalCardTrackingUpdatesParams(TypedDict, total=False):
+class PhysicalCardCreateParams(TypedDict, total=False):
category: Required[Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"]]
"""The type of tracking event.
diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py
index 967969afc..735dc8324 100644
--- a/tests/api_resources/simulations/test_physical_cards.py
+++ b/tests/api_resources/simulations/test_physical_cards.py
@@ -19,18 +19,30 @@ class TestPhysicalCards:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@parametrize
- def test_method_advance_shipment(self, client: Increase) -> None:
- physical_card = client.simulations.physical_cards.advance_shipment(
+ def test_method_create(self, client: Increase) -> None:
+ physical_card = client.simulations.physical_cards.create(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- shipment_status="shipped",
+ category="delivered",
)
assert_matches_type(PhysicalCard, physical_card, path=["response"])
@parametrize
- def test_raw_response_advance_shipment(self, client: Increase) -> None:
- response = client.simulations.physical_cards.with_raw_response.advance_shipment(
+ def test_method_create_with_all_params(self, client: Increase) -> None:
+ physical_card = client.simulations.physical_cards.create(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- shipment_status="shipped",
+ category="delivered",
+ carrier_estimated_delivery_at=parse_datetime("2019-12-27T18:11:19.117Z"),
+ city="New York",
+ postal_code="10045",
+ state="NY",
+ )
+ assert_matches_type(PhysicalCard, physical_card, path=["response"])
+
+ @parametrize
+ def test_raw_response_create(self, client: Increase) -> None:
+ response = client.simulations.physical_cards.with_raw_response.create(
+ physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
+ category="delivered",
)
assert response.is_closed is True
@@ -39,10 +51,10 @@ def test_raw_response_advance_shipment(self, client: Increase) -> None:
assert_matches_type(PhysicalCard, physical_card, path=["response"])
@parametrize
- def test_streaming_response_advance_shipment(self, client: Increase) -> None:
- with client.simulations.physical_cards.with_streaming_response.advance_shipment(
+ def test_streaming_response_create(self, client: Increase) -> None:
+ with client.simulations.physical_cards.with_streaming_response.create(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- shipment_status="shipped",
+ category="delivered",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -53,38 +65,26 @@ def test_streaming_response_advance_shipment(self, client: Increase) -> None:
assert cast(Any, response.is_closed) is True
@parametrize
- def test_path_params_advance_shipment(self, client: Increase) -> None:
+ def test_path_params_create(self, client: Increase) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"):
- client.simulations.physical_cards.with_raw_response.advance_shipment(
+ client.simulations.physical_cards.with_raw_response.create(
physical_card_id="",
- shipment_status="shipped",
+ category="delivered",
)
@parametrize
- def test_method_tracking_updates(self, client: Increase) -> None:
- physical_card = client.simulations.physical_cards.tracking_updates(
- physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- category="delivered",
- )
- assert_matches_type(PhysicalCard, physical_card, path=["response"])
-
- @parametrize
- def test_method_tracking_updates_with_all_params(self, client: Increase) -> None:
- physical_card = client.simulations.physical_cards.tracking_updates(
+ def test_method_advance_shipment(self, client: Increase) -> None:
+ physical_card = client.simulations.physical_cards.advance_shipment(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- category="delivered",
- carrier_estimated_delivery_at=parse_datetime("2019-12-27T18:11:19.117Z"),
- city="New York",
- postal_code="10045",
- state="NY",
+ shipment_status="shipped",
)
assert_matches_type(PhysicalCard, physical_card, path=["response"])
@parametrize
- def test_raw_response_tracking_updates(self, client: Increase) -> None:
- response = client.simulations.physical_cards.with_raw_response.tracking_updates(
+ def test_raw_response_advance_shipment(self, client: Increase) -> None:
+ response = client.simulations.physical_cards.with_raw_response.advance_shipment(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- category="delivered",
+ shipment_status="shipped",
)
assert response.is_closed is True
@@ -93,10 +93,10 @@ def test_raw_response_tracking_updates(self, client: Increase) -> None:
assert_matches_type(PhysicalCard, physical_card, path=["response"])
@parametrize
- def test_streaming_response_tracking_updates(self, client: Increase) -> None:
- with client.simulations.physical_cards.with_streaming_response.tracking_updates(
+ def test_streaming_response_advance_shipment(self, client: Increase) -> None:
+ with client.simulations.physical_cards.with_streaming_response.advance_shipment(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- category="delivered",
+ shipment_status="shipped",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -107,11 +107,11 @@ def test_streaming_response_tracking_updates(self, client: Increase) -> None:
assert cast(Any, response.is_closed) is True
@parametrize
- def test_path_params_tracking_updates(self, client: Increase) -> None:
+ def test_path_params_advance_shipment(self, client: Increase) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"):
- client.simulations.physical_cards.with_raw_response.tracking_updates(
+ client.simulations.physical_cards.with_raw_response.advance_shipment(
physical_card_id="",
- category="delivered",
+ shipment_status="shipped",
)
@@ -121,18 +121,30 @@ class TestAsyncPhysicalCards:
)
@parametrize
- async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> None:
- physical_card = await async_client.simulations.physical_cards.advance_shipment(
+ async def test_method_create(self, async_client: AsyncIncrease) -> None:
+ physical_card = await async_client.simulations.physical_cards.create(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- shipment_status="shipped",
+ category="delivered",
)
assert_matches_type(PhysicalCard, physical_card, path=["response"])
@parametrize
- async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) -> None:
- response = await async_client.simulations.physical_cards.with_raw_response.advance_shipment(
+ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None:
+ physical_card = await async_client.simulations.physical_cards.create(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- shipment_status="shipped",
+ category="delivered",
+ carrier_estimated_delivery_at=parse_datetime("2019-12-27T18:11:19.117Z"),
+ city="New York",
+ postal_code="10045",
+ state="NY",
+ )
+ assert_matches_type(PhysicalCard, physical_card, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None:
+ response = await async_client.simulations.physical_cards.with_raw_response.create(
+ physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
+ category="delivered",
)
assert response.is_closed is True
@@ -141,10 +153,10 @@ async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease)
assert_matches_type(PhysicalCard, physical_card, path=["response"])
@parametrize
- async def test_streaming_response_advance_shipment(self, async_client: AsyncIncrease) -> None:
- async with async_client.simulations.physical_cards.with_streaming_response.advance_shipment(
+ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None:
+ async with async_client.simulations.physical_cards.with_streaming_response.create(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- shipment_status="shipped",
+ category="delivered",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -155,38 +167,26 @@ async def test_streaming_response_advance_shipment(self, async_client: AsyncIncr
assert cast(Any, response.is_closed) is True
@parametrize
- async def test_path_params_advance_shipment(self, async_client: AsyncIncrease) -> None:
+ async def test_path_params_create(self, async_client: AsyncIncrease) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"):
- await async_client.simulations.physical_cards.with_raw_response.advance_shipment(
+ await async_client.simulations.physical_cards.with_raw_response.create(
physical_card_id="",
- shipment_status="shipped",
+ category="delivered",
)
@parametrize
- async def test_method_tracking_updates(self, async_client: AsyncIncrease) -> None:
- physical_card = await async_client.simulations.physical_cards.tracking_updates(
- physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- category="delivered",
- )
- assert_matches_type(PhysicalCard, physical_card, path=["response"])
-
- @parametrize
- async def test_method_tracking_updates_with_all_params(self, async_client: AsyncIncrease) -> None:
- physical_card = await async_client.simulations.physical_cards.tracking_updates(
+ async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> None:
+ physical_card = await async_client.simulations.physical_cards.advance_shipment(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- category="delivered",
- carrier_estimated_delivery_at=parse_datetime("2019-12-27T18:11:19.117Z"),
- city="New York",
- postal_code="10045",
- state="NY",
+ shipment_status="shipped",
)
assert_matches_type(PhysicalCard, physical_card, path=["response"])
@parametrize
- async def test_raw_response_tracking_updates(self, async_client: AsyncIncrease) -> None:
- response = await async_client.simulations.physical_cards.with_raw_response.tracking_updates(
+ async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) -> None:
+ response = await async_client.simulations.physical_cards.with_raw_response.advance_shipment(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- category="delivered",
+ shipment_status="shipped",
)
assert response.is_closed is True
@@ -195,10 +195,10 @@ async def test_raw_response_tracking_updates(self, async_client: AsyncIncrease)
assert_matches_type(PhysicalCard, physical_card, path=["response"])
@parametrize
- async def test_streaming_response_tracking_updates(self, async_client: AsyncIncrease) -> None:
- async with async_client.simulations.physical_cards.with_streaming_response.tracking_updates(
+ async def test_streaming_response_advance_shipment(self, async_client: AsyncIncrease) -> None:
+ async with async_client.simulations.physical_cards.with_streaming_response.advance_shipment(
physical_card_id="physical_card_ode8duyq5v2ynhjoharl",
- category="delivered",
+ shipment_status="shipped",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -209,9 +209,9 @@ async def test_streaming_response_tracking_updates(self, async_client: AsyncIncr
assert cast(Any, response.is_closed) is True
@parametrize
- async def test_path_params_tracking_updates(self, async_client: AsyncIncrease) -> None:
+ async def test_path_params_advance_shipment(self, async_client: AsyncIncrease) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"):
- await async_client.simulations.physical_cards.with_raw_response.tracking_updates(
+ await async_client.simulations.physical_cards.with_raw_response.advance_shipment(
physical_card_id="",
- category="delivered",
+ shipment_status="shipped",
)
diff --git a/tests/api_resources/test_card_details.py b/tests/api_resources/test_card_details.py
new file mode 100644
index 000000000..1e8b715ea
--- /dev/null
+++ b/tests/api_resources/test_card_details.py
@@ -0,0 +1,279 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from increase import Increase, AsyncIncrease
+from tests.utils import assert_matches_type
+from increase.types import (
+ CardDetails,
+ CardIframeURL,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestCardDetails:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_update(self, client: Increase) -> None:
+ card_detail = client.card_details.update(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ pin="1234",
+ )
+ assert_matches_type(CardDetails, card_detail, path=["response"])
+
+ @parametrize
+ def test_raw_response_update(self, client: Increase) -> None:
+ response = client.card_details.with_raw_response.update(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ pin="1234",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ card_detail = response.parse()
+ assert_matches_type(CardDetails, card_detail, path=["response"])
+
+ @parametrize
+ def test_streaming_response_update(self, client: Increase) -> None:
+ with client.card_details.with_streaming_response.update(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ pin="1234",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ card_detail = response.parse()
+ assert_matches_type(CardDetails, card_detail, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_update(self, client: Increase) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"):
+ client.card_details.with_raw_response.update(
+ card_id="",
+ pin="1234",
+ )
+
+ @parametrize
+ def test_method_create_details_iframe(self, client: Increase) -> None:
+ card_detail = client.card_details.create_details_iframe(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ )
+ assert_matches_type(CardIframeURL, card_detail, path=["response"])
+
+ @parametrize
+ def test_method_create_details_iframe_with_all_params(self, client: Increase) -> None:
+ card_detail = client.card_details.create_details_iframe(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ physical_card_id="physical_card_id",
+ )
+ assert_matches_type(CardIframeURL, card_detail, path=["response"])
+
+ @parametrize
+ def test_raw_response_create_details_iframe(self, client: Increase) -> None:
+ response = client.card_details.with_raw_response.create_details_iframe(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ card_detail = response.parse()
+ assert_matches_type(CardIframeURL, card_detail, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create_details_iframe(self, client: Increase) -> None:
+ with client.card_details.with_streaming_response.create_details_iframe(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ card_detail = response.parse()
+ assert_matches_type(CardIframeURL, card_detail, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_create_details_iframe(self, client: Increase) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"):
+ client.card_details.with_raw_response.create_details_iframe(
+ card_id="",
+ )
+
+ @parametrize
+ def test_method_details(self, client: Increase) -> None:
+ card_detail = client.card_details.details(
+ "card_id",
+ )
+ assert_matches_type(CardDetails, card_detail, path=["response"])
+
+ @parametrize
+ def test_raw_response_details(self, client: Increase) -> None:
+ response = client.card_details.with_raw_response.details(
+ "card_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ card_detail = response.parse()
+ assert_matches_type(CardDetails, card_detail, path=["response"])
+
+ @parametrize
+ def test_streaming_response_details(self, client: Increase) -> None:
+ with client.card_details.with_streaming_response.details(
+ "card_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ card_detail = response.parse()
+ assert_matches_type(CardDetails, card_detail, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_details(self, client: Increase) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"):
+ client.card_details.with_raw_response.details(
+ "",
+ )
+
+
+class TestAsyncCardDetails:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ async def test_method_update(self, async_client: AsyncIncrease) -> None:
+ card_detail = await async_client.card_details.update(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ pin="1234",
+ )
+ assert_matches_type(CardDetails, card_detail, path=["response"])
+
+ @parametrize
+ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None:
+ response = await async_client.card_details.with_raw_response.update(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ pin="1234",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ card_detail = await response.parse()
+ assert_matches_type(CardDetails, card_detail, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None:
+ async with async_client.card_details.with_streaming_response.update(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ pin="1234",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ card_detail = await response.parse()
+ assert_matches_type(CardDetails, card_detail, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_update(self, async_client: AsyncIncrease) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"):
+ await async_client.card_details.with_raw_response.update(
+ card_id="",
+ pin="1234",
+ )
+
+ @parametrize
+ async def test_method_create_details_iframe(self, async_client: AsyncIncrease) -> None:
+ card_detail = await async_client.card_details.create_details_iframe(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ )
+ assert_matches_type(CardIframeURL, card_detail, path=["response"])
+
+ @parametrize
+ async def test_method_create_details_iframe_with_all_params(self, async_client: AsyncIncrease) -> None:
+ card_detail = await async_client.card_details.create_details_iframe(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ physical_card_id="physical_card_id",
+ )
+ assert_matches_type(CardIframeURL, card_detail, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create_details_iframe(self, async_client: AsyncIncrease) -> None:
+ response = await async_client.card_details.with_raw_response.create_details_iframe(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ card_detail = await response.parse()
+ assert_matches_type(CardIframeURL, card_detail, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create_details_iframe(self, async_client: AsyncIncrease) -> None:
+ async with async_client.card_details.with_streaming_response.create_details_iframe(
+ card_id="card_oubs0hwk5rn6knuecxg2",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ card_detail = await response.parse()
+ assert_matches_type(CardIframeURL, card_detail, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_create_details_iframe(self, async_client: AsyncIncrease) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"):
+ await async_client.card_details.with_raw_response.create_details_iframe(
+ card_id="",
+ )
+
+ @parametrize
+ async def test_method_details(self, async_client: AsyncIncrease) -> None:
+ card_detail = await async_client.card_details.details(
+ "card_id",
+ )
+ assert_matches_type(CardDetails, card_detail, path=["response"])
+
+ @parametrize
+ async def test_raw_response_details(self, async_client: AsyncIncrease) -> None:
+ response = await async_client.card_details.with_raw_response.details(
+ "card_id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ card_detail = await response.parse()
+ assert_matches_type(CardDetails, card_detail, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_details(self, async_client: AsyncIncrease) -> None:
+ async with async_client.card_details.with_streaming_response.details(
+ "card_id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ card_detail = await response.parse()
+ assert_matches_type(CardDetails, card_detail, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_details(self, async_client: AsyncIncrease) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"):
+ await async_client.card_details.with_raw_response.details(
+ "",
+ )
diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py
index 9be877a70..3f13e4fdd 100644
--- a/tests/api_resources/test_cards.py
+++ b/tests/api_resources/test_cards.py
@@ -9,11 +9,7 @@
from increase import Increase, AsyncIncrease
from tests.utils import assert_matches_type
-from increase.types import (
- Card,
- CardDetails,
- CardIframeURL,
-)
+from increase.types import Card
from increase._utils import parse_datetime
from increase.pagination import SyncPage, AsyncPage
@@ -138,6 +134,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None:
"phone": "x",
},
entity_id="entity_id",
+ pin="xxxx",
status="active",
)
assert_matches_type(Card, card, path=["response"])
@@ -215,90 +212,6 @@ def test_streaming_response_list(self, client: Increase) -> None:
assert cast(Any, response.is_closed) is True
- @parametrize
- def test_method_create_details_iframe(self, client: Increase) -> None:
- card = client.cards.create_details_iframe(
- card_id="card_oubs0hwk5rn6knuecxg2",
- )
- assert_matches_type(CardIframeURL, card, path=["response"])
-
- @parametrize
- def test_method_create_details_iframe_with_all_params(self, client: Increase) -> None:
- card = client.cards.create_details_iframe(
- card_id="card_oubs0hwk5rn6knuecxg2",
- physical_card_id="physical_card_id",
- )
- assert_matches_type(CardIframeURL, card, path=["response"])
-
- @parametrize
- def test_raw_response_create_details_iframe(self, client: Increase) -> None:
- response = client.cards.with_raw_response.create_details_iframe(
- card_id="card_oubs0hwk5rn6knuecxg2",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- card = response.parse()
- assert_matches_type(CardIframeURL, card, path=["response"])
-
- @parametrize
- def test_streaming_response_create_details_iframe(self, client: Increase) -> None:
- with client.cards.with_streaming_response.create_details_iframe(
- card_id="card_oubs0hwk5rn6knuecxg2",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- card = response.parse()
- assert_matches_type(CardIframeURL, card, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- def test_path_params_create_details_iframe(self, client: Increase) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"):
- client.cards.with_raw_response.create_details_iframe(
- card_id="",
- )
-
- @parametrize
- def test_method_details(self, client: Increase) -> None:
- card = client.cards.details(
- "card_id",
- )
- assert_matches_type(CardDetails, card, path=["response"])
-
- @parametrize
- def test_raw_response_details(self, client: Increase) -> None:
- response = client.cards.with_raw_response.details(
- "card_id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- card = response.parse()
- assert_matches_type(CardDetails, card, path=["response"])
-
- @parametrize
- def test_streaming_response_details(self, client: Increase) -> None:
- with client.cards.with_streaming_response.details(
- "card_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- card = response.parse()
- assert_matches_type(CardDetails, card, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- def test_path_params_details(self, client: Increase) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"):
- client.cards.with_raw_response.details(
- "",
- )
-
class TestAsyncCards:
parametrize = pytest.mark.parametrize(
@@ -420,6 +333,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease)
"phone": "x",
},
entity_id="entity_id",
+ pin="xxxx",
status="active",
)
assert_matches_type(Card, card, path=["response"])
@@ -496,87 +410,3 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non
assert_matches_type(AsyncPage[Card], card, path=["response"])
assert cast(Any, response.is_closed) is True
-
- @parametrize
- async def test_method_create_details_iframe(self, async_client: AsyncIncrease) -> None:
- card = await async_client.cards.create_details_iframe(
- card_id="card_oubs0hwk5rn6knuecxg2",
- )
- assert_matches_type(CardIframeURL, card, path=["response"])
-
- @parametrize
- async def test_method_create_details_iframe_with_all_params(self, async_client: AsyncIncrease) -> None:
- card = await async_client.cards.create_details_iframe(
- card_id="card_oubs0hwk5rn6knuecxg2",
- physical_card_id="physical_card_id",
- )
- assert_matches_type(CardIframeURL, card, path=["response"])
-
- @parametrize
- async def test_raw_response_create_details_iframe(self, async_client: AsyncIncrease) -> None:
- response = await async_client.cards.with_raw_response.create_details_iframe(
- card_id="card_oubs0hwk5rn6knuecxg2",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- card = await response.parse()
- assert_matches_type(CardIframeURL, card, path=["response"])
-
- @parametrize
- async def test_streaming_response_create_details_iframe(self, async_client: AsyncIncrease) -> None:
- async with async_client.cards.with_streaming_response.create_details_iframe(
- card_id="card_oubs0hwk5rn6knuecxg2",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- card = await response.parse()
- assert_matches_type(CardIframeURL, card, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- async def test_path_params_create_details_iframe(self, async_client: AsyncIncrease) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"):
- await async_client.cards.with_raw_response.create_details_iframe(
- card_id="",
- )
-
- @parametrize
- async def test_method_details(self, async_client: AsyncIncrease) -> None:
- card = await async_client.cards.details(
- "card_id",
- )
- assert_matches_type(CardDetails, card, path=["response"])
-
- @parametrize
- async def test_raw_response_details(self, async_client: AsyncIncrease) -> None:
- response = await async_client.cards.with_raw_response.details(
- "card_id",
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- card = await response.parse()
- assert_matches_type(CardDetails, card, path=["response"])
-
- @parametrize
- async def test_streaming_response_details(self, async_client: AsyncIncrease) -> None:
- async with async_client.cards.with_streaming_response.details(
- "card_id",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- card = await response.parse()
- assert_matches_type(CardDetails, card, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- async def test_path_params_details(self, async_client: AsyncIncrease) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"):
- await async_client.cards.with_raw_response.details(
- "",
- )
From 52d91195f934a00ea8ea96e157cd5b5541ed2b4e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 19 Sep 2025 20:17:44 +0000
Subject: [PATCH 3/3] release: 0.333.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 13 +++++++++++++
pyproject.toml | 2 +-
src/increase/_version.py | 2 +-
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index e4f54275b..4e9c70e85 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.332.0"
+ ".": "0.333.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a55d56056..541dc3be5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,18 @@
# Changelog
+## 0.333.0 (2025-09-19)
+
+Full Changelog: [v0.332.0...v0.333.0](https://github.com/Increase/increase-python/compare/v0.332.0...v0.333.0)
+
+### Features
+
+* **api:** api update ([30dbad1](https://github.com/Increase/increase-python/commit/30dbad15f8b552e52e70c3b75a619f121abe89ff))
+
+
+### Chores
+
+* do not install brew dependencies in ./scripts/bootstrap by default ([a03616d](https://github.com/Increase/increase-python/commit/a03616d1719be5e408433ec751cd7d3aba5aa291))
+
## 0.332.0 (2025-09-19)
Full Changelog: [v0.331.0...v0.332.0](https://github.com/Increase/increase-python/compare/v0.331.0...v0.332.0)
diff --git a/pyproject.toml b/pyproject.toml
index e2dc43124..10651cc42 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "increase"
-version = "0.332.0"
+version = "0.333.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 2f0ca575f..fa330d6ba 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.332.0" # x-release-please-version
+__version__ = "0.333.0" # x-release-please-version