diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3c0bbe3e9..7fdabc0be 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.382.0" + ".": "0.383.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 748c5a918..ac4f56fb9 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-f55c7bc0881d1c7bcc906156155a0e43c6b8866050f778db3befebe14d42208f.yml -openapi_spec_hash: 78c5274b08b5e7ae5e16da80d733bc10 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-39280e79454a4e6c0e7161b5d92520a3edfc335cce9b198565e57c94daa31b04.yml +openapi_spec_hash: f992030218a4415fcec934bf482cb7ae config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/CHANGELOG.md b/CHANGELOG.md index 96e58b954..b363b5300 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.383.0 (2025-11-06) + +Full Changelog: [v0.382.0...v0.383.0](https://github.com/Increase/increase-python/compare/v0.382.0...v0.383.0) + +### Features + +* **api:** api update ([da34894](https://github.com/Increase/increase-python/commit/da34894b6d334cad194bf8d48e5210e0535c0b48)) + ## 0.382.0 (2025-11-05) Full Changelog: [v0.381.0...v0.382.0](https://github.com/Increase/increase-python/compare/v0.381.0...v0.382.0) diff --git a/pyproject.toml b/pyproject.toml index e886b5017..1b0b57972 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.382.0" +version = "0.383.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 d50ea171d..f1ed19a16 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.382.0" # x-release-please-version +__version__ = "0.383.0" # x-release-please-version diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index dfc142b52..90d5be4fe 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing import Union +from datetime import date from typing_extensions import Literal import httpx @@ -56,6 +58,7 @@ def create( physical_check: check_transfer_create_params.PhysicalCheck | Omit = omit, require_approval: bool | Omit = omit, third_party: check_transfer_create_params.ThirdParty | Omit = omit, + valid_until_date: Union[str, date] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -106,6 +109,10 @@ def create( `fulfillment_method` is equal to `third_party`. It must not be included if any other `fulfillment_method` is provided. + valid_until_date: If provided, the check will be valid on or before this date. After this date, + the check transfer will be stopped and deposits will not be accepted. For checks + printed by Increase, this date is included on the check as its expiry. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -129,6 +136,7 @@ def create( "physical_check": physical_check, "require_approval": require_approval, "third_party": third_party, + "valid_until_date": valid_until_date, }, check_transfer_create_params.CheckTransferCreateParams, ), @@ -407,6 +415,7 @@ async def create( physical_check: check_transfer_create_params.PhysicalCheck | Omit = omit, require_approval: bool | Omit = omit, third_party: check_transfer_create_params.ThirdParty | Omit = omit, + valid_until_date: Union[str, date] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -457,6 +466,10 @@ async def create( `fulfillment_method` is equal to `third_party`. It must not be included if any other `fulfillment_method` is provided. + valid_until_date: If provided, the check will be valid on or before this date. After this date, + the check transfer will be stopped and deposits will not be accepted. For checks + printed by Increase, this date is included on the check as its expiry. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -480,6 +493,7 @@ async def create( "physical_check": physical_check, "require_approval": require_approval, "third_party": third_party, + "valid_until_date": valid_until_date, }, check_transfer_create_params.CheckTransferCreateParams, ), diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 51c8a57b4..a0591e0fa 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import TYPE_CHECKING, Dict, List, Optional -from datetime import datetime +from datetime import date, datetime from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -498,6 +498,14 @@ class CheckTransfer(BaseModel): For this resource it will always be `check_transfer`. """ + valid_until_date: Optional[date] = None + """If set, the check will be valid on or before this date. + + After this date, the check transfer will be stopped and deposits will not be + accepted. For checks printed by Increase, this date is included on the check as + its expiry. + """ + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 4b7a873f7..2693fb44f 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -3,7 +3,10 @@ from __future__ import annotations from typing import Dict, Union, Iterable -from typing_extensions import Literal, Required, TypeAlias, TypedDict +from datetime import date +from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict + +from .._utils import PropertyInfo __all__ = [ "CheckTransferCreateParams", @@ -75,6 +78,14 @@ class CheckTransferCreateParams(TypedDict, total=False): be included if any other `fulfillment_method` is provided. """ + valid_until_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """If provided, the check will be valid on or before this date. + + After this date, the check transfer will be stopped and deposits will not be + accepted. For checks printed by Increase, this date is included on the check as + its expiry. + """ + class PhysicalCheckMailingAddress(TypedDict, total=False): city: Required[str] diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 2717e1355..c14a11768 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -12,7 +12,7 @@ from increase.types import ( CheckTransfer, ) -from increase._utils import parse_datetime +from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -66,6 +66,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, require_approval=True, third_party={"recipient_name": "x"}, + valid_until_date=parse_date("2019-12-27"), ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -352,6 +353,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, require_approval=True, third_party={"recipient_name": "x"}, + valid_until_date=parse_date("2019-12-27"), ) assert_matches_type(CheckTransfer, check_transfer, path=["response"])