diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 90be2bf17..24f979195 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.327.0" + ".": "0.328.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index c27c54482..018fcf798 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e81b9b39563d895c47a1eceb9fd7cac6bc3f8e6f21c57c1d01ae2cdf360b73ce.yml -openapi_spec_hash: 9eee6e29a9d53623d380e8afae9ef482 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6d19e08b9b1b9aa23a3a0c86db6eb3500b3a4aaf2d9f549a0177c5bebe67d098.yml +openapi_spec_hash: eec4190f1aca04351de8891c6a9b37da config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/CHANGELOG.md b/CHANGELOG.md index 40e99a89c..04a8daab1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.328.0 (2025-09-16) + +Full Changelog: [v0.327.0...v0.328.0](https://github.com/Increase/increase-python/compare/v0.327.0...v0.328.0) + +### Features + +* **api:** api update ([072b28a](https://github.com/Increase/increase-python/commit/072b28a73f3db917ffc1e31b80196d11bf29dd32)) + ## 0.327.0 (2025-09-16) Full Changelog: [v0.326.0...v0.327.0](https://github.com/Increase/increase-python/compare/v0.326.0...v0.327.0) diff --git a/pyproject.toml b/pyproject.toml index 995e1ce94..cc4d602a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.327.0" +version = "0.328.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 2c43a8818..1881e0b00 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.327.0" # x-release-please-version +__version__ = "0.328.0" # x-release-please-version diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 6e961865d..da633ad18 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -48,7 +48,6 @@ def create( account_id: str, amount: int, beneficiary_name: str, - message_to_recipient: str, account_number: str | NotGiven = NOT_GIVEN, beneficiary_address_line1: str | NotGiven = NOT_GIVEN, beneficiary_address_line2: str | NotGiven = NOT_GIVEN, @@ -59,6 +58,7 @@ def create( originator_address_line2: str | NotGiven = NOT_GIVEN, originator_address_line3: str | NotGiven = NOT_GIVEN, originator_name: str | NotGiven = NOT_GIVEN, + remittance: wire_transfer_create_params.Remittance | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, routing_number: str | NotGiven = NOT_GIVEN, source_account_number_id: str | NotGiven = NOT_GIVEN, @@ -80,8 +80,6 @@ def create( beneficiary_name: The beneficiary's name. - message_to_recipient: The message that will show on the recipient's bank statement. - account_number: The account number for the destination account. beneficiary_address_line1: The beneficiary's address line 1. @@ -108,6 +106,8 @@ def create( originator_name: The originator's name. This is only necessary if you're transferring from a commingled account. Otherwise, we'll use the associated entity's details. + remittance: Additional remittance information related to the wire transfer. + require_approval: Whether the transfer requires explicit approval via the dashboard or API. routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the @@ -132,7 +132,6 @@ def create( "account_id": account_id, "amount": amount, "beneficiary_name": beneficiary_name, - "message_to_recipient": message_to_recipient, "account_number": account_number, "beneficiary_address_line1": beneficiary_address_line1, "beneficiary_address_line2": beneficiary_address_line2, @@ -143,6 +142,7 @@ def create( "originator_address_line2": originator_address_line2, "originator_address_line3": originator_address_line3, "originator_name": originator_name, + "remittance": remittance, "require_approval": require_approval, "routing_number": routing_number, "source_account_number_id": source_account_number_id, @@ -370,7 +370,6 @@ async def create( account_id: str, amount: int, beneficiary_name: str, - message_to_recipient: str, account_number: str | NotGiven = NOT_GIVEN, beneficiary_address_line1: str | NotGiven = NOT_GIVEN, beneficiary_address_line2: str | NotGiven = NOT_GIVEN, @@ -381,6 +380,7 @@ async def create( originator_address_line2: str | NotGiven = NOT_GIVEN, originator_address_line3: str | NotGiven = NOT_GIVEN, originator_name: str | NotGiven = NOT_GIVEN, + remittance: wire_transfer_create_params.Remittance | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, routing_number: str | NotGiven = NOT_GIVEN, source_account_number_id: str | NotGiven = NOT_GIVEN, @@ -402,8 +402,6 @@ async def create( beneficiary_name: The beneficiary's name. - message_to_recipient: The message that will show on the recipient's bank statement. - account_number: The account number for the destination account. beneficiary_address_line1: The beneficiary's address line 1. @@ -430,6 +428,8 @@ async def create( originator_name: The originator's name. This is only necessary if you're transferring from a commingled account. Otherwise, we'll use the associated entity's details. + remittance: Additional remittance information related to the wire transfer. + require_approval: Whether the transfer requires explicit approval via the dashboard or API. routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the @@ -454,7 +454,6 @@ async def create( "account_id": account_id, "amount": amount, "beneficiary_name": beneficiary_name, - "message_to_recipient": message_to_recipient, "account_number": account_number, "beneficiary_address_line1": beneficiary_address_line1, "beneficiary_address_line2": beneficiary_address_line2, @@ -465,6 +464,7 @@ async def create( "originator_address_line2": originator_address_line2, "originator_address_line3": originator_address_line3, "originator_name": originator_name, + "remittance": remittance, "require_approval": require_approval, "routing_number": routing_number, "source_account_number_id": source_account_number_id, diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index 8b3de1ebf..c1bfb0d6f 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import datetime from typing import Optional -from datetime import date, datetime from typing_extensions import Literal from .._models import BaseModel @@ -14,13 +14,16 @@ "CreatedByAPIKey", "CreatedByOAuthApplication", "CreatedByUser", + "Remittance", + "RemittanceTax", + "RemittanceUnstructured", "Reversal", "Submission", ] class Approval(BaseModel): - approved_at: datetime + approved_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was approved. @@ -34,7 +37,7 @@ class Approval(BaseModel): class Cancellation(BaseModel): - canceled_at: datetime + canceled_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Transfer was canceled. @@ -83,11 +86,56 @@ class CreatedBy(BaseModel): """If present, details about the User that created the transfer.""" +class RemittanceTax(BaseModel): + date: datetime.date + """The month and year the tax payment is for, in YYYY-MM-DD format. + + The day is ignored. + """ + + identification_number: str + """ + The 9-digit Tax Identification Number (TIN) or Employer Identification Number + (EIN). + """ + + type_code: str + """The 5-character tax type code.""" + + +class RemittanceUnstructured(BaseModel): + message: str + """The message to the beneficiary.""" + + +class Remittance(BaseModel): + category: Literal["unstructured", "tax"] + """The type of remittance information being passed. + + - `unstructured` - The wire transfer contains unstructured remittance + information. + - `tax` - The wire transfer is for tax payment purposes to the Internal Revenue + Service (IRS). + """ + + tax: Optional[RemittanceTax] = None + """Internal Revenue Service (IRS) tax repayment information. + + Required if `category` is equal to `tax`. + """ + + unstructured: Optional[RemittanceUnstructured] = None + """Unstructured remittance information. + + Required if `category` is equal to `unstructured`. + """ + + class Reversal(BaseModel): amount: int """The amount that was reversed in USD cents.""" - created_at: datetime + created_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the reversal was created. @@ -101,7 +149,7 @@ class Reversal(BaseModel): The description on the reversal message from Fedwire, set by the reversing bank. """ - input_cycle_date: date + input_cycle_date: datetime.date """The Fedwire cycle date for the wire reversal. The "Fedwire day" begins at 9:00 PM Eastern Time on the evening before the @@ -144,7 +192,7 @@ class Submission(BaseModel): input_message_accountability_data: str """The accountability data for the submission.""" - submitted_at: datetime + submitted_at: datetime.datetime """When this wire transfer was submitted to Fedwire.""" @@ -185,7 +233,7 @@ class WireTransfer(BaseModel): approved, this will contain details of the cancellation. """ - created_at: datetime + created_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was created. @@ -224,7 +272,7 @@ class WireTransfer(BaseModel): was sent. """ - message_to_recipient: Optional[str] = None + message_to_recipient: str """The message that will show on the recipient's bank statement.""" network: Literal["wire"] @@ -250,6 +298,9 @@ class WireTransfer(BaseModel): by someone else in your organization. """ + remittance: Optional[Remittance] = None + """Remittance information sent with the wire transfer.""" + reversal: Optional[Reversal] = None """If your transfer is reversed, this will contain details of the reversal.""" diff --git a/src/increase/types/wire_transfer_create_params.py b/src/increase/types/wire_transfer_create_params.py index 16fb3ca6e..e9361645d 100644 --- a/src/increase/types/wire_transfer_create_params.py +++ b/src/increase/types/wire_transfer_create_params.py @@ -2,9 +2,13 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +import datetime +from typing import Union +from typing_extensions import Literal, Required, Annotated, TypedDict -__all__ = ["WireTransferCreateParams"] +from .._utils import PropertyInfo + +__all__ = ["WireTransferCreateParams", "Remittance", "RemittanceTax", "RemittanceUnstructured"] class WireTransferCreateParams(TypedDict, total=False): @@ -17,9 +21,6 @@ class WireTransferCreateParams(TypedDict, total=False): beneficiary_name: Required[str] """The beneficiary's name.""" - message_to_recipient: Required[str] - """The message that will show on the recipient's bank statement.""" - account_number: str """The account number for the destination account.""" @@ -73,6 +74,9 @@ class WireTransferCreateParams(TypedDict, total=False): Otherwise, we'll use the associated entity's details. """ + remittance: Remittance + """Additional remittance information related to the wire transfer.""" + require_approval: bool """Whether the transfer requires explicit approval via the dashboard or API.""" @@ -84,3 +88,48 @@ class WireTransferCreateParams(TypedDict, total=False): source_account_number_id: str """The ID of an Account Number that will be passed to the wire's recipient""" + + +class RemittanceTax(TypedDict, total=False): + date: Required[Annotated[Union[str, datetime.date], PropertyInfo(format="iso8601")]] + """The month and year the tax payment is for, in YYYY-MM-DD format. + + The day is ignored. + """ + + identification_number: Required[str] + """ + The 9-digit Tax Identification Number (TIN) or Employer Identification Number + (EIN). + """ + + type_code: Required[str] + """The 5-character tax type code.""" + + +class RemittanceUnstructured(TypedDict, total=False): + message: Required[str] + """The message to the beneficiary.""" + + +class Remittance(TypedDict, total=False): + category: Required[Literal["unstructured", "tax"]] + """The type of remittance information being passed. + + - `unstructured` - The wire transfer contains unstructured remittance + information. + - `tax` - The wire transfer is for tax payment purposes to the Internal Revenue + Service (IRS). + """ + + tax: RemittanceTax + """Internal Revenue Service (IRS) tax repayment information. + + Required if `category` is equal to `tax`. + """ + + unstructured: RemittanceUnstructured + """Unstructured remittance information. + + Required if `category` is equal to `unstructured`. + """ diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 1208531c7..0173a6f36 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -10,7 +10,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import WireTransfer -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") @@ -25,7 +25,6 @@ def test_method_create(self, client: Increase) -> None: account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -35,7 +34,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", account_number="987654321", beneficiary_address_line1="33 Liberty Street", beneficiary_address_line2="New York", @@ -46,6 +44,15 @@ def test_method_create_with_all_params(self, client: Increase) -> None: originator_address_line2="x", originator_address_line3="x", originator_name="x", + remittance={ + "category": "unstructured", + "tax": { + "date": parse_date("2019-12-27"), + "identification_number": "xxxxxxxxx", + "type_code": "xxxxx", + }, + "unstructured": {"message": "New account transfer"}, + }, require_approval=True, routing_number="101050001", source_account_number_id="source_account_number_id", @@ -58,7 +65,6 @@ def test_raw_response_create(self, client: Increase) -> None: account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", ) assert response.is_closed is True @@ -72,7 +78,6 @@ def test_streaming_response_create(self, client: Increase) -> None: account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -250,7 +255,6 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -260,7 +264,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", account_number="987654321", beneficiary_address_line1="33 Liberty Street", beneficiary_address_line2="New York", @@ -271,6 +274,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) originator_address_line2="x", originator_address_line3="x", originator_name="x", + remittance={ + "category": "unstructured", + "tax": { + "date": parse_date("2019-12-27"), + "identification_number": "xxxxxxxxx", + "type_code": "xxxxx", + }, + "unstructured": {"message": "New account transfer"}, + }, require_approval=True, routing_number="101050001", source_account_number_id="source_account_number_id", @@ -283,7 +295,6 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", ) assert response.is_closed is True @@ -297,7 +308,6 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python"