From cdcd4d1c3d3f1d99e10ea1cb09c1d9d9060a8c3b Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Tue, 16 Apr 2024 06:04:29 +0000 Subject: [PATCH] feat(api): add /inbound_check_deposits endpoints --- .stats.yml | 2 +- api.md | 20 +- src/increase/_client.py | 10 + src/increase/resources/__init__.py | 14 + src/increase/resources/exports.py | 26 ++ .../resources/inbound_check_deposits.py | 270 ++++++++++++++++++ .../resources/simulations/__init__.py | 14 + .../resources/simulations/check_transfers.py | 100 ------- .../simulations/inbound_check_deposits.py | 198 +++++++++++++ .../resources/simulations/simulations.py | 32 +++ .../resources/wire_drawdown_requests.py | 38 +++ src/increase/types/__init__.py | 2 + src/increase/types/check_transfer.py | 6 + src/increase/types/declined_transaction.py | 11 + src/increase/types/export_list_params.py | 82 +++++- src/increase/types/inbound_check_deposit.py | 91 ++++++ .../inbound_check_deposit_list_params.py | 53 ++++ src/increase/types/simulations/__init__.py | 1 + .../card_authorization_simulation.py | 11 + .../inbound_check_deposit_create_params.py | 18 ++ ...ime_payments_transfer_simulation_result.py | 19 +- src/increase/types/transaction.py | 8 +- .../wire_drawdown_request_list_params.py | 21 +- .../simulations/test_check_transfers.py | 76 ----- .../test_inbound_check_deposits.py | 96 +++++++ tests/api_resources/test_exports.py | 18 ++ .../test_inbound_check_deposits.py | 184 ++++++++++++ .../test_wire_drawdown_requests.py | 4 + 28 files changed, 1242 insertions(+), 183 deletions(-) create mode 100644 src/increase/resources/inbound_check_deposits.py create mode 100644 src/increase/resources/simulations/inbound_check_deposits.py create mode 100644 src/increase/types/inbound_check_deposit.py create mode 100644 src/increase/types/inbound_check_deposit_list_params.py create mode 100644 src/increase/types/simulations/inbound_check_deposit_create_params.py create mode 100644 tests/api_resources/simulations/test_inbound_check_deposits.py create mode 100644 tests/api_resources/test_inbound_check_deposits.py diff --git a/.stats.yml b/.stats.yml index e2365cb8d..b1d0d6491 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1 @@ -configured_endpoints: 184 +configured_endpoints: 186 diff --git a/api.md b/api.md index 212bf7815..8d8910595 100644 --- a/api.md +++ b/api.md @@ -569,7 +569,6 @@ Methods: Methods: -- client.simulations.check_transfers.deposit(check_transfer_id) -> CheckTransfer - client.simulations.check_transfers.mail(check_transfer_id) -> CheckTransfer ## Documents @@ -666,6 +665,12 @@ Methods: - client.simulations.physical_cards.shipment_advance(physical_card_id, \*\*params) -> PhysicalCard +## InboundCheckDeposits + +Methods: + +- client.simulations.inbound_check_deposits.create(\*\*params) -> InboundCheckDeposit + # PhysicalCards Types: @@ -835,3 +840,16 @@ Methods: - client.physical_card_profiles.list(\*\*params) -> SyncPage[PhysicalCardProfile] - client.physical_card_profiles.archive(physical_card_profile_id) -> PhysicalCardProfile - client.physical_card_profiles.clone(physical_card_profile_id, \*\*params) -> PhysicalCardProfile + +# InboundCheckDeposits + +Types: + +```python +from increase.types import InboundCheckDeposit +``` + +Methods: + +- client.inbound_check_deposits.retrieve(inbound_check_deposit_id) -> InboundCheckDeposit +- client.inbound_check_deposits.list(\*\*params) -> SyncPage[InboundCheckDeposit] diff --git a/src/increase/_client.py b/src/increase/_client.py index b7735bbc4..25a97da7e 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -103,6 +103,7 @@ class Increase(SyncAPIClient): inbound_wire_transfers: resources.InboundWireTransfers digital_card_profiles: resources.DigitalCardProfiles physical_card_profiles: resources.PhysicalCardProfiles + inbound_check_deposits: resources.InboundCheckDeposits with_raw_response: IncreaseWithRawResponse with_streaming_response: IncreaseWithStreamedResponse @@ -249,6 +250,7 @@ def __init__( self.inbound_wire_transfers = resources.InboundWireTransfers(self) self.digital_card_profiles = resources.DigitalCardProfiles(self) self.physical_card_profiles = resources.PhysicalCardProfiles(self) + self.inbound_check_deposits = resources.InboundCheckDeposits(self) self.with_raw_response = IncreaseWithRawResponse(self) self.with_streaming_response = IncreaseWithStreamedResponse(self) @@ -472,6 +474,7 @@ class AsyncIncrease(AsyncAPIClient): inbound_wire_transfers: resources.AsyncInboundWireTransfers digital_card_profiles: resources.AsyncDigitalCardProfiles physical_card_profiles: resources.AsyncPhysicalCardProfiles + inbound_check_deposits: resources.AsyncInboundCheckDeposits with_raw_response: AsyncIncreaseWithRawResponse with_streaming_response: AsyncIncreaseWithStreamedResponse @@ -618,6 +621,7 @@ def __init__( self.inbound_wire_transfers = resources.AsyncInboundWireTransfers(self) self.digital_card_profiles = resources.AsyncDigitalCardProfiles(self) self.physical_card_profiles = resources.AsyncPhysicalCardProfiles(self) + self.inbound_check_deposits = resources.AsyncInboundCheckDeposits(self) self.with_raw_response = AsyncIncreaseWithRawResponse(self) self.with_streaming_response = AsyncIncreaseWithStreamedResponse(self) @@ -856,6 +860,7 @@ def __init__(self, client: Increase) -> None: self.inbound_wire_transfers = resources.InboundWireTransfersWithRawResponse(client.inbound_wire_transfers) self.digital_card_profiles = resources.DigitalCardProfilesWithRawResponse(client.digital_card_profiles) self.physical_card_profiles = resources.PhysicalCardProfilesWithRawResponse(client.physical_card_profiles) + self.inbound_check_deposits = resources.InboundCheckDepositsWithRawResponse(client.inbound_check_deposits) class AsyncIncreaseWithRawResponse: @@ -920,6 +925,7 @@ def __init__(self, client: AsyncIncrease) -> None: self.inbound_wire_transfers = resources.AsyncInboundWireTransfersWithRawResponse(client.inbound_wire_transfers) self.digital_card_profiles = resources.AsyncDigitalCardProfilesWithRawResponse(client.digital_card_profiles) self.physical_card_profiles = resources.AsyncPhysicalCardProfilesWithRawResponse(client.physical_card_profiles) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsWithRawResponse(client.inbound_check_deposits) class IncreaseWithStreamedResponse: @@ -986,6 +992,7 @@ def __init__(self, client: Increase) -> None: self.inbound_wire_transfers = resources.InboundWireTransfersWithStreamingResponse(client.inbound_wire_transfers) self.digital_card_profiles = resources.DigitalCardProfilesWithStreamingResponse(client.digital_card_profiles) self.physical_card_profiles = resources.PhysicalCardProfilesWithStreamingResponse(client.physical_card_profiles) + self.inbound_check_deposits = resources.InboundCheckDepositsWithStreamingResponse(client.inbound_check_deposits) class AsyncIncreaseWithStreamedResponse: @@ -1068,6 +1075,9 @@ def __init__(self, client: AsyncIncrease) -> None: self.physical_card_profiles = resources.AsyncPhysicalCardProfilesWithStreamingResponse( client.physical_card_profiles ) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsWithStreamingResponse( + client.inbound_check_deposits + ) Client = Increase diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index cb0f386e3..19d6e2f27 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -296,6 +296,14 @@ BookkeepingEntrySetsWithStreamingResponse, AsyncBookkeepingEntrySetsWithStreamingResponse, ) +from .inbound_check_deposits import ( + InboundCheckDeposits, + AsyncInboundCheckDeposits, + InboundCheckDepositsWithRawResponse, + AsyncInboundCheckDepositsWithRawResponse, + InboundCheckDepositsWithStreamingResponse, + AsyncInboundCheckDepositsWithStreamingResponse, +) from .inbound_wire_transfers import ( InboundWireTransfers, AsyncInboundWireTransfers, @@ -646,4 +654,10 @@ "AsyncPhysicalCardProfilesWithRawResponse", "PhysicalCardProfilesWithStreamingResponse", "AsyncPhysicalCardProfilesWithStreamingResponse", + "InboundCheckDeposits", + "AsyncInboundCheckDeposits", + "InboundCheckDepositsWithRawResponse", + "AsyncInboundCheckDepositsWithRawResponse", + "InboundCheckDepositsWithStreamingResponse", + "AsyncInboundCheckDepositsWithStreamingResponse", ] diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 5383ac398..f9994bb78 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -153,8 +153,12 @@ def retrieve( def list( self, *, + category: export_list_params.Category | NotGiven = NOT_GIVEN, + created_at: export_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: export_list_params.Status | NotGiven = NOT_GIVEN, # 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, @@ -168,6 +172,11 @@ def list( Args: cursor: Return the page of entries after this one. + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. @@ -189,8 +198,12 @@ def list( timeout=timeout, query=maybe_transform( { + "category": category, + "created_at": created_at, "cursor": cursor, + "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, export_list_params.ExportListParams, ), @@ -327,8 +340,12 @@ async def retrieve( def list( self, *, + category: export_list_params.Category | NotGiven = NOT_GIVEN, + created_at: export_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: export_list_params.Status | NotGiven = NOT_GIVEN, # 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, @@ -342,6 +359,11 @@ def list( Args: cursor: Return the page of entries after this one. + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. @@ -363,8 +385,12 @@ def list( timeout=timeout, query=maybe_transform( { + "category": category, + "created_at": created_at, "cursor": cursor, + "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, export_list_params.ExportListParams, ), diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py new file mode 100644 index 000000000..ad1862689 --- /dev/null +++ b/src/increase/resources/inbound_check_deposits.py @@ -0,0 +1,270 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from .. import _legacy_response +from ..types import InboundCheckDeposit, inbound_check_deposit_list_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..pagination import SyncPage, AsyncPage +from .._base_client import ( + AsyncPaginator, + make_request_options, +) + +__all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] + + +class InboundCheckDeposits(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundCheckDepositsWithRawResponse: + return InboundCheckDepositsWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundCheckDepositsWithStreamingResponse: + return InboundCheckDepositsWithStreamingResponse(self) + + def retrieve( + self, + inbound_check_deposit_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, + ) -> InboundCheckDeposit: + """ + Retrieve an Inbound Check Deposit + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to get 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 inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return self._get( + f"/inbound_check_deposits/{inbound_check_deposit_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=InboundCheckDeposit, + ) + + def list( + self, + *, + account_id: str | NotGiven = NOT_GIVEN, + created_at: inbound_check_deposit_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # 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, + ) -> SyncPage[InboundCheckDeposit]: + """ + List Inbound Check Deposits + + Args: + account_id: Filter Inbound Check Deposits to those belonging to the specified Account. + + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + 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 + """ + return self._get_api_list( + "/inbound_check_deposits", + page=SyncPage[InboundCheckDeposit], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "limit": limit, + }, + inbound_check_deposit_list_params.InboundCheckDepositListParams, + ), + ), + model=InboundCheckDeposit, + ) + + +class AsyncInboundCheckDeposits(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundCheckDepositsWithRawResponse: + return AsyncInboundCheckDepositsWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundCheckDepositsWithStreamingResponse: + return AsyncInboundCheckDepositsWithStreamingResponse(self) + + async def retrieve( + self, + inbound_check_deposit_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, + ) -> InboundCheckDeposit: + """ + Retrieve an Inbound Check Deposit + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to get 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 inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return await self._get( + f"/inbound_check_deposits/{inbound_check_deposit_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=InboundCheckDeposit, + ) + + def list( + self, + *, + account_id: str | NotGiven = NOT_GIVEN, + created_at: inbound_check_deposit_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # 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, + ) -> AsyncPaginator[InboundCheckDeposit, AsyncPage[InboundCheckDeposit]]: + """ + List Inbound Check Deposits + + Args: + account_id: Filter Inbound Check Deposits to those belonging to the specified Account. + + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + 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 + """ + return self._get_api_list( + "/inbound_check_deposits", + page=AsyncPage[InboundCheckDeposit], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "limit": limit, + }, + inbound_check_deposit_list_params.InboundCheckDepositListParams, + ), + ), + model=InboundCheckDeposit, + ) + + +class InboundCheckDepositsWithRawResponse: + def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.retrieve = _legacy_response.to_raw_response_wrapper( + inbound_check_deposits.retrieve, + ) + self.list = _legacy_response.to_raw_response_wrapper( + inbound_check_deposits.list, + ) + + +class AsyncInboundCheckDepositsWithRawResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.retrieve = _legacy_response.async_to_raw_response_wrapper( + inbound_check_deposits.retrieve, + ) + self.list = _legacy_response.async_to_raw_response_wrapper( + inbound_check_deposits.list, + ) + + +class InboundCheckDepositsWithStreamingResponse: + def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.retrieve = to_streamed_response_wrapper( + inbound_check_deposits.retrieve, + ) + self.list = to_streamed_response_wrapper( + inbound_check_deposits.list, + ) + + +class AsyncInboundCheckDepositsWithStreamingResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.retrieve = async_to_streamed_response_wrapper( + inbound_check_deposits.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + inbound_check_deposits.list, + ) diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index a5b69dad3..7fa844bf6 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -120,6 +120,14 @@ InboundFundsHoldsWithStreamingResponse, AsyncInboundFundsHoldsWithStreamingResponse, ) +from .inbound_check_deposits import ( + InboundCheckDeposits, + AsyncInboundCheckDeposits, + InboundCheckDepositsWithRawResponse, + AsyncInboundCheckDepositsWithRawResponse, + InboundCheckDepositsWithStreamingResponse, + AsyncInboundCheckDepositsWithStreamingResponse, +) from .real_time_payments_transfers import ( RealTimePaymentsTransfers, AsyncRealTimePaymentsTransfers, @@ -248,6 +256,12 @@ "AsyncPhysicalCardsWithRawResponse", "PhysicalCardsWithStreamingResponse", "AsyncPhysicalCardsWithStreamingResponse", + "InboundCheckDeposits", + "AsyncInboundCheckDeposits", + "InboundCheckDepositsWithRawResponse", + "AsyncInboundCheckDepositsWithRawResponse", + "InboundCheckDepositsWithStreamingResponse", + "AsyncInboundCheckDepositsWithStreamingResponse", "Simulations", "AsyncSimulations", "SimulationsWithRawResponse", diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index f04195670..481cad4ef 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -26,50 +26,6 @@ def with_raw_response(self) -> CheckTransfersWithRawResponse: def with_streaming_response(self) -> CheckTransfersWithStreamingResponse: return CheckTransfersWithStreamingResponse(self) - def deposit( - self, - check_transfer_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, - idempotency_key: str | None = None, - ) -> CheckTransfer: - """Simulates a [Check Transfer](#check-transfers) being deposited at a bank. - - This - transfer must first have a `status` of `mailed`. - - Args: - check_transfer_id: The identifier of the Check Transfer you wish to mark deposited. - - 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 check_transfer_id: - raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") - return self._post( - f"/simulations/check_transfers/{check_transfer_id}/deposit", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CheckTransfer, - ) - def mail( self, check_transfer_id: str, @@ -124,50 +80,6 @@ def with_raw_response(self) -> AsyncCheckTransfersWithRawResponse: def with_streaming_response(self) -> AsyncCheckTransfersWithStreamingResponse: return AsyncCheckTransfersWithStreamingResponse(self) - async def deposit( - self, - check_transfer_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, - idempotency_key: str | None = None, - ) -> CheckTransfer: - """Simulates a [Check Transfer](#check-transfers) being deposited at a bank. - - This - transfer must first have a `status` of `mailed`. - - Args: - check_transfer_id: The identifier of the Check Transfer you wish to mark deposited. - - 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 check_transfer_id: - raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") - return await self._post( - f"/simulations/check_transfers/{check_transfer_id}/deposit", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CheckTransfer, - ) - async def mail( self, check_transfer_id: str, @@ -217,9 +129,6 @@ class CheckTransfersWithRawResponse: def __init__(self, check_transfers: CheckTransfers) -> None: self._check_transfers = check_transfers - self.deposit = _legacy_response.to_raw_response_wrapper( - check_transfers.deposit, - ) self.mail = _legacy_response.to_raw_response_wrapper( check_transfers.mail, ) @@ -229,9 +138,6 @@ class AsyncCheckTransfersWithRawResponse: def __init__(self, check_transfers: AsyncCheckTransfers) -> None: self._check_transfers = check_transfers - self.deposit = _legacy_response.async_to_raw_response_wrapper( - check_transfers.deposit, - ) self.mail = _legacy_response.async_to_raw_response_wrapper( check_transfers.mail, ) @@ -241,9 +147,6 @@ class CheckTransfersWithStreamingResponse: def __init__(self, check_transfers: CheckTransfers) -> None: self._check_transfers = check_transfers - self.deposit = to_streamed_response_wrapper( - check_transfers.deposit, - ) self.mail = to_streamed_response_wrapper( check_transfers.mail, ) @@ -253,9 +156,6 @@ class AsyncCheckTransfersWithStreamingResponse: def __init__(self, check_transfers: AsyncCheckTransfers) -> None: self._check_transfers = check_transfers - self.deposit = async_to_streamed_response_wrapper( - check_transfers.deposit, - ) self.mail = async_to_streamed_response_wrapper( check_transfers.mail, ) diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py new file mode 100644 index 000000000..dd3585461 --- /dev/null +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -0,0 +1,198 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ... import _legacy_response +from ...types import InboundCheckDeposit +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._base_client import ( + make_request_options, +) +from ...types.simulations import inbound_check_deposit_create_params + +__all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] + + +class InboundCheckDeposits(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundCheckDepositsWithRawResponse: + return InboundCheckDepositsWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundCheckDepositsWithStreamingResponse: + return InboundCheckDepositsWithStreamingResponse(self) + + def create( + self, + *, + account_number_id: str, + amount: int, + check_number: 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, + ) -> InboundCheckDeposit: + """Simulates an Inbound Check Deposit against your account. + + This imitates someone + depositing a check at their bank that was issued from your account. It may or + may not be associated with a Check Transfer. Increase will evaluate the Check + Deposit as we would in production and either create a Transaction or a Declined + Transaction as a result. You can inspect the resulting Inbound Check Deposit + object to see the result. + + Args: + account_number_id: The identifier of the Account Number the Inbound Check Deposit will be against. + + amount: The check amount in cents. + + check_number: The check number on the check to be deposited. + + 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 + """ + return self._post( + "/simulations/inbound_check_deposits", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "check_number": check_number, + }, + inbound_check_deposit_create_params.InboundCheckDepositCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + + +class AsyncInboundCheckDeposits(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundCheckDepositsWithRawResponse: + return AsyncInboundCheckDepositsWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundCheckDepositsWithStreamingResponse: + return AsyncInboundCheckDepositsWithStreamingResponse(self) + + async def create( + self, + *, + account_number_id: str, + amount: int, + check_number: 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, + ) -> InboundCheckDeposit: + """Simulates an Inbound Check Deposit against your account. + + This imitates someone + depositing a check at their bank that was issued from your account. It may or + may not be associated with a Check Transfer. Increase will evaluate the Check + Deposit as we would in production and either create a Transaction or a Declined + Transaction as a result. You can inspect the resulting Inbound Check Deposit + object to see the result. + + Args: + account_number_id: The identifier of the Account Number the Inbound Check Deposit will be against. + + amount: The check amount in cents. + + check_number: The check number on the check to be deposited. + + 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 + """ + return await self._post( + "/simulations/inbound_check_deposits", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "check_number": check_number, + }, + inbound_check_deposit_create_params.InboundCheckDepositCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + + +class InboundCheckDepositsWithRawResponse: + def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.create = _legacy_response.to_raw_response_wrapper( + inbound_check_deposits.create, + ) + + +class AsyncInboundCheckDepositsWithRawResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.create = _legacy_response.async_to_raw_response_wrapper( + inbound_check_deposits.create, + ) + + +class InboundCheckDepositsWithStreamingResponse: + def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.create = to_streamed_response_wrapper( + inbound_check_deposits.create, + ) + + +class AsyncInboundCheckDepositsWithStreamingResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.create = async_to_streamed_response_wrapper( + inbound_check_deposits.create, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 4e37f18ec..6bbff3948 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -135,6 +135,14 @@ InboundFundsHoldsWithStreamingResponse, AsyncInboundFundsHoldsWithStreamingResponse, ) +from .inbound_check_deposits import ( + InboundCheckDeposits, + AsyncInboundCheckDeposits, + InboundCheckDepositsWithRawResponse, + AsyncInboundCheckDepositsWithRawResponse, + InboundCheckDepositsWithStreamingResponse, + AsyncInboundCheckDepositsWithStreamingResponse, +) from .real_time_payments_transfers import ( RealTimePaymentsTransfers, AsyncRealTimePaymentsTransfers, @@ -232,6 +240,10 @@ def real_time_payments_transfers(self) -> RealTimePaymentsTransfers: def physical_cards(self) -> PhysicalCards: return PhysicalCards(self._client) + @cached_property + def inbound_check_deposits(self) -> InboundCheckDeposits: + return InboundCheckDeposits(self._client) + @cached_property def with_raw_response(self) -> SimulationsWithRawResponse: return SimulationsWithRawResponse(self) @@ -522,6 +534,10 @@ def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfers: def physical_cards(self) -> AsyncPhysicalCards: return AsyncPhysicalCards(self._client) + @cached_property + def inbound_check_deposits(self) -> AsyncInboundCheckDeposits: + return AsyncInboundCheckDeposits(self._client) + @cached_property def with_raw_response(self) -> AsyncSimulationsWithRawResponse: return AsyncSimulationsWithRawResponse(self) @@ -828,6 +844,10 @@ def real_time_payments_transfers(self) -> RealTimePaymentsTransfersWithRawRespon def physical_cards(self) -> PhysicalCardsWithRawResponse: return PhysicalCardsWithRawResponse(self._simulations.physical_cards) + @cached_property + def inbound_check_deposits(self) -> InboundCheckDepositsWithRawResponse: + return InboundCheckDepositsWithRawResponse(self._simulations.inbound_check_deposits) + class AsyncSimulationsWithRawResponse: def __init__(self, simulations: AsyncSimulations) -> None: @@ -914,6 +934,10 @@ def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersWithRawR def physical_cards(self) -> AsyncPhysicalCardsWithRawResponse: return AsyncPhysicalCardsWithRawResponse(self._simulations.physical_cards) + @cached_property + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsWithRawResponse: + return AsyncInboundCheckDepositsWithRawResponse(self._simulations.inbound_check_deposits) + class SimulationsWithStreamingResponse: def __init__(self, simulations: Simulations) -> None: @@ -1000,6 +1024,10 @@ def real_time_payments_transfers(self) -> RealTimePaymentsTransfersWithStreaming def physical_cards(self) -> PhysicalCardsWithStreamingResponse: return PhysicalCardsWithStreamingResponse(self._simulations.physical_cards) + @cached_property + def inbound_check_deposits(self) -> InboundCheckDepositsWithStreamingResponse: + return InboundCheckDepositsWithStreamingResponse(self._simulations.inbound_check_deposits) + class AsyncSimulationsWithStreamingResponse: def __init__(self, simulations: AsyncSimulations) -> None: @@ -1085,3 +1113,7 @@ def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersWithStre @cached_property def physical_cards(self) -> AsyncPhysicalCardsWithStreamingResponse: return AsyncPhysicalCardsWithStreamingResponse(self._simulations.physical_cards) + + @cached_property + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsWithStreamingResponse: + return AsyncInboundCheckDepositsWithStreamingResponse(self._simulations.inbound_check_deposits) diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 3b683ae24..6beda6b88 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx from .. import _legacy_response @@ -179,7 +181,9 @@ def list( self, *, cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] | NotGiven = NOT_GIVEN, # 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, @@ -193,9 +197,23 @@ def list( Args: cursor: Return the page of entries after this one. + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + status: Filter Wire Drawdown Requests for those with the specified status. + + - `pending_submission` - The drawdown request is queued to be submitted to + Fedwire. + - `pending_response` - The drawdown request has been sent and the recipient + should respond in some way. + - `fulfilled` - The drawdown request has been fulfilled by the recipient. + - `refused` - The drawdown request has been refused by the recipient. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -215,7 +233,9 @@ def list( query=maybe_transform( { "cursor": cursor, + "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, wire_drawdown_request_list_params.WireDrawdownRequestListParams, ), @@ -376,7 +396,9 @@ def list( self, *, cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] | NotGiven = NOT_GIVEN, # 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, @@ -390,9 +412,23 @@ def list( Args: cursor: Return the page of entries after this one. + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + status: Filter Wire Drawdown Requests for those with the specified status. + + - `pending_submission` - The drawdown request is queued to be submitted to + Fedwire. + - `pending_response` - The drawdown request has been sent and the recipient + should respond in some way. + - `fulfilled` - The drawdown request has been fulfilled by the recipient. + - `refused` - The drawdown request has been refused by the recipient. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -412,7 +448,9 @@ def list( query=maybe_transform( { "cursor": cursor, + "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, wire_drawdown_request_list_params.WireDrawdownRequestListParams, ), diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index c495ff163..00b72e203 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -55,6 +55,7 @@ from .account_update_params import AccountUpdateParams as AccountUpdateParams from .bookkeeping_entry_set import BookkeepingEntrySet as BookkeepingEntrySet from .entity_confirm_params import EntityConfirmParams as EntityConfirmParams +from .inbound_check_deposit import InboundCheckDeposit as InboundCheckDeposit from .inbound_wire_transfer import InboundWireTransfer as InboundWireTransfer from .physical_card_profile import PhysicalCardProfile as PhysicalCardProfile from .wire_drawdown_request import WireDrawdownRequest as WireDrawdownRequest @@ -110,6 +111,7 @@ from .bookkeeping_account_update_params import BookkeepingAccountUpdateParams as BookkeepingAccountUpdateParams from .bookkeeping_entry_set_list_params import BookkeepingEntrySetListParams as BookkeepingEntrySetListParams 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 from .physical_card_profile_list_params import PhysicalCardProfileListParams as PhysicalCardProfileListParams from .simulation_card_increments_params import SimulationCardIncrementsParams as SimulationCardIncrementsParams diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index db7bd7e4e..94db3574c 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -71,6 +71,12 @@ class Deposit(BaseModel): deposited check. """ + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this + transaction. + """ + transaction_id: Optional[str] = None """The identifier of the Transaction object created when the check was deposited.""" diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 7d155ec25..a6625de3b 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -34,6 +34,9 @@ class SourceACHDecline(BaseModel): For dollars, for example, this is cents. """ + inbound_ach_transfer_id: str + """The identifier of the Inbound ACH Transfer object associated with this decline.""" + originator_company_descriptive_date: Optional[str] = None """The descriptive date of the transfer.""" @@ -458,12 +461,20 @@ class SourceCheckDecline(BaseModel): declined check. """ + check_transfer_id: Optional[str] = None + """The identifier of the Check Transfer object associated with this decline.""" + front_image_file_id: Optional[str] = None """ The identifier of the API File object containing an image of the front of the declined check. """ + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this decline. + """ + reason: Literal[ "ach_route_disabled", "ach_route_canceled", diff --git a/src/increase/types/export_list_params.py b/src/increase/types/export_list_params.py index e918fdaf4..7943d4dad 100644 --- a/src/increase/types/export_list_params.py +++ b/src/increase/types/export_list_params.py @@ -2,17 +2,95 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict -__all__ = ["ExportListParams"] +from .._utils import PropertyInfo + +__all__ = ["ExportListParams", "Category", "CreatedAt", "Status"] class ExportListParams(TypedDict, total=False): + category: Category + + created_at: CreatedAt + cursor: str """Return the page of entries after this one.""" + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + limit: int """Limit the size of the list that is returned. The default (and maximum) is 100 objects. """ + + status: Status + + +_CategoryReservedKeywords = TypedDict( + "_CategoryReservedKeywords", + { + "in": List[ + Literal[ + "account_statement_ofx", + "transaction_csv", + "balance_csv", + "bookkeeping_account_balance_csv", + "entity_csv", + ] + ], + }, + total=False, +) + + +class Category(_CategoryReservedKeywords, total=False): + pass + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["pending", "complete", "failed"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py new file mode 100644 index 000000000..d9f2e8a79 --- /dev/null +++ b/src/increase/types/inbound_check_deposit.py @@ -0,0 +1,91 @@ +# 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__ = ["InboundCheckDeposit"] + + +class InboundCheckDeposit(BaseModel): + id: str + """The deposit's identifier.""" + + account_id: str + """The Account the check is being deposited against.""" + + account_number_id: str + """The Account Number the check is being deposited against.""" + + amount: int + """The deposited amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + back_image_file_id: Optional[str] = None + """The ID for the File containing the image of the back of the check.""" + + bank_of_first_deposit_routing_number: Optional[str] = None + """ + The American Bankers' Association (ABA) Routing Transit Number (RTN) for the + bank depositing this check. In some rare cases, this is not transmitted via + Check21 and the value will be null. + """ + + check_number: Optional[str] = None + """The check number printed on the check being deposited.""" + + check_transfer_id: Optional[str] = None + """ + If this deposit is for an existing Check Transfer, the identifier of that Check + Transfer. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the deposit was attempted. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the deposit. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + declined_transaction_id: Optional[str] = None + """ + If the deposit attempt has been rejected, the identifier of the Declined + Transaction object created as a result of the failed deposit. + """ + + front_image_file_id: Optional[str] = None + """The ID for the File containing the image of the front of the check.""" + + status: Literal["pending", "accepted", "rejected"] + """The status of the Inbound Check Deposit. + + - `pending` - The Inbound Check Deposit is pending. + - `accepted` - The Inbound Check Deposit was accepted. + - `rejected` - The Inbound Check Deposit was rejected. + """ + + transaction_id: Optional[str] = None + """ + If the deposit attempt has been accepted, the identifier of the Transaction + object created as a result of the successful deposit. + """ + + type: Literal["inbound_check_deposit"] + """A constant representing the object's type. + + For this resource it will always be `inbound_check_deposit`. + """ diff --git a/src/increase/types/inbound_check_deposit_list_params.py b/src/increase/types/inbound_check_deposit_list_params.py new file mode 100644 index 000000000..2cb5292f2 --- /dev/null +++ b/src/increase/types/inbound_check_deposit_list_params.py @@ -0,0 +1,53 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["InboundCheckDepositListParams", "CreatedAt"] + + +class InboundCheckDepositListParams(TypedDict, total=False): + account_id: str + """Filter Inbound Check Deposits to those belonging to the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 5ba967ddb..a30c73409 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -13,6 +13,7 @@ from .interest_payment_create_params import InterestPaymentCreateParams as InterestPaymentCreateParams from .account_statement_create_params import AccountStatementCreateParams as AccountStatementCreateParams from .ach_transfer_create_inbound_params import ACHTransferCreateInboundParams as ACHTransferCreateInboundParams +from .inbound_check_deposit_create_params import InboundCheckDepositCreateParams as InboundCheckDepositCreateParams from .inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse as InboundFundsHoldReleaseResponse from .wire_transfer_create_inbound_params import WireTransferCreateInboundParams as WireTransferCreateInboundParams from .physical_card_shipment_advance_params import ( diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py index 70bd94bb7..308d99b0e 100644 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ b/src/increase/types/simulations/card_authorization_simulation.py @@ -51,6 +51,9 @@ class DeclinedTransactionSourceACHDecline(BaseModel): For dollars, for example, this is cents. """ + inbound_ach_transfer_id: str + """The identifier of the Inbound ACH Transfer object associated with this decline.""" + originator_company_descriptive_date: Optional[str] = None """The descriptive date of the transfer.""" @@ -475,12 +478,20 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): declined check. """ + check_transfer_id: Optional[str] = None + """The identifier of the Check Transfer object associated with this decline.""" + front_image_file_id: Optional[str] = None """ The identifier of the API File object containing an image of the front of the declined check. """ + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this decline. + """ + reason: Literal[ "ach_route_disabled", "ach_route_canceled", diff --git a/src/increase/types/simulations/inbound_check_deposit_create_params.py b/src/increase/types/simulations/inbound_check_deposit_create_params.py new file mode 100644 index 000000000..8d7e7b0aa --- /dev/null +++ b/src/increase/types/simulations/inbound_check_deposit_create_params.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["InboundCheckDepositCreateParams"] + + +class InboundCheckDepositCreateParams(TypedDict, total=False): + account_number_id: Required[str] + """The identifier of the Account Number the Inbound Check Deposit will be against.""" + + amount: Required[int] + """The check amount in cents.""" + + check_number: Required[str] + """The check number on the check to be deposited.""" diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index 8fca3a093..8753b47dc 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -83,6 +83,9 @@ class DeclinedTransactionSourceACHDecline(BaseModel): For dollars, for example, this is cents. """ + inbound_ach_transfer_id: str + """The identifier of the Inbound ACH Transfer object associated with this decline.""" + originator_company_descriptive_date: Optional[str] = None """The descriptive date of the transfer.""" @@ -507,12 +510,20 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): declined check. """ + check_transfer_id: Optional[str] = None + """The identifier of the Check Transfer object associated with this decline.""" + front_image_file_id: Optional[str] = None """ The identifier of the API File object containing an image of the front of the declined check. """ + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this decline. + """ + reason: Literal[ "ach_route_disabled", "ach_route_canceled", @@ -2565,6 +2576,12 @@ class TransactionSourceCheckTransferDeposit(BaseModel): deposited check. """ + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this + transaction. + """ + transaction_id: Optional[str] = None """The identifier of the Transaction object created when the check was deposited.""" @@ -2695,7 +2712,7 @@ class TransactionSourceInboundACHTransfer(BaseModel): """ transfer_id: str - """The inbound ach transfer's identifier.""" + """The Inbound ACH Transfer's identifier.""" class TransactionSourceInboundInternationalACHTransfer(BaseModel): diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index feaa8400d..f919631b5 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1601,6 +1601,12 @@ class SourceCheckTransferDeposit(BaseModel): deposited check. """ + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this + transaction. + """ + transaction_id: Optional[str] = None """The identifier of the Transaction object created when the check was deposited.""" @@ -1731,7 +1737,7 @@ class SourceInboundACHTransfer(BaseModel): """ transfer_id: str - """The inbound ach transfer's identifier.""" + """The Inbound ACH Transfer's identifier.""" class SourceInboundInternationalACHTransfer(BaseModel): diff --git a/src/increase/types/wire_drawdown_request_list_params.py b/src/increase/types/wire_drawdown_request_list_params.py index 0552d1801..e36ed2aea 100644 --- a/src/increase/types/wire_drawdown_request_list_params.py +++ b/src/increase/types/wire_drawdown_request_list_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing_extensions import Literal, TypedDict __all__ = ["WireDrawdownRequestListParams"] @@ -11,8 +11,27 @@ class WireDrawdownRequestListParams(TypedDict, total=False): cursor: str """Return the page of entries after this one.""" + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + limit: int """Limit the size of the list that is returned. The default (and maximum) is 100 objects. """ + + status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] + """Filter Wire Drawdown Requests for those with the specified status. + + - `pending_submission` - The drawdown request is queued to be submitted to + Fedwire. + - `pending_response` - The drawdown request has been sent and the recipient + should respond in some way. + - `fulfilled` - The drawdown request has been fulfilled by the recipient. + - `refused` - The drawdown request has been refused by the recipient. + """ diff --git a/tests/api_resources/simulations/test_check_transfers.py b/tests/api_resources/simulations/test_check_transfers.py index 45fad5096..14d3b4075 100644 --- a/tests/api_resources/simulations/test_check_transfers.py +++ b/tests/api_resources/simulations/test_check_transfers.py @@ -17,44 +17,6 @@ class TestCheckTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @parametrize - def test_method_deposit(self, client: Increase) -> None: - check_transfer = client.simulations.check_transfers.deposit( - "string", - ) - assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - - @parametrize - def test_raw_response_deposit(self, client: Increase) -> None: - response = client.simulations.check_transfers.with_raw_response.deposit( - "string", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() - assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - - @parametrize - def test_streaming_response_deposit(self, client: Increase) -> None: - with client.simulations.check_transfers.with_streaming_response.deposit( - "string", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - check_transfer = response.parse() - assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_deposit(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): - client.simulations.check_transfers.with_raw_response.deposit( - "", - ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_mail(self, client: Increase) -> None: @@ -101,44 +63,6 @@ def test_path_params_mail(self, client: Increase) -> None: class TestAsyncCheckTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @parametrize - async def test_method_deposit(self, async_client: AsyncIncrease) -> None: - check_transfer = await async_client.simulations.check_transfers.deposit( - "string", - ) - assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - - @parametrize - async def test_raw_response_deposit(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.check_transfers.with_raw_response.deposit( - "string", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() - assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - - @parametrize - async def test_streaming_response_deposit(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.check_transfers.with_streaming_response.deposit( - "string", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - check_transfer = await response.parse() - assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_deposit(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): - await async_client.simulations.check_transfers.with_raw_response.deposit( - "", - ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_mail(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_inbound_check_deposits.py b/tests/api_resources/simulations/test_inbound_check_deposits.py new file mode 100644 index 000000000..48760003f --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_check_deposits.py @@ -0,0 +1,96 @@ +# 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 InboundCheckDeposit + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundCheckDeposits: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_check_deposit = client.simulations.inbound_check_deposits.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_check_deposits.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_check_deposits.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundCheckDeposits: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.simulations.inbound_check_deposits.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_check_deposits.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_check_deposits.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index ccb95eb23..c95473d10 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -140,8 +140,17 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: export = client.exports.list( + category={"in": ["account_statement_ofx", "transaction_csv", "balance_csv"]}, + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, cursor="string", + idempotency_key="x", limit=1, + status={"in": ["pending", "complete", "failed"]}, ) assert_matches_type(SyncPage[Export], export, path=["response"]) @@ -290,8 +299,17 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.list( + category={"in": ["account_statement_ofx", "transaction_csv", "balance_csv"]}, + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, cursor="string", + idempotency_key="x", limit=1, + status={"in": ["pending", "complete", "failed"]}, ) assert_matches_type(AsyncPage[Export], export, path=["response"]) diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py new file mode 100644 index 000000000..a77e3c9a0 --- /dev/null +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -0,0 +1,184 @@ +# 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 InboundCheckDeposit +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundCheckDeposits: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + inbound_check_deposit = client.inbound_check_deposits.retrieve( + "string", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.inbound_check_deposits.with_raw_response.retrieve( + "string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.inbound_check_deposits.with_streaming_response.retrieve( + "string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + client.inbound_check_deposits.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + inbound_check_deposit = client.inbound_check_deposits.list() + assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + inbound_check_deposit = client.inbound_check_deposits.list( + account_id="string", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="string", + limit=1, + ) + assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.inbound_check_deposits.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.inbound_check_deposits.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = response.parse() + assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundCheckDeposits: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.inbound_check_deposits.retrieve( + "string", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_check_deposits.with_raw_response.retrieve( + "string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_check_deposits.with_streaming_response.retrieve( + "string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + await async_client.inbound_check_deposits.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.inbound_check_deposits.list() + assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.inbound_check_deposits.list( + account_id="string", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="string", + limit=1, + ) + assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_check_deposits.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_check_deposits.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = await response.parse() + assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 7705d8059..b03363374 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -136,7 +136,9 @@ def test_method_list(self, client: Increase) -> None: def test_method_list_with_all_params(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.list( cursor="string", + idempotency_key="x", limit=1, + status="pending_submission", ) assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @@ -282,7 +284,9 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.list( cursor="string", + idempotency_key="x", limit=1, + status="pending_submission", ) assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"])