From ab37786fa3bb4c75a4e96119895b4ee561a1c32c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 21:53:32 +0000 Subject: [PATCH 1/3] chore(internal): update pyright exclude list --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 044be8c7e..acc20ad46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,6 +148,7 @@ exclude = [ "_dev", ".venv", ".nox", + ".git", ] reportImplicitOverride = true From 55910913cc6c2ab91564cd9a3449956d068ce654 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 23:19:23 +0000 Subject: [PATCH 2/3] feat(api): api update --- .stats.yml | 6 +- api.md | 10 +- .../resources/simulations/__init__.py | 26 ++--- ...funds_holds.py => pending_transactions.py} | 102 ++++++++--------- .../resources/simulations/simulations.py | 38 +++---- src/increase/types/simulations/__init__.py | 1 - .../inbound_funds_hold_release_response.py | 67 ----------- .../simulations/test_inbound_funds_holds.py | 100 ----------------- .../simulations/test_pending_transactions.py | 104 ++++++++++++++++++ 9 files changed, 193 insertions(+), 261 deletions(-) rename src/increase/resources/simulations/{inbound_funds_holds.py => pending_transactions.py} (55%) delete mode 100644 src/increase/types/simulations/inbound_funds_hold_release_response.py delete mode 100644 tests/api_resources/simulations/test_inbound_funds_holds.py create mode 100644 tests/api_resources/simulations/test_pending_transactions.py diff --git a/.stats.yml b/.stats.yml index 28f0f87b7..d35c27b7d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-740517a6a575bb225c5bfa111ab83611c58533d5b1514f505aab22185f4a8992.yml -openapi_spec_hash: 8bfd6dcf11d076c24e4f092dc7e151ac -config_hash: 29e452035e915a07cd64333b10a83077 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b6c7f7c551cd8635ddf3fa27eb1040a4e3888c8190326472c19fd919a5e2c8c5.yml +openapi_spec_hash: 287cbadcab1cec9f352da22a4e39c160 +config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/api.md b/api.md index 0ea4874f9..cea4bd9f7 100644 --- a/api.md +++ b/api.md @@ -858,17 +858,11 @@ Methods: - client.simulations.digital_wallet_token_requests.create(\*\*params) -> DigitalWalletTokenRequestCreateResponse -## InboundFundsHolds - -Types: - -```python -from increase.types.simulations import InboundFundsHoldReleaseResponse -``` +## PendingTransactions Methods: -- client.simulations.inbound_funds_holds.release(inbound_funds_hold_id) -> InboundFundsHoldReleaseResponse +- client.simulations.pending_transactions.release_inbound_funds_hold(pending_transaction_id) -> PendingTransaction ## AccountTransfers diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index fc5a02d8c..fddc2a393 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -152,13 +152,13 @@ CardAuthorizationsResourceWithStreamingResponse, AsyncCardAuthorizationsResourceWithStreamingResponse, ) -from .inbound_funds_holds import ( - InboundFundsHoldsResource, - AsyncInboundFundsHoldsResource, - InboundFundsHoldsResourceWithRawResponse, - AsyncInboundFundsHoldsResourceWithRawResponse, - InboundFundsHoldsResourceWithStreamingResponse, - AsyncInboundFundsHoldsResourceWithStreamingResponse, +from .pending_transactions import ( + PendingTransactionsResource, + AsyncPendingTransactionsResource, + PendingTransactionsResourceWithRawResponse, + AsyncPendingTransactionsResourceWithRawResponse, + PendingTransactionsResourceWithStreamingResponse, + AsyncPendingTransactionsResourceWithStreamingResponse, ) from .inbound_ach_transfers import ( InboundACHTransfersResource, @@ -308,12 +308,12 @@ "AsyncDigitalWalletTokenRequestsResourceWithRawResponse", "DigitalWalletTokenRequestsResourceWithStreamingResponse", "AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse", - "InboundFundsHoldsResource", - "AsyncInboundFundsHoldsResource", - "InboundFundsHoldsResourceWithRawResponse", - "AsyncInboundFundsHoldsResourceWithRawResponse", - "InboundFundsHoldsResourceWithStreamingResponse", - "AsyncInboundFundsHoldsResourceWithStreamingResponse", + "PendingTransactionsResource", + "AsyncPendingTransactionsResource", + "PendingTransactionsResourceWithRawResponse", + "AsyncPendingTransactionsResourceWithRawResponse", + "PendingTransactionsResourceWithStreamingResponse", + "AsyncPendingTransactionsResourceWithStreamingResponse", "AccountTransfersResource", "AsyncAccountTransfersResource", "AccountTransfersResourceWithRawResponse", diff --git a/src/increase/resources/simulations/inbound_funds_holds.py b/src/increase/resources/simulations/pending_transactions.py similarity index 55% rename from src/increase/resources/simulations/inbound_funds_holds.py rename to src/increase/resources/simulations/pending_transactions.py index 7a1a9be3d..8124c03d8 100644 --- a/src/increase/resources/simulations/inbound_funds_holds.py +++ b/src/increase/resources/simulations/pending_transactions.py @@ -14,34 +14,34 @@ async_to_streamed_response_wrapper, ) from ..._base_client import make_request_options -from ...types.simulations.inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse +from ...types.pending_transaction import PendingTransaction -__all__ = ["InboundFundsHoldsResource", "AsyncInboundFundsHoldsResource"] +__all__ = ["PendingTransactionsResource", "AsyncPendingTransactionsResource"] -class InboundFundsHoldsResource(SyncAPIResource): +class PendingTransactionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundFundsHoldsResourceWithRawResponse: + def with_raw_response(self) -> PendingTransactionsResourceWithRawResponse: """ 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 InboundFundsHoldsResourceWithRawResponse(self) + return PendingTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundFundsHoldsResourceWithStreamingResponse: + def with_streaming_response(self) -> PendingTransactionsResourceWithStreamingResponse: """ 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 InboundFundsHoldsResourceWithStreamingResponse(self) + return PendingTransactionsResourceWithStreamingResponse(self) - def release( + def release_inbound_funds_hold( self, - inbound_funds_hold_id: str, + pending_transaction_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. @@ -50,13 +50,14 @@ def release( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundFundsHoldReleaseResponse: + ) -> PendingTransaction: """ This endpoint simulates immediately releasing an Inbound Funds Hold, which might - be created as a result of e.g., an ACH debit. + be created as a result of, for example, an ACH debit. Args: - inbound_funds_hold_id: The inbound funds hold to release. + pending_transaction_id: The pending transaction to release. The pending transaction must have a + `inbound_funds_hold` source. extra_headers: Send extra headers @@ -68,12 +69,12 @@ def release( idempotency_key: Specify a custom idempotency key for this request """ - if not inbound_funds_hold_id: + if not pending_transaction_id: raise ValueError( - f"Expected a non-empty value for `inbound_funds_hold_id` but received {inbound_funds_hold_id!r}" + f"Expected a non-empty value for `pending_transaction_id` but received {pending_transaction_id!r}" ) return self._post( - f"/simulations/inbound_funds_holds/{inbound_funds_hold_id}/release", + f"/simulations/pending_transactions/{pending_transaction_id}/release_inbound_funds_hold", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -81,33 +82,33 @@ def release( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundFundsHoldReleaseResponse, + cast_to=PendingTransaction, ) -class AsyncInboundFundsHoldsResource(AsyncAPIResource): +class AsyncPendingTransactionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: + def with_raw_response(self) -> AsyncPendingTransactionsResourceWithRawResponse: """ 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 AsyncInboundFundsHoldsResourceWithRawResponse(self) + return AsyncPendingTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: + def with_streaming_response(self) -> AsyncPendingTransactionsResourceWithStreamingResponse: """ 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 AsyncInboundFundsHoldsResourceWithStreamingResponse(self) + return AsyncPendingTransactionsResourceWithStreamingResponse(self) - async def release( + async def release_inbound_funds_hold( self, - inbound_funds_hold_id: str, + pending_transaction_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. @@ -116,13 +117,14 @@ async def release( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundFundsHoldReleaseResponse: + ) -> PendingTransaction: """ This endpoint simulates immediately releasing an Inbound Funds Hold, which might - be created as a result of e.g., an ACH debit. + be created as a result of, for example, an ACH debit. Args: - inbound_funds_hold_id: The inbound funds hold to release. + pending_transaction_id: The pending transaction to release. The pending transaction must have a + `inbound_funds_hold` source. extra_headers: Send extra headers @@ -134,12 +136,12 @@ async def release( idempotency_key: Specify a custom idempotency key for this request """ - if not inbound_funds_hold_id: + if not pending_transaction_id: raise ValueError( - f"Expected a non-empty value for `inbound_funds_hold_id` but received {inbound_funds_hold_id!r}" + f"Expected a non-empty value for `pending_transaction_id` but received {pending_transaction_id!r}" ) return await self._post( - f"/simulations/inbound_funds_holds/{inbound_funds_hold_id}/release", + f"/simulations/pending_transactions/{pending_transaction_id}/release_inbound_funds_hold", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -147,41 +149,41 @@ async def release( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundFundsHoldReleaseResponse, + cast_to=PendingTransaction, ) -class InboundFundsHoldsResourceWithRawResponse: - def __init__(self, inbound_funds_holds: InboundFundsHoldsResource) -> None: - self._inbound_funds_holds = inbound_funds_holds +class PendingTransactionsResourceWithRawResponse: + def __init__(self, pending_transactions: PendingTransactionsResource) -> None: + self._pending_transactions = pending_transactions - self.release = to_raw_response_wrapper( - inbound_funds_holds.release, + self.release_inbound_funds_hold = to_raw_response_wrapper( + pending_transactions.release_inbound_funds_hold, ) -class AsyncInboundFundsHoldsResourceWithRawResponse: - def __init__(self, inbound_funds_holds: AsyncInboundFundsHoldsResource) -> None: - self._inbound_funds_holds = inbound_funds_holds +class AsyncPendingTransactionsResourceWithRawResponse: + def __init__(self, pending_transactions: AsyncPendingTransactionsResource) -> None: + self._pending_transactions = pending_transactions - self.release = async_to_raw_response_wrapper( - inbound_funds_holds.release, + self.release_inbound_funds_hold = async_to_raw_response_wrapper( + pending_transactions.release_inbound_funds_hold, ) -class InboundFundsHoldsResourceWithStreamingResponse: - def __init__(self, inbound_funds_holds: InboundFundsHoldsResource) -> None: - self._inbound_funds_holds = inbound_funds_holds +class PendingTransactionsResourceWithStreamingResponse: + def __init__(self, pending_transactions: PendingTransactionsResource) -> None: + self._pending_transactions = pending_transactions - self.release = to_streamed_response_wrapper( - inbound_funds_holds.release, + self.release_inbound_funds_hold = to_streamed_response_wrapper( + pending_transactions.release_inbound_funds_hold, ) -class AsyncInboundFundsHoldsResourceWithStreamingResponse: - def __init__(self, inbound_funds_holds: AsyncInboundFundsHoldsResource) -> None: - self._inbound_funds_holds = inbound_funds_holds +class AsyncPendingTransactionsResourceWithStreamingResponse: + def __init__(self, pending_transactions: AsyncPendingTransactionsResource) -> None: + self._pending_transactions = pending_transactions - self.release = async_to_streamed_response_wrapper( - inbound_funds_holds.release, + self.release_inbound_funds_hold = async_to_streamed_response_wrapper( + pending_transactions.release_inbound_funds_hold, ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 2dd37a337..977defe5c 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -148,13 +148,13 @@ CardAuthorizationsResourceWithStreamingResponse, AsyncCardAuthorizationsResourceWithStreamingResponse, ) -from .inbound_funds_holds import ( - InboundFundsHoldsResource, - AsyncInboundFundsHoldsResource, - InboundFundsHoldsResourceWithRawResponse, - AsyncInboundFundsHoldsResourceWithRawResponse, - InboundFundsHoldsResourceWithStreamingResponse, - AsyncInboundFundsHoldsResourceWithStreamingResponse, +from .pending_transactions import ( + PendingTransactionsResource, + AsyncPendingTransactionsResource, + PendingTransactionsResourceWithRawResponse, + AsyncPendingTransactionsResourceWithRawResponse, + PendingTransactionsResourceWithStreamingResponse, + AsyncPendingTransactionsResourceWithStreamingResponse, ) from .inbound_ach_transfers import ( InboundACHTransfersResource, @@ -286,8 +286,8 @@ def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResource: return DigitalWalletTokenRequestsResource(self._client) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsResource: - return InboundFundsHoldsResource(self._client) + def pending_transactions(self) -> PendingTransactionsResource: + return PendingTransactionsResource(self._client) @cached_property def account_transfers(self) -> AccountTransfersResource: @@ -423,8 +423,8 @@ def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResour return AsyncDigitalWalletTokenRequestsResource(self._client) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResource: - return AsyncInboundFundsHoldsResource(self._client) + def pending_transactions(self) -> AsyncPendingTransactionsResource: + return AsyncPendingTransactionsResource(self._client) @cached_property def account_transfers(self) -> AsyncAccountTransfersResource: @@ -563,8 +563,8 @@ def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWit return DigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithRawResponse: - return InboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) + def pending_transactions(self) -> PendingTransactionsResourceWithRawResponse: + return PendingTransactionsResourceWithRawResponse(self._simulations.pending_transactions) @cached_property def account_transfers(self) -> AccountTransfersResourceWithRawResponse: @@ -688,8 +688,8 @@ def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResour return AsyncDigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: - return AsyncInboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) + def pending_transactions(self) -> AsyncPendingTransactionsResourceWithRawResponse: + return AsyncPendingTransactionsResourceWithRawResponse(self._simulations.pending_transactions) @cached_property def account_transfers(self) -> AsyncAccountTransfersResourceWithRawResponse: @@ -813,8 +813,8 @@ def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWit return DigitalWalletTokenRequestsResourceWithStreamingResponse(self._simulations.digital_wallet_token_requests) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithStreamingResponse: - return InboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) + def pending_transactions(self) -> PendingTransactionsResourceWithStreamingResponse: + return PendingTransactionsResourceWithStreamingResponse(self._simulations.pending_transactions) @cached_property def account_transfers(self) -> AccountTransfersResourceWithStreamingResponse: @@ -942,8 +942,8 @@ def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResour ) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: - return AsyncInboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) + def pending_transactions(self) -> AsyncPendingTransactionsResourceWithStreamingResponse: + return AsyncPendingTransactionsResourceWithStreamingResponse(self._simulations.pending_transactions) @cached_property def account_transfers(self) -> AsyncAccountTransfersResourceWithStreamingResponse: diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index f7a621737..bb4acb5a0 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -18,7 +18,6 @@ from .card_authorization_create_response import CardAuthorizationCreateResponse as CardAuthorizationCreateResponse from .inbound_ach_transfer_create_params import InboundACHTransferCreateParams as InboundACHTransferCreateParams from .inbound_check_deposit_create_params import InboundCheckDepositCreateParams as InboundCheckDepositCreateParams -from .inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse as InboundFundsHoldReleaseResponse from .inbound_wire_transfer_create_params import InboundWireTransferCreateParams as InboundWireTransferCreateParams from .card_fuel_confirmation_create_params import CardFuelConfirmationCreateParams as CardFuelConfirmationCreateParams from .physical_card_advance_shipment_params import ( diff --git a/src/increase/types/simulations/inbound_funds_hold_release_response.py b/src/increase/types/simulations/inbound_funds_hold_release_response.py deleted file mode 100644 index ae8d93d3e..000000000 --- a/src/increase/types/simulations/inbound_funds_hold_release_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["InboundFundsHoldReleaseResponse"] - - -class InboundFundsHoldReleaseResponse(BaseModel): - id: str - """The Inbound Funds Hold identifier.""" - - amount: int - """The held amount in the minor unit of the account's currency. - - For dollars, for example, this is cents. - """ - - automatically_releases_at: datetime - """When the hold will be released automatically. - - Certain conditions may cause it to be released before this time. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the hold - was created. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - held_transaction_id: Optional[str] = None - """The ID of the Transaction for which funds were held.""" - - pending_transaction_id: Optional[str] = None - """The ID of the Pending Transaction representing the held funds.""" - - released_at: Optional[datetime] = None - """When the hold was released (if it has been released).""" - - status: Literal["held", "complete"] - """The status of the hold. - - - `held` - Funds are still being held. - - `complete` - Funds have been released. - """ - - type: Literal["inbound_funds_hold"] - """A constant representing the object's type. - - For this resource it will always be `inbound_funds_hold`. - """ diff --git a/tests/api_resources/simulations/test_inbound_funds_holds.py b/tests/api_resources/simulations/test_inbound_funds_holds.py deleted file mode 100644 index e3dd90b01..000000000 --- a/tests/api_resources/simulations/test_inbound_funds_holds.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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.simulations import InboundFundsHoldReleaseResponse - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestInboundFundsHolds: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_release(self, client: Increase) -> None: - inbound_funds_hold = client.simulations.inbound_funds_holds.release( - "inbound_funds_hold_id", - ) - assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) - - @parametrize - def test_raw_response_release(self, client: Increase) -> None: - response = client.simulations.inbound_funds_holds.with_raw_response.release( - "inbound_funds_hold_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_funds_hold = response.parse() - assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) - - @parametrize - def test_streaming_response_release(self, client: Increase) -> None: - with client.simulations.inbound_funds_holds.with_streaming_response.release( - "inbound_funds_hold_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_funds_hold = response.parse() - assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_release(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `inbound_funds_hold_id` but received ''"): - client.simulations.inbound_funds_holds.with_raw_response.release( - "", - ) - - -class TestAsyncInboundFundsHolds: - parametrize = pytest.mark.parametrize( - "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] - ) - - @parametrize - async def test_method_release(self, async_client: AsyncIncrease) -> None: - inbound_funds_hold = await async_client.simulations.inbound_funds_holds.release( - "inbound_funds_hold_id", - ) - assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) - - @parametrize - async def test_raw_response_release(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.inbound_funds_holds.with_raw_response.release( - "inbound_funds_hold_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_funds_hold = await response.parse() - assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) - - @parametrize - async def test_streaming_response_release(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.inbound_funds_holds.with_streaming_response.release( - "inbound_funds_hold_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_funds_hold = await response.parse() - assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_release(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `inbound_funds_hold_id` but received ''"): - await async_client.simulations.inbound_funds_holds.with_raw_response.release( - "", - ) diff --git a/tests/api_resources/simulations/test_pending_transactions.py b/tests/api_resources/simulations/test_pending_transactions.py new file mode 100644 index 000000000..21ea3aa43 --- /dev/null +++ b/tests/api_resources/simulations/test_pending_transactions.py @@ -0,0 +1,104 @@ +# 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 PendingTransaction + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestPendingTransactions: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_release_inbound_funds_hold(self, client: Increase) -> None: + pending_transaction = client.simulations.pending_transactions.release_inbound_funds_hold( + "pending_transaction_id", + ) + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + def test_raw_response_release_inbound_funds_hold(self, client: Increase) -> None: + response = client.simulations.pending_transactions.with_raw_response.release_inbound_funds_hold( + "pending_transaction_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + pending_transaction = response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + def test_streaming_response_release_inbound_funds_hold(self, client: Increase) -> None: + with client.simulations.pending_transactions.with_streaming_response.release_inbound_funds_hold( + "pending_transaction_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + pending_transaction = response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_release_inbound_funds_hold(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `pending_transaction_id` but received ''" + ): + client.simulations.pending_transactions.with_raw_response.release_inbound_funds_hold( + "", + ) + + +class TestAsyncPendingTransactions: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_release_inbound_funds_hold(self, async_client: AsyncIncrease) -> None: + pending_transaction = await async_client.simulations.pending_transactions.release_inbound_funds_hold( + "pending_transaction_id", + ) + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + async def test_raw_response_release_inbound_funds_hold(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.pending_transactions.with_raw_response.release_inbound_funds_hold( + "pending_transaction_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + pending_transaction = await response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + async def test_streaming_response_release_inbound_funds_hold(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.pending_transactions.with_streaming_response.release_inbound_funds_hold( + "pending_transaction_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + pending_transaction = await response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_release_inbound_funds_hold(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `pending_transaction_id` but received ''" + ): + await async_client.simulations.pending_transactions.with_raw_response.release_inbound_funds_hold( + "", + ) From 13b915f2d7ffabcf81045a54afeb24362d2b8946 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 23:19:46 +0000 Subject: [PATCH 3/3] release: 0.301.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 87081a10a..529f1380a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.300.0" + ".": "0.301.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index fc3db5994..7a4bfc4f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.301.0 (2025-08-26) + +Full Changelog: [v0.300.0...v0.301.0](https://github.com/Increase/increase-python/compare/v0.300.0...v0.301.0) + +### Features + +* **api:** api update ([5591091](https://github.com/Increase/increase-python/commit/55910913cc6c2ab91564cd9a3449956d068ce654)) + + +### Chores + +* **internal:** update pyright exclude list ([ab37786](https://github.com/Increase/increase-python/commit/ab37786fa3bb4c75a4e96119895b4ee561a1c32c)) + ## 0.300.0 (2025-08-26) Full Changelog: [v0.299.0...v0.300.0](https://github.com/Increase/increase-python/compare/v0.299.0...v0.300.0) diff --git a/pyproject.toml b/pyproject.toml index acc20ad46..65c348c95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.300.0" +version = "0.301.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 0ad13f7e2..b5d976a92 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.300.0" # x-release-please-version +__version__ = "0.301.0" # x-release-please-version