diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bc036608..e25de8c4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.391.1" + ".": "0.392.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index e94fde2d..2cc58976 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b6b193549e9c795e807b299e7161628dc1e504d43d6be27113b1f3a1e491914f.yml -openapi_spec_hash: 9d0ff6cc1ec60a6772598cff20f8db1d -config_hash: eb2035151c7b49c2f12caf55469b8f9a +configured_endpoints: 229 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a0eb4b9ef698e80be2fc9e995d6096b96de35e4985c8586e0773fa55a6b50943.yml +openapi_spec_hash: a36c0bee01bf3af40ebcd7075308f170 +config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/CHANGELOG.md b/CHANGELOG.md index 64e5ad11..ca9168fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.392.0 (2025-11-12) + +Full Changelog: [v0.391.1...v0.392.0](https://github.com/Increase/increase-python/compare/v0.391.1...v0.392.0) + +### Features + +* **api:** api update ([24ba362](https://github.com/Increase/increase-python/commit/24ba362e89f89ecafaa159a9be401f3185a619de)) + ## 0.391.1 (2025-11-11) Full Changelog: [v0.391.0...v0.391.1](https://github.com/Increase/increase-python/compare/v0.391.0...v0.391.1) diff --git a/api.md b/api.md index 60db0da3..e519813a 100644 --- a/api.md +++ b/api.md @@ -441,6 +441,7 @@ Methods: - client.inbound_mail_items.retrieve(inbound_mail_item_id) -> InboundMailItem - client.inbound_mail_items.list(\*\*params) -> SyncPage[InboundMailItem] +- client.inbound_mail_items.action(inbound_mail_item_id, \*\*params) -> InboundMailItem # RoutingNumbers diff --git a/pyproject.toml b/pyproject.toml index fc40a7e9..645de36b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.391.1" +version = "0.392.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 4fdfd98d..cc789938 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.391.1" # x-release-please-version +__version__ = "0.392.0" # x-release-please-version diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index b36f5c79..7e04c794 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -2,11 +2,13 @@ from __future__ import annotations +from typing import Iterable + import httpx -from ..types import inbound_mail_item_list_params +from ..types import inbound_mail_item_list_params, inbound_mail_item_action_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -133,6 +135,54 @@ def list( model=InboundMailItem, ) + def action( + self, + inbound_mail_item_id: str, + *, + checks: Iterable[inbound_mail_item_action_params.Check], + # 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, + ) -> InboundMailItem: + """ + Action a Inbound Mail Item + + Args: + inbound_mail_item_id: The identifier of the Inbound Mail Item to action. + + checks: The actions to perform on the Inbound Mail Item. + + 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 inbound_mail_item_id: + raise ValueError( + f"Expected a non-empty value for `inbound_mail_item_id` but received {inbound_mail_item_id!r}" + ) + return self._post( + f"/inbound_mail_items/{inbound_mail_item_id}/action", + body=maybe_transform({"checks": checks}, inbound_mail_item_action_params.InboundMailItemActionParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundMailItem, + ) + class AsyncInboundMailItemsResource(AsyncAPIResource): @cached_property @@ -245,6 +295,56 @@ def list( model=InboundMailItem, ) + async def action( + self, + inbound_mail_item_id: str, + *, + checks: Iterable[inbound_mail_item_action_params.Check], + # 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, + ) -> InboundMailItem: + """ + Action a Inbound Mail Item + + Args: + inbound_mail_item_id: The identifier of the Inbound Mail Item to action. + + checks: The actions to perform on the Inbound Mail Item. + + 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 inbound_mail_item_id: + raise ValueError( + f"Expected a non-empty value for `inbound_mail_item_id` but received {inbound_mail_item_id!r}" + ) + return await self._post( + f"/inbound_mail_items/{inbound_mail_item_id}/action", + body=await async_maybe_transform( + {"checks": checks}, inbound_mail_item_action_params.InboundMailItemActionParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundMailItem, + ) + class InboundMailItemsResourceWithRawResponse: def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: @@ -256,6 +356,9 @@ def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: self.list = to_raw_response_wrapper( inbound_mail_items.list, ) + self.action = to_raw_response_wrapper( + inbound_mail_items.action, + ) class AsyncInboundMailItemsResourceWithRawResponse: @@ -268,6 +371,9 @@ def __init__(self, inbound_mail_items: AsyncInboundMailItemsResource) -> None: self.list = async_to_raw_response_wrapper( inbound_mail_items.list, ) + self.action = async_to_raw_response_wrapper( + inbound_mail_items.action, + ) class InboundMailItemsResourceWithStreamingResponse: @@ -280,6 +386,9 @@ def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: self.list = to_streamed_response_wrapper( inbound_mail_items.list, ) + self.action = to_streamed_response_wrapper( + inbound_mail_items.action, + ) class AsyncInboundMailItemsResourceWithStreamingResponse: @@ -292,3 +401,6 @@ def __init__(self, inbound_mail_items: AsyncInboundMailItemsResource) -> None: self.list = async_to_streamed_response_wrapper( inbound_mail_items.list, ) + self.action = async_to_streamed_response_wrapper( + inbound_mail_items.action, + ) diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index c9e161a3..276fe76b 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -137,7 +137,7 @@ def update( self, lockbox_id: str, *, - check_deposit_behavior: Literal["enabled", "disabled"] | Omit = omit, + check_deposit_behavior: Literal["enabled", "disabled", "pend_for_processing"] | Omit = omit, description: str | Omit = omit, recipient_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -158,6 +158,8 @@ def update( - `enabled` - Checks mailed to this Lockbox will be deposited. - `disabled` - Checks mailed to this Lockbox will not be deposited. + - `pend_for_processing` - Checks mailed to this Lockbox will be pending until + actioned. description: The description you choose for the Lockbox. @@ -370,7 +372,7 @@ async def update( self, lockbox_id: str, *, - check_deposit_behavior: Literal["enabled", "disabled"] | Omit = omit, + check_deposit_behavior: Literal["enabled", "disabled", "pend_for_processing"] | Omit = omit, description: str | Omit = omit, recipient_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -391,6 +393,8 @@ async def update( - `enabled` - Checks mailed to this Lockbox will be deposited. - `disabled` - Checks mailed to this Lockbox will not be deposited. + - `pend_for_processing` - Checks mailed to this Lockbox will be pending until + actioned. description: The description you choose for the Lockbox. diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index c9662e0a..6eaf9bf9 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -127,6 +127,7 @@ from .external_account_update_params import ExternalAccountUpdateParams as ExternalAccountUpdateParams from .ach_prenotification_list_params import ACHPrenotificationListParams as ACHPrenotificationListParams from .bookkeeping_account_list_params import BookkeepingAccountListParams as BookkeepingAccountListParams +from .inbound_mail_item_action_params import InboundMailItemActionParams as InboundMailItemActionParams from .intrafi_exclusion_create_params import IntrafiExclusionCreateParams as IntrafiExclusionCreateParams from .pending_transaction_list_params import PendingTransactionListParams as PendingTransactionListParams from .card_push_transfer_create_params import CardPushTransferCreateParams as CardPushTransferCreateParams diff --git a/src/increase/types/inbound_mail_item_action_params.py b/src/increase/types/inbound_mail_item_action_params.py new file mode 100644 index 00000000..ceae076a --- /dev/null +++ b/src/increase/types/inbound_mail_item_action_params.py @@ -0,0 +1,29 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Iterable +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["InboundMailItemActionParams", "Check"] + + +class InboundMailItemActionParams(TypedDict, total=False): + checks: Required[Iterable[Check]] + """The actions to perform on the Inbound Mail Item.""" + + +class Check(TypedDict, total=False): + action: Required[Literal["deposit", "ignore"]] + """The action to perform on the Inbound Mail Item. + + - `deposit` - The check will be deposited. + - `ignore` - The check will be ignored. + """ + + account: str + """The identifier of the Account to deposit the check into. + + If not provided, the check will be deposited into the Account associated with + the Lockbox. + """ diff --git a/src/increase/types/lockbox.py b/src/increase/types/lockbox.py index 1051f852..0350841c 100644 --- a/src/increase/types/lockbox.py +++ b/src/increase/types/lockbox.py @@ -50,11 +50,13 @@ class Lockbox(BaseModel): address: Address """The mailing address for the Lockbox.""" - check_deposit_behavior: Literal["enabled", "disabled"] + check_deposit_behavior: Literal["enabled", "disabled", "pend_for_processing"] """Indicates if checks mailed to this lockbox will be deposited. - `enabled` - Checks mailed to this Lockbox will be deposited. - `disabled` - Checks mailed to this Lockbox will not be deposited. + - `pend_for_processing` - Checks mailed to this Lockbox will be pending until + actioned. """ created_at: datetime diff --git a/src/increase/types/lockbox_update_params.py b/src/increase/types/lockbox_update_params.py index fe3fc5a5..ce7a4e72 100644 --- a/src/increase/types/lockbox_update_params.py +++ b/src/increase/types/lockbox_update_params.py @@ -8,11 +8,13 @@ class LockboxUpdateParams(TypedDict, total=False): - check_deposit_behavior: Literal["enabled", "disabled"] + check_deposit_behavior: Literal["enabled", "disabled", "pend_for_processing"] """This indicates if checks mailed to this lockbox will be deposited. - `enabled` - Checks mailed to this Lockbox will be deposited. - `disabled` - Checks mailed to this Lockbox will not be deposited. + - `pend_for_processing` - Checks mailed to this Lockbox will be pending until + actioned. """ description: str diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py index 3cbea56d..8f4229b5 100644 --- a/tests/api_resources/test_inbound_mail_items.py +++ b/tests/api_resources/test_inbound_mail_items.py @@ -97,6 +97,48 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_action(self, client: Increase) -> None: + inbound_mail_item = client.inbound_mail_items.action( + inbound_mail_item_id="inbound_mail_item_q6rrg7mmqpplx80zceev", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + def test_raw_response_action(self, client: Increase) -> None: + response = client.inbound_mail_items.with_raw_response.action( + inbound_mail_item_id="inbound_mail_item_q6rrg7mmqpplx80zceev", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_mail_item = response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + def test_streaming_response_action(self, client: Increase) -> None: + with client.inbound_mail_items.with_streaming_response.action( + inbound_mail_item_id="inbound_mail_item_q6rrg7mmqpplx80zceev", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_mail_item = response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_action(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `inbound_mail_item_id` but received ''"): + client.inbound_mail_items.with_raw_response.action( + inbound_mail_item_id="", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) + class TestAsyncInboundMailItems: parametrize = pytest.mark.parametrize( @@ -180,3 +222,45 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_action(self, async_client: AsyncIncrease) -> None: + inbound_mail_item = await async_client.inbound_mail_items.action( + inbound_mail_item_id="inbound_mail_item_q6rrg7mmqpplx80zceev", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_mail_items.with_raw_response.action( + inbound_mail_item_id="inbound_mail_item_q6rrg7mmqpplx80zceev", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_mail_item = await response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + async def test_streaming_response_action(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_mail_items.with_streaming_response.action( + inbound_mail_item_id="inbound_mail_item_q6rrg7mmqpplx80zceev", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_mail_item = await response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_action(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `inbound_mail_item_id` but received ''"): + await async_client.inbound_mail_items.with_raw_response.action( + inbound_mail_item_id="", + checks=[{"action": "deposit"}, {"action": "ignore"}], + )