diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e6a02ed0a..68764d436 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.307.0" + ".": "0.308.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 3ae82a1b8..160b294b4 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-5ecfd5d7d11e1ed73e093008b8ec107f9c1d0d455f660badf74e0a12d98805ed.yml -openapi_spec_hash: ec6f6ea0766c1c56085f9032da2a9e24 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a6d99e6e3e405acf3e592e273aa1c5d519ed4f1157d0f87f1dcf21e7710f59b5.yml +openapi_spec_hash: f1f21c7331c905f2e5549978454059dc config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/CHANGELOG.md b/CHANGELOG.md index b03c76358..8a31b3098 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.308.0 (2025-08-28) + +Full Changelog: [v0.307.0...v0.308.0](https://github.com/Increase/increase-python/compare/v0.307.0...v0.308.0) + +### Features + +* **api:** api update ([4f571ed](https://github.com/Increase/increase-python/commit/4f571ed9567f8c7226b5f6fd5cc1d7b4ad38f404)) + ## 0.307.0 (2025-08-28) Full Changelog: [v0.306.0...v0.307.0](https://github.com/Increase/increase-python/compare/v0.306.0...v0.307.0) diff --git a/api.md b/api.md index cea4bd9f7..4fc9cf187 100644 --- a/api.md +++ b/api.md @@ -877,7 +877,7 @@ Methods: - client.simulations.ach_transfers.acknowledge(ach_transfer_id) -> ACHTransfer - client.simulations.ach_transfers.create_notification_of_change(ach_transfer_id, \*\*params) -> ACHTransfer - client.simulations.ach*transfers.return*(ach_transfer_id, \*\*params) -> ACHTransfer -- client.simulations.ach_transfers.settle(ach_transfer_id) -> ACHTransfer +- client.simulations.ach_transfers.settle(ach_transfer_id, \*\*params) -> ACHTransfer - client.simulations.ach_transfers.submit(ach_transfer_id) -> ACHTransfer ## InboundACHTransfers diff --git a/pyproject.toml b/pyproject.toml index 0af2b3316..afa225597 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.307.0" +version = "0.308.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 7a7eb9c72..889b58752 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.307.0" # x-release-please-version +__version__ = "0.308.0" # x-release-please-version diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index 30be6ba94..69ba3e5ac 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -17,7 +17,11 @@ async_to_streamed_response_wrapper, ) from ..._base_client import make_request_options -from ...types.simulations import ach_transfer_return_params, ach_transfer_create_notification_of_change_params +from ...types.simulations import ( + ach_transfer_return_params, + ach_transfer_settle_params, + ach_transfer_create_notification_of_change_params, +) from ...types.ach_transfer import ACHTransfer __all__ = ["ACHTransfersResource", "AsyncACHTransfersResource"] @@ -475,6 +479,8 @@ def settle( self, ach_transfer_id: str, *, + inbound_funds_hold_behavior: Literal["release_immediately", "release_on_default_schedule"] + | 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, @@ -489,11 +495,22 @@ def settle( `submitted`. For convenience, if the transfer is in `status`: `pending_submission`, the simulation will also submit the transfer. Without this simulation the transfer will eventually settle on its own following the same - Federal Reserve timeline as in production. + Federal Reserve timeline as in production. Additionally, you can specify the + behavior of the inbound funds hold that is created when the ACH Transfer is + settled. If no behavior is specified, the inbound funds hold will be released + immediately in order for the funds to be available for use. Args: ach_transfer_id: The identifier of the ACH Transfer you wish to become settled. + inbound_funds_hold_behavior: The behavior of the inbound funds hold that is created when the ACH Transfer is + settled. If no behavior is specified, the inbound funds hold will be released + immediately in order for the funds to be available for use. + + - `release_immediately` - Release the inbound funds hold immediately. + - `release_on_default_schedule` - Release the inbound funds hold on the default + schedule. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -508,6 +525,10 @@ def settle( raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( f"/simulations/ach_transfers/{ach_transfer_id}/settle", + body=maybe_transform( + {"inbound_funds_hold_behavior": inbound_funds_hold_behavior}, + ach_transfer_settle_params.ACHTransferSettleParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -1018,6 +1039,8 @@ async def settle( self, ach_transfer_id: str, *, + inbound_funds_hold_behavior: Literal["release_immediately", "release_on_default_schedule"] + | 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, @@ -1032,11 +1055,22 @@ async def settle( `submitted`. For convenience, if the transfer is in `status`: `pending_submission`, the simulation will also submit the transfer. Without this simulation the transfer will eventually settle on its own following the same - Federal Reserve timeline as in production. + Federal Reserve timeline as in production. Additionally, you can specify the + behavior of the inbound funds hold that is created when the ACH Transfer is + settled. If no behavior is specified, the inbound funds hold will be released + immediately in order for the funds to be available for use. Args: ach_transfer_id: The identifier of the ACH Transfer you wish to become settled. + inbound_funds_hold_behavior: The behavior of the inbound funds hold that is created when the ACH Transfer is + settled. If no behavior is specified, the inbound funds hold will be released + immediately in order for the funds to be available for use. + + - `release_immediately` - Release the inbound funds hold immediately. + - `release_on_default_schedule` - Release the inbound funds hold on the default + schedule. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1051,6 +1085,10 @@ async def settle( raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( f"/simulations/ach_transfers/{ach_transfer_id}/settle", + body=await async_maybe_transform( + {"inbound_funds_hold_behavior": inbound_funds_hold_behavior}, + ach_transfer_settle_params.ACHTransferSettleParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index bb4acb5a0..8f74919bf 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -7,6 +7,7 @@ from .card_token_create_params import CardTokenCreateParams as CardTokenCreateParams from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams +from .ach_transfer_settle_params import ACHTransferSettleParams as ACHTransferSettleParams from .card_dispute_action_params import CardDisputeActionParams as CardDisputeActionParams from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams from .card_increment_create_params import CardIncrementCreateParams as CardIncrementCreateParams diff --git a/src/increase/types/simulations/ach_transfer_settle_params.py b/src/increase/types/simulations/ach_transfer_settle_params.py new file mode 100644 index 000000000..c885df8fa --- /dev/null +++ b/src/increase/types/simulations/ach_transfer_settle_params.py @@ -0,0 +1,20 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypedDict + +__all__ = ["ACHTransferSettleParams"] + + +class ACHTransferSettleParams(TypedDict, total=False): + inbound_funds_hold_behavior: Literal["release_immediately", "release_on_default_schedule"] + """ + The behavior of the inbound funds hold that is created when the ACH Transfer is + settled. If no behavior is specified, the inbound funds hold will be released + immediately in order for the funds to be available for use. + + - `release_immediately` - Release the inbound funds hold immediately. + - `release_on_default_schedule` - Release the inbound funds hold on the default + schedule. + """ diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 1e78f1f70..53f6f6d30 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -150,14 +150,22 @@ def test_path_params_return(self, client: Increase) -> None: @parametrize def test_method_settle(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.settle( - "ach_transfer_id", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", + ) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + @parametrize + def test_method_settle_with_all_params(self, client: Increase) -> None: + ach_transfer = client.simulations.ach_transfers.settle( + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", + inbound_funds_hold_behavior="release_immediately", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize def test_raw_response_settle(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.settle( - "ach_transfer_id", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -168,7 +176,7 @@ def test_raw_response_settle(self, client: Increase) -> None: @parametrize def test_streaming_response_settle(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.settle( - "ach_transfer_id", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -182,7 +190,7 @@ def test_streaming_response_settle(self, client: Increase) -> None: def test_path_params_settle(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): client.simulations.ach_transfers.with_raw_response.settle( - "", + ach_transfer_id="", ) @parametrize @@ -362,14 +370,22 @@ async def test_path_params_return(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_settle(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.settle( - "ach_transfer_id", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", + ) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + @parametrize + async def test_method_settle_with_all_params(self, async_client: AsyncIncrease) -> None: + ach_transfer = await async_client.simulations.ach_transfers.settle( + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", + inbound_funds_hold_behavior="release_immediately", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize async def test_raw_response_settle(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.settle( - "ach_transfer_id", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -380,7 +396,7 @@ async def test_raw_response_settle(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_settle(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.settle( - "ach_transfer_id", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -394,7 +410,7 @@ async def test_streaming_response_settle(self, async_client: AsyncIncrease) -> N async def test_path_params_settle(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): await async_client.simulations.ach_transfers.with_raw_response.settle( - "", + ach_transfer_id="", ) @parametrize