diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1d84b5149..3f4f69757 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.324.0" + ".": "0.325.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 7efaaa57e..d9b2e1485 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-94d559b14c3611637885b103aa75adb26dff816369b1fdb758440e288d1ea83b.yml -openapi_spec_hash: 4e257b20b410526bc54fd6ced9db3a5d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0099e03e7fa522327e05de8b00e0d0f8873c9267bbb39a29d22b2aa6bb571d16.yml +openapi_spec_hash: 8691ea0b11ed2570986fadb52e6b87db config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ffcd3055..ae1ce3c73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.325.0 (2025-09-12) + +Full Changelog: [v0.324.0...v0.325.0](https://github.com/Increase/increase-python/compare/v0.324.0...v0.325.0) + +### Features + +* **api:** api update ([4d74fb5](https://github.com/Increase/increase-python/commit/4d74fb50da7ea6b50e77f102ca70797c8dab6a4a)) + + +### Chores + +* **tests:** simplify `get_platform` test ([c5dd673](https://github.com/Increase/increase-python/commit/c5dd673abe2362ddd84632c2ba047d8b36d728a1)) + ## 0.324.0 (2025-09-09) Full Changelog: [v0.323.0...v0.324.0](https://github.com/Increase/increase-python/compare/v0.323.0...v0.324.0) diff --git a/pyproject.toml b/pyproject.toml index cfe0471c2..ed8d575e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.324.0" +version = "0.325.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" @@ -56,7 +56,6 @@ dev-dependencies = [ "dirty-equals>=0.6.0", "importlib-metadata>=6.7.0", "rich>=13.7.1", - "nest_asyncio==1.6.0", "pytest-xdist>=3.6.1", ] diff --git a/requirements-dev.lock b/requirements-dev.lock index ab1226978..8269c8312 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -75,7 +75,6 @@ multidict==6.4.4 mypy==1.14.1 mypy-extensions==1.0.0 # via mypy -nest-asyncio==1.6.0 nodeenv==1.8.0 # via pyright nox==2023.4.22 diff --git a/src/increase/_version.py b/src/increase/_version.py index 1c34ccef5..9571db7ec 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.324.0" # x-release-please-version +__version__ = "0.325.0" # x-release-please-version diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 4b2bc6a96..2a1c19772 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -31,6 +31,7 @@ "SourceCardPushTransferInstruction", "SourceCheckDepositInstruction", "SourceCheckTransferInstruction", + "SourceFedNowTransferInstruction", "SourceInboundFundsHold", "SourceInboundWireTransferReversal", "SourceRealTimePaymentsTransferInstruction", @@ -662,6 +663,11 @@ class SourceCheckTransferInstruction(BaseModel): """The identifier of the Check Transfer that led to this Pending Transaction.""" +class SourceFedNowTransferInstruction(BaseModel): + transfer_id: str + """The identifier of the FedNow Transfer that led to this Pending Transaction.""" + + class SourceInboundFundsHold(BaseModel): amount: int """The held amount in the minor unit of the account's currency. @@ -794,6 +800,7 @@ class Source(BaseModel): "card_authorization", "check_deposit_instruction", "check_transfer_instruction", + "fed_now_transfer_instruction", "inbound_funds_hold", "user_initiated_hold", "real_time_payments_transfer_instruction", @@ -818,6 +825,8 @@ class Source(BaseModel): the `check_deposit_instruction` object. - `check_transfer_instruction` - Check Transfer Instruction: details will be under the `check_transfer_instruction` object. + - `fed_now_transfer_instruction` - FedNow Transfer Instruction: details will be + under the `fed_now_transfer_instruction` object. - `inbound_funds_hold` - Inbound Funds Hold: details will be under the `inbound_funds_hold` object. - `user_initiated_hold` - User Initiated Hold: details will be under the @@ -851,6 +860,13 @@ class Source(BaseModel): equal to `check_transfer_instruction`. """ + fed_now_transfer_instruction: Optional[SourceFedNowTransferInstruction] = None + """A FedNow Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `fed_now_transfer_instruction`. + """ + inbound_funds_hold: Optional[SourceInboundFundsHold] = None """An Inbound Funds Hold object. diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index eba8f0afe..04a2b98aa 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -44,6 +44,7 @@ class PendingTransactionListParams(TypedDict, total=False): "card_authorization", "check_deposit_instruction", "check_transfer_instruction", + "fed_now_transfer_instruction", "inbound_funds_hold", "user_initiated_hold", "real_time_payments_transfer_instruction", diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 3439507df..e87bbd7b4 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -46,6 +46,7 @@ "SourceCheckDepositAcceptance", "SourceCheckDepositReturn", "SourceCheckTransferDeposit", + "SourceFedNowTransferAcknowledgement", "SourceFeePayment", "SourceInboundACHTransfer", "SourceInboundACHTransferAddenda", @@ -1869,6 +1870,11 @@ class SourceCheckTransferDeposit(BaseModel): """ +class SourceFedNowTransferAcknowledgement(BaseModel): + transfer_id: str + """The identifier of the FedNow Transfer that led to this Transaction.""" + + class SourceFeePayment(BaseModel): amount: int """The amount in the minor unit of the transaction's currency. @@ -2434,6 +2440,7 @@ class Source(BaseModel): "card_revenue_payment", "check_deposit_acceptance", "check_deposit_return", + "fed_now_transfer_acknowledgement", "check_transfer_deposit", "fee_payment", "inbound_ach_transfer", @@ -2485,6 +2492,8 @@ class Source(BaseModel): the `check_deposit_acceptance` object. - `check_deposit_return` - Check Deposit Return: details will be under the `check_deposit_return` object. + - `fed_now_transfer_acknowledgement` - FedNow Transfer Acknowledgement: details + will be under the `fed_now_transfer_acknowledgement` object. - `check_transfer_deposit` - Check Transfer Deposit: details will be under the `check_transfer_deposit` object. - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. @@ -2558,6 +2567,15 @@ class Source(BaseModel): types of checks are not pre-registered. """ + fed_now_transfer_acknowledgement: Optional[SourceFedNowTransferAcknowledgement] = None + """A FedNow Transfer Acknowledgement object. + + This field will be present in the JSON response if and only if `category` is + equal to `fed_now_transfer_acknowledgement`. A FedNow Transfer Acknowledgement + is created when a FedNow Transfer sent from Increase is acknowledged by the + receiving bank. + """ + fee_payment: Optional[SourceFeePayment] = None """A Fee Payment object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 9ad7e745f..39e3955a0 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -53,6 +53,7 @@ class TransactionListParams(TypedDict, total=False): "card_revenue_payment", "check_deposit_acceptance", "check_deposit_return", + "fed_now_transfer_acknowledgement", "check_transfer_deposit", "fee_payment", "inbound_ach_transfer", diff --git a/tests/test_client.py b/tests/test_client.py index 215eb9497..a0e31a991 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -6,13 +6,10 @@ import os import sys import json -import time import asyncio import inspect -import subprocess import tracemalloc from typing import Any, Union, cast -from textwrap import dedent from unittest import mock from typing_extensions import Literal @@ -23,14 +20,17 @@ from increase import Increase, AsyncIncrease, APIResponseValidationError from increase._types import Omit +from increase._utils import asyncify from increase._models import BaseModel, FinalRequestOptions from increase._exceptions import IncreaseError, APIStatusError, APITimeoutError, APIResponseValidationError from increase._base_client import ( DEFAULT_TIMEOUT, HTTPX_DEFAULT_TIMEOUT, BaseClient, + OtherPlatform, DefaultHttpxClient, DefaultAsyncHttpxClient, + get_platform, make_request_options, ) @@ -1719,50 +1719,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: assert response.http_request.headers.get("x-stainless-retry-count") == "42" - def test_get_platform(self) -> None: - # A previous implementation of asyncify could leave threads unterminated when - # used with nest_asyncio. - # - # Since nest_asyncio.apply() is global and cannot be un-applied, this - # test is run in a separate process to avoid affecting other tests. - test_code = dedent(""" - import asyncio - import nest_asyncio - import threading - - from increase._utils import asyncify - from increase._base_client import get_platform - - async def test_main() -> None: - result = await asyncify(get_platform)() - print(result) - for thread in threading.enumerate(): - print(thread.name) - - nest_asyncio.apply() - asyncio.run(test_main()) - """) - with subprocess.Popen( - [sys.executable, "-c", test_code], - text=True, - ) as process: - timeout = 10 # seconds - - start_time = time.monotonic() - while True: - return_code = process.poll() - if return_code is not None: - if return_code != 0: - raise AssertionError("calling get_platform using asyncify resulted in a non-zero exit code") - - # success - break - - if time.monotonic() - start_time > timeout: - process.kill() - raise AssertionError("calling get_platform using asyncify resulted in a hung process") - - time.sleep(0.1) + async def test_get_platform(self) -> None: + platform = await asyncify(get_platform)() + assert isinstance(platform, (str, OtherPlatform)) async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly