diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb41c83d1..0a2272b93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,10 @@ on: - 'integrated/**' - 'stl-preview-head/**' - 'stl-preview-base/**' + pull_request: + branches-ignore: + - 'stl-preview-head/**' + - 'stl-preview-base/**' jobs: lint: diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 972c11e34..6b81befa4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.252.1" + ".": "0.253.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 8987be955..54fbc742d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-28729916b00389bc7694a721eac0688ab5405bbc29b7df60708d6abaabd89c29.yml -openapi_spec_hash: e28396bf17aa29a4454a73b2e21ba852 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d85c059af2ebfb614d1027bf04c10ddcb6188920c7e8a29b040968cd962124b6.yml +openapi_spec_hash: 3a5546d73dd733025e0d6d9d673bca04 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/CHANGELOG.md b/CHANGELOG.md index 807c67647..620a084f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # Changelog +## 0.253.0 (2025-06-23) + +Full Changelog: [v0.252.1...v0.253.0](https://github.com/Increase/increase-python/compare/v0.252.1...v0.253.0) + +### Features + +* **api:** api update ([7df5de1](https://github.com/Increase/increase-python/commit/7df5de1517b8d28a43b8ffd9727f17f79d400a7c)) +* **api:** api update ([6ce25d3](https://github.com/Increase/increase-python/commit/6ce25d37a50ec3c630cfedc6122d4c998f781647)) +* **api:** api update ([0ab89ca](https://github.com/Increase/increase-python/commit/0ab89ca40d3bbdf7fb087b6c0650fbccec1f9dac)) +* **api:** api update ([5dbf5ae](https://github.com/Increase/increase-python/commit/5dbf5ae5008cf235dc056e2c7be298b27c413c99)) +* **api:** api update ([16bb632](https://github.com/Increase/increase-python/commit/16bb63236e8d75745170aceb37921863b28ae593)) +* **api:** api update ([97233f5](https://github.com/Increase/increase-python/commit/97233f556d5c90802fdd3d3239a16080499a92d5)) +* **api:** api update ([be18f16](https://github.com/Increase/increase-python/commit/be18f16941aa5d334f263a5e889af43a4e3cb3aa)) +* **api:** api update ([1f93845](https://github.com/Increase/increase-python/commit/1f9384500ddaccfb1aeb75d7d9796bc23fd066d0)) +* **client:** add support for aiohttp ([b5735d7](https://github.com/Increase/increase-python/commit/b5735d7f79f0722d6d1a0b43bb5ae24c9be7b0c7)) + + +### Bug Fixes + +* **tests:** fix: tests which call HTTP endpoints directly with the example parameters ([4b0013d](https://github.com/Increase/increase-python/commit/4b0013d8f731bc64cdbb8b5e8d5cdc577c573f94)) + + +### Chores + +* **ci:** enable for pull requests ([09b085c](https://github.com/Increase/increase-python/commit/09b085c24f28bca2ca2f34bd45d58601a5664344)) +* **internal:** update conftest.py ([e03d919](https://github.com/Increase/increase-python/commit/e03d9191b4d426a95b67cf1d907be6635ff57a3d)) +* **readme:** update badges ([4a734d4](https://github.com/Increase/increase-python/commit/4a734d462b653b48b5364b0febb25ac33ff309d6)) +* **tests:** skip some failing tests on the latest python versions ([43b9915](https://github.com/Increase/increase-python/commit/43b99150a209aa197c31315370c9271f32701351)) + + +### Documentation + +* **client:** fix httpx.Timeout documentation reference ([05bb5ca](https://github.com/Increase/increase-python/commit/05bb5ca50f06b071f5ceea8af3d41b6659076348)) + ## 0.252.1 (2025-06-16) Full Changelog: [v0.252.0...v0.252.1](https://github.com/Increase/increase-python/compare/v0.252.0...v0.252.1) diff --git a/README.md b/README.md index 8c5d77529..d7c96062a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Increase Python API library -[![PyPI version](https://img.shields.io/pypi/v/increase.svg)](https://pypi.org/project/increase/) +[![PyPI version]()](https://pypi.org/project/increase/) The Increase Python library provides convenient access to the Increase REST API from any Python 3.8+ application. The library includes type definitions for all request params and response fields, @@ -74,6 +74,42 @@ asyncio.run(main()) Functionality between the synchronous and asynchronous clients is otherwise identical. +### With aiohttp + +By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend. + +You can enable this by installing `aiohttp`: + +```sh +# install from PyPI +pip install increase[aiohttp] +``` + +Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: + +```python +import os +import asyncio +from increase import DefaultAioHttpClient +from increase import AsyncIncrease + + +async def main() -> None: + async with AsyncIncrease( + api_key=os.environ.get("INCREASE_API_KEY"), # This is the default and can be omitted + http_client=DefaultAioHttpClient(), + ) as client: + account = await client.accounts.create( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ) + print(account.id) + + +asyncio.run(main()) +``` + ## Using types Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like: @@ -235,7 +271,7 @@ client.with_options(max_retries=5).accounts.create( ### Timeouts By default requests time out after 1 minute. You can configure this with a `timeout` option, -which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object: +which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object: ```python from increase import Increase diff --git a/pyproject.toml b/pyproject.toml index 6eb3a9c39..89331ba1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.252.1" +version = "0.253.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" @@ -37,6 +37,8 @@ classifiers = [ Homepage = "https://github.com/Increase/increase-python" Repository = "https://github.com/Increase/increase-python" +[project.optional-dependencies] +aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"] [tool.rye] managed = true diff --git a/requirements-dev.lock b/requirements-dev.lock index fbb27d18c..74b536387 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -10,6 +10,13 @@ # universal: false -e file:. +aiohappyeyeballs==2.6.1 + # via aiohttp +aiohttp==3.12.8 + # via httpx-aiohttp + # via increase +aiosignal==1.3.2 + # via aiohttp annotated-types==0.6.0 # via pydantic anyio==4.4.0 @@ -17,6 +24,10 @@ anyio==4.4.0 # via increase argcomplete==3.1.2 # via nox +async-timeout==5.0.1 + # via aiohttp +attrs==25.3.0 + # via aiohttp certifi==2023.7.22 # via httpcore # via httpx @@ -34,16 +45,23 @@ execnet==2.1.1 # via pytest-xdist filelock==3.12.4 # via virtualenv +frozenlist==1.6.2 + # via aiohttp + # via aiosignal h11==0.14.0 # via httpcore httpcore==1.0.2 # via httpx httpx==0.28.1 + # via httpx-aiohttp # via increase # via respx +httpx-aiohttp==0.1.6 + # via increase idna==3.4 # via anyio # via httpx + # via yarl importlib-metadata==7.0.0 iniconfig==2.0.0 # via pytest @@ -51,6 +69,9 @@ markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py +multidict==6.4.4 + # via aiohttp + # via yarl mypy==1.14.1 mypy-extensions==1.0.0 # via mypy @@ -65,6 +86,9 @@ platformdirs==3.11.0 # via virtualenv pluggy==1.5.0 # via pytest +propcache==0.3.1 + # via aiohttp + # via yarl pydantic==2.10.3 # via increase pydantic-core==2.27.1 @@ -98,11 +122,14 @@ tomli==2.0.2 typing-extensions==4.12.2 # via anyio # via increase + # via multidict # via mypy # via pydantic # via pydantic-core # via pyright virtualenv==20.24.5 # via nox +yarl==1.20.0 + # via aiohttp zipp==3.17.0 # via importlib-metadata diff --git a/requirements.lock b/requirements.lock index e30f9a29d..c5358924c 100644 --- a/requirements.lock +++ b/requirements.lock @@ -10,11 +10,22 @@ # universal: false -e file:. +aiohappyeyeballs==2.6.1 + # via aiohttp +aiohttp==3.12.8 + # via httpx-aiohttp + # via increase +aiosignal==1.3.2 + # via aiohttp annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx # via increase +async-timeout==5.0.1 + # via aiohttp +attrs==25.3.0 + # via aiohttp certifi==2023.7.22 # via httpcore # via httpx @@ -22,15 +33,28 @@ distro==1.8.0 # via increase exceptiongroup==1.2.2 # via anyio +frozenlist==1.6.2 + # via aiohttp + # via aiosignal h11==0.14.0 # via httpcore httpcore==1.0.2 # via httpx httpx==0.28.1 + # via httpx-aiohttp + # via increase +httpx-aiohttp==0.1.6 # via increase idna==3.4 # via anyio # via httpx + # via yarl +multidict==6.4.4 + # via aiohttp + # via yarl +propcache==0.3.1 + # via aiohttp + # via yarl pydantic==2.10.3 # via increase pydantic-core==2.27.1 @@ -41,5 +65,8 @@ sniffio==1.3.0 typing-extensions==4.12.2 # via anyio # via increase + # via multidict # via pydantic # via pydantic-core +yarl==1.20.0 + # via aiohttp diff --git a/src/increase/__init__.py b/src/increase/__init__.py index f252d69e2..309d15b77 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -48,7 +48,7 @@ InsufficientPermissionsError, IdempotencyKeyAlreadyUsedError, ) -from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient +from ._base_client import DefaultHttpxClient, DefaultAioHttpClient, DefaultAsyncHttpxClient from ._utils._logs import setup_logging as _setup_logging __all__ = [ @@ -102,6 +102,7 @@ "DEFAULT_CONNECTION_LIMITS", "DefaultHttpxClient", "DefaultAsyncHttpxClient", + "DefaultAioHttpClient", ] if not _t.TYPE_CHECKING: diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index e9cbc1708..d8d9adcc7 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -1289,6 +1289,24 @@ def __init__(self, **kwargs: Any) -> None: super().__init__(**kwargs) +try: + import httpx_aiohttp +except ImportError: + + class _DefaultAioHttpClient(httpx.AsyncClient): + def __init__(self, **_kwargs: Any) -> None: + raise RuntimeError("To use the aiohttp client you must have installed the package with the `aiohttp` extra") +else: + + class _DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore + def __init__(self, **kwargs: Any) -> None: + kwargs.setdefault("timeout", DEFAULT_TIMEOUT) + kwargs.setdefault("limits", DEFAULT_CONNECTION_LIMITS) + kwargs.setdefault("follow_redirects", True) + + super().__init__(**kwargs) + + if TYPE_CHECKING: DefaultAsyncHttpxClient = httpx.AsyncClient """An alias to `httpx.AsyncClient` that provides the same defaults that this SDK @@ -1297,8 +1315,12 @@ def __init__(self, **kwargs: Any) -> None: This is useful because overriding the `http_client` with your own instance of `httpx.AsyncClient` will result in httpx's defaults being used, not ours. """ + + DefaultAioHttpClient = httpx.AsyncClient + """An alias to `httpx.AsyncClient` that changes the default HTTP transport to `aiohttp`.""" else: DefaultAsyncHttpxClient = _DefaultAsyncHttpxClient + DefaultAioHttpClient = _DefaultAioHttpClient class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient): diff --git a/src/increase/_version.py b/src/increase/_version.py index 9629d18cb..48b37de46 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.252.1" # x-release-please-version +__version__ = "0.253.0" # x-release-please-version diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 07478fb93..d3c66fb73 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -118,6 +118,10 @@ def create( "outbound_card_push_transfer.updated", "outbound_card_validation.created", "outbound_card_validation.updated", + "card_push_transfer.created", + "card_push_transfer.updated", + "card_validation.created", + "card_validation.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -135,6 +139,8 @@ def create( "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", "real_time_payments_request_for_payment.updated", + "swift_transfer.created", + "swift_transfer.updated", "transaction.created", "wire_drawdown_request.created", "wire_drawdown_request.updated", @@ -254,14 +260,20 @@ def create( - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is deactivated. - - `outbound_card_push_transfer.created` - Occurs whenever an Outbound Card Push - Transfer is created. - - `outbound_card_push_transfer.updated` - Occurs whenever an Outbound Card Push - Transfer is updated. - - `outbound_card_validation.created` - Occurs whenever an Outbound Card - Validation is created. - - `outbound_card_validation.updated` - Occurs whenever an Outbound Card - Validation is updated. + - `outbound_card_push_transfer.created` - Occurs whenever a Card Push Transfer + is created. + - `outbound_card_push_transfer.updated` - Occurs whenever a Card Push Transfer + is updated. + - `outbound_card_validation.created` - Occurs whenever a Card Validation is + created. + - `outbound_card_validation.updated` - Occurs whenever a Card Validation is + updated. + - `card_push_transfer.created` - Occurs whenever a Card Push Transfer is + created. + - `card_push_transfer.updated` - Occurs whenever a Card Push Transfer is + updated. + - `card_validation.created` - Occurs whenever a Card Validation is created. + - `card_validation.updated` - Occurs whenever a Card Validation is updated. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is @@ -296,6 +308,8 @@ def create( Payments Request for Payment is created. - `real_time_payments_request_for_payment.updated` - Occurs whenever a Real-Time Payments Request for Payment is updated. + - `swift_transfer.created` - Occurs whenever a Swift Transfer is created. + - `swift_transfer.updated` - Occurs whenever a Swift Transfer is updated. - `transaction.created` - Occurs whenever a Transaction is created. - `wire_drawdown_request.created` - Occurs whenever a Wire Drawdown Request is created. @@ -579,6 +593,10 @@ async def create( "outbound_card_push_transfer.updated", "outbound_card_validation.created", "outbound_card_validation.updated", + "card_push_transfer.created", + "card_push_transfer.updated", + "card_validation.created", + "card_validation.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -596,6 +614,8 @@ async def create( "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", "real_time_payments_request_for_payment.updated", + "swift_transfer.created", + "swift_transfer.updated", "transaction.created", "wire_drawdown_request.created", "wire_drawdown_request.updated", @@ -715,14 +735,20 @@ async def create( - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is deactivated. - - `outbound_card_push_transfer.created` - Occurs whenever an Outbound Card Push - Transfer is created. - - `outbound_card_push_transfer.updated` - Occurs whenever an Outbound Card Push - Transfer is updated. - - `outbound_card_validation.created` - Occurs whenever an Outbound Card - Validation is created. - - `outbound_card_validation.updated` - Occurs whenever an Outbound Card - Validation is updated. + - `outbound_card_push_transfer.created` - Occurs whenever a Card Push Transfer + is created. + - `outbound_card_push_transfer.updated` - Occurs whenever a Card Push Transfer + is updated. + - `outbound_card_validation.created` - Occurs whenever a Card Validation is + created. + - `outbound_card_validation.updated` - Occurs whenever a Card Validation is + updated. + - `card_push_transfer.created` - Occurs whenever a Card Push Transfer is + created. + - `card_push_transfer.updated` - Occurs whenever a Card Push Transfer is + updated. + - `card_validation.created` - Occurs whenever a Card Validation is created. + - `card_validation.updated` - Occurs whenever a Card Validation is updated. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is @@ -757,6 +783,8 @@ async def create( Payments Request for Payment is created. - `real_time_payments_request_for_payment.updated` - Occurs whenever a Real-Time Payments Request for Payment is updated. + - `swift_transfer.created` - Occurs whenever a Swift Transfer is created. + - `swift_transfer.updated` - Occurs whenever a Swift Transfer is updated. - `transaction.created` - Occurs whenever a Transaction is created. - `wire_drawdown_request.created` - Occurs whenever a Wire Drawdown Request is created. diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index e7e8cccbe..12eb7958b 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -2837,10 +2837,10 @@ class ElementCardValidation(BaseModel): is transacting with. """ - type: Literal["card_validation"] + type: Literal["inbound_card_validation"] """A constant representing the object's type. - For this resource it will always be `card_validation`. + For this resource it will always be `inbound_card_validation`. """ verification: ElementCardValidationVerification @@ -2922,12 +2922,12 @@ class Element(BaseModel): """ card_validation: Optional[ElementCardValidation] = None - """A Card Validation object. + """An Inbound Card Validation object. This field will be present in the JSON response if and only if `category` is - equal to `card_validation`. Card Validations are requests from a merchant to - verify that a card number and optionally its address and/or Card Verification - Value are valid. + equal to `card_validation`. Inbound Card Validations are requests from a + merchant to verify that a card number and optionally its address and/or Card + Verification Value are valid. """ category: Literal[ @@ -2952,7 +2952,7 @@ class Element(BaseModel): `card_authorization` object. - `card_authentication` - Card Authentication: details will be under the `card_authentication` object. - - `card_validation` - Card Validation: details will be under the + - `card_validation` - Inbound Card Validation: details will be under the `card_validation` object. - `card_decline` - Card Decline: details will be under the `card_decline` object. diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 3e97d2bae..a93c151e3 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -17,6 +17,7 @@ "Mailing", "PhysicalCheck", "PhysicalCheckMailingAddress", + "PhysicalCheckPayer", "PhysicalCheckReturnAddress", "PhysicalCheckTrackingUpdate", "StopPaymentRequest", @@ -127,6 +128,11 @@ class PhysicalCheckMailingAddress(BaseModel): """The state of the check's destination.""" +class PhysicalCheckPayer(BaseModel): + contents: str + """The contents of the line.""" + + class PhysicalCheckReturnAddress(BaseModel): city: Optional[str] = None """The city of the check's destination.""" @@ -180,6 +186,13 @@ class PhysicalCheck(BaseModel): note: Optional[str] = None """The descriptor that will be printed on the letter included with the check.""" + payer: List[PhysicalCheckPayer] + """The payer of the check. + + This will be printed on the top-left portion of the check and defaults to the + return address if unspecified. + """ + recipient_name: str """The name that will be printed on the check.""" diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index b121014ad..4c66f65b6 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -2,12 +2,14 @@ from __future__ import annotations +from typing import Iterable from typing_extensions import Literal, Required, TypedDict __all__ = [ "CheckTransferCreateParams", "PhysicalCheck", "PhysicalCheckMailingAddress", + "PhysicalCheckPayer", "PhysicalCheckReturnAddress", "ThirdParty", ] @@ -78,6 +80,11 @@ class PhysicalCheckMailingAddress(TypedDict, total=False): """The second line of the address component of the check's destination address.""" +class PhysicalCheckPayer(TypedDict, total=False): + contents: Required[str] + """The contents of the line.""" + + class PhysicalCheckReturnAddress(TypedDict, total=False): city: Required[str] """The city of the return address.""" @@ -119,6 +126,14 @@ class PhysicalCheck(TypedDict, total=False): note: str """The descriptor that will be printed on the letter included with the check.""" + payer: Iterable[PhysicalCheckPayer] + """The payer of the check. + + This will be printed on the top-left portion of the check and defaults to the + return address if unspecified. This should be an array of up to 4 elements, each + of which represents a line of the payer. + """ + return_address: PhysicalCheckReturnAddress """The return address to be printed on the check. @@ -148,6 +163,6 @@ class ThirdParty(TypedDict, total=False): """The pay-to name you will print on the check. If provided, this is used for [Positive Pay](/documentation/positive-pay). If - this is omitted, Increase will be unable to validate the payee name when the + this is omitted, Increase will be unable to validate the payer name when the check is deposited. """ diff --git a/src/increase/types/event.py b/src/increase/types/event.py index 24602d055..53e290081 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -87,6 +87,10 @@ class Event(BaseModel): "outbound_card_push_transfer.updated", "outbound_card_validation.created", "outbound_card_validation.updated", + "card_push_transfer.created", + "card_push_transfer.updated", + "card_validation.created", + "card_validation.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -104,6 +108,8 @@ class Event(BaseModel): "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", "real_time_payments_request_for_payment.updated", + "swift_transfer.created", + "swift_transfer.updated", "transaction.created", "wire_drawdown_request.created", "wire_drawdown_request.updated", @@ -206,14 +212,20 @@ class Event(BaseModel): - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is deactivated. - - `outbound_card_push_transfer.created` - Occurs whenever an Outbound Card Push - Transfer is created. - - `outbound_card_push_transfer.updated` - Occurs whenever an Outbound Card Push - Transfer is updated. - - `outbound_card_validation.created` - Occurs whenever an Outbound Card - Validation is created. - - `outbound_card_validation.updated` - Occurs whenever an Outbound Card - Validation is updated. + - `outbound_card_push_transfer.created` - Occurs whenever a Card Push Transfer + is created. + - `outbound_card_push_transfer.updated` - Occurs whenever a Card Push Transfer + is updated. + - `outbound_card_validation.created` - Occurs whenever a Card Validation is + created. + - `outbound_card_validation.updated` - Occurs whenever a Card Validation is + updated. + - `card_push_transfer.created` - Occurs whenever a Card Push Transfer is + created. + - `card_push_transfer.updated` - Occurs whenever a Card Push Transfer is + updated. + - `card_validation.created` - Occurs whenever a Card Validation is created. + - `card_validation.updated` - Occurs whenever a Card Validation is updated. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is @@ -248,6 +260,8 @@ class Event(BaseModel): Payments Request for Payment is created. - `real_time_payments_request_for_payment.updated` - Occurs whenever a Real-Time Payments Request for Payment is updated. + - `swift_transfer.created` - Occurs whenever a Swift Transfer is created. + - `swift_transfer.updated` - Occurs whenever a Swift Transfer is updated. - `transaction.created` - Occurs whenever a Transaction is created. - `wire_drawdown_request.created` - Occurs whenever a Wire Drawdown Request is created. diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index 029e9a030..1aa2d6f7e 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -102,6 +102,10 @@ class EventListParams(TypedDict, total=False): "outbound_card_push_transfer.updated", "outbound_card_validation.created", "outbound_card_validation.updated", + "card_push_transfer.created", + "card_push_transfer.updated", + "card_validation.created", + "card_validation.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -119,6 +123,8 @@ class EventListParams(TypedDict, total=False): "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", "real_time_payments_request_for_payment.updated", + "swift_transfer.created", + "swift_transfer.updated", "transaction.created", "wire_drawdown_request.created", "wire_drawdown_request.updated", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index c9111d8c4..f0c6da4d2 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -100,6 +100,10 @@ class EventSubscription(BaseModel): "outbound_card_push_transfer.updated", "outbound_card_validation.created", "outbound_card_validation.updated", + "card_push_transfer.created", + "card_push_transfer.updated", + "card_validation.created", + "card_validation.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -117,6 +121,8 @@ class EventSubscription(BaseModel): "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", "real_time_payments_request_for_payment.updated", + "swift_transfer.created", + "swift_transfer.updated", "transaction.created", "wire_drawdown_request.created", "wire_drawdown_request.updated", @@ -219,14 +225,20 @@ class EventSubscription(BaseModel): - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is deactivated. - - `outbound_card_push_transfer.created` - Occurs whenever an Outbound Card Push - Transfer is created. - - `outbound_card_push_transfer.updated` - Occurs whenever an Outbound Card Push - Transfer is updated. - - `outbound_card_validation.created` - Occurs whenever an Outbound Card - Validation is created. - - `outbound_card_validation.updated` - Occurs whenever an Outbound Card - Validation is updated. + - `outbound_card_push_transfer.created` - Occurs whenever a Card Push Transfer + is created. + - `outbound_card_push_transfer.updated` - Occurs whenever a Card Push Transfer + is updated. + - `outbound_card_validation.created` - Occurs whenever a Card Validation is + created. + - `outbound_card_validation.updated` - Occurs whenever a Card Validation is + updated. + - `card_push_transfer.created` - Occurs whenever a Card Push Transfer is + created. + - `card_push_transfer.updated` - Occurs whenever a Card Push Transfer is + updated. + - `card_validation.created` - Occurs whenever a Card Validation is created. + - `card_validation.updated` - Occurs whenever a Card Validation is updated. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is @@ -261,6 +273,8 @@ class EventSubscription(BaseModel): Payments Request for Payment is created. - `real_time_payments_request_for_payment.updated` - Occurs whenever a Real-Time Payments Request for Payment is updated. + - `swift_transfer.created` - Occurs whenever a Swift Transfer is created. + - `swift_transfer.updated` - Occurs whenever a Swift Transfer is updated. - `transaction.created` - Occurs whenever a Transaction is created. - `wire_drawdown_request.created` - Occurs whenever a Wire Drawdown Request is created. diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index c625307ac..a7a47e161 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -86,6 +86,10 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "outbound_card_push_transfer.updated", "outbound_card_validation.created", "outbound_card_validation.updated", + "card_push_transfer.created", + "card_push_transfer.updated", + "card_validation.created", + "card_validation.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -103,6 +107,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", "real_time_payments_request_for_payment.updated", + "swift_transfer.created", + "swift_transfer.updated", "transaction.created", "wire_drawdown_request.created", "wire_drawdown_request.updated", @@ -204,14 +210,20 @@ class EventSubscriptionCreateParams(TypedDict, total=False): - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is deactivated. - - `outbound_card_push_transfer.created` - Occurs whenever an Outbound Card Push - Transfer is created. - - `outbound_card_push_transfer.updated` - Occurs whenever an Outbound Card Push - Transfer is updated. - - `outbound_card_validation.created` - Occurs whenever an Outbound Card - Validation is created. - - `outbound_card_validation.updated` - Occurs whenever an Outbound Card - Validation is updated. + - `outbound_card_push_transfer.created` - Occurs whenever a Card Push Transfer + is created. + - `outbound_card_push_transfer.updated` - Occurs whenever a Card Push Transfer + is updated. + - `outbound_card_validation.created` - Occurs whenever a Card Validation is + created. + - `outbound_card_validation.updated` - Occurs whenever a Card Validation is + updated. + - `card_push_transfer.created` - Occurs whenever a Card Push Transfer is + created. + - `card_push_transfer.updated` - Occurs whenever a Card Push Transfer is + updated. + - `card_validation.created` - Occurs whenever a Card Validation is created. + - `card_validation.updated` - Occurs whenever a Card Validation is updated. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is @@ -246,6 +258,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): Payments Request for Payment is created. - `real_time_payments_request_for_payment.updated` - Occurs whenever a Real-Time Payments Request for Payment is updated. + - `swift_transfer.created` - Occurs whenever a Swift Transfer is created. + - `swift_transfer.updated` - Occurs whenever a Swift Transfer is updated. - `transaction.created` - Occurs whenever a Transaction is created. - `wire_drawdown_request.created` - Occurs whenever a Wire Drawdown Request is created. diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index f3a799cab..a87775eeb 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -15,6 +15,7 @@ "Decline", "InternationalAddenda", "NotificationOfChange", + "Settlement", "TransferReturn", ] @@ -341,6 +342,21 @@ class NotificationOfChange(BaseModel): """The new account number provided in the notification of change.""" +class Settlement(BaseModel): + settled_at: datetime + """ + When the funds for this transfer settle at the recipient bank at the Federal + Reserve. + """ + + settlement_schedule: Literal["same_day", "future_dated"] + """The settlement schedule this transfer follows. + + - `same_day` - The transfer is expected to settle same-day. + - `future_dated` - The transfer is expected to settle on a future date. + """ + + class TransferReturn(BaseModel): reason: Literal[ "insufficient_funds", @@ -432,13 +448,6 @@ class InboundACHTransfer(BaseModel): availability. """ - expected_settlement_schedule: Literal["same_day", "future_dated"] - """The settlement schedule the transfer is expected to follow. - - - `same_day` - The transfer is expected to settle same-day. - - `future_dated` - The transfer is expected to settle on a future date. - """ - international_addenda: Optional[InternationalAddenda] = None """ If the Inbound ACH Transfer has a Standard Entry Class Code of IAT, this will @@ -478,6 +487,12 @@ class InboundACHTransfer(BaseModel): receiver_name: Optional[str] = None """The name of the receiver of the transfer.""" + settlement: Settlement + """ + A subhash containing information about when and how the transfer settled at the + Federal Reserve. + """ + standard_entry_class_code: Literal[ "corporate_credit_or_debit", "corporate_trade_exchange", diff --git a/src/increase/types/inbound_mail_item.py b/src/increase/types/inbound_mail_item.py index 1849072f1..3e1660b2d 100644 --- a/src/increase/types/inbound_mail_item.py +++ b/src/increase/types/inbound_mail_item.py @@ -1,18 +1,32 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import List, Optional from datetime import datetime from typing_extensions import Literal from .._models import BaseModel -__all__ = ["InboundMailItem"] +__all__ = ["InboundMailItem", "Check"] + + +class Check(BaseModel): + amount: int + """The amount of the check.""" + + back_file_id: Optional[str] = None + """The identifier for the File containing the back of the check.""" + + front_file_id: Optional[str] = None + """The identifier for the File containing the front of the check.""" class InboundMailItem(BaseModel): id: str """The Inbound Mail Item identifier.""" + checks: List[Check] + """The checks in the mail item.""" + created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Inbound diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index c7ab2546d..5af66d521 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -18,11 +18,11 @@ "SourceCardAuthorizationVerification", "SourceCardAuthorizationVerificationCardVerificationCode", "SourceCardAuthorizationVerificationCardholderAddress", + "SourceCardPushTransferInstruction", "SourceCheckDepositInstruction", "SourceCheckTransferInstruction", "SourceInboundFundsHold", "SourceInboundWireTransferReversal", - "SourceOutboundCardPushTransferInstruction", "SourceRealTimePaymentsTransferInstruction", "SourceSwiftTransferInstruction", "SourceWireTransferInstruction", @@ -447,6 +447,14 @@ class SourceCardAuthorization(BaseModel): """Fields related to verification of cardholder-provided values.""" +class SourceCardPushTransferInstruction(BaseModel): + amount: int + """The transfer amount in USD cents.""" + + transfer_id: str + """The identifier of the Card Push Transfer that led to this Pending Transaction.""" + + class SourceCheckDepositInstruction(BaseModel): amount: int """The pending amount in USD cents.""" @@ -564,17 +572,6 @@ class SourceInboundWireTransferReversal(BaseModel): """The ID of the Inbound Wire Transfer that is being reversed.""" -class SourceOutboundCardPushTransferInstruction(BaseModel): - amount: int - """The transfer amount in USD cents.""" - - transfer_id: str - """ - The identifier of the Outbound Card Push Transfer that led to this Pending - Transaction. - """ - - class SourceRealTimePaymentsTransferInstruction(BaseModel): amount: int """The transfer amount in USD cents.""" @@ -634,6 +631,13 @@ class Source(BaseModel): a customers funds with the intent to later clear a transaction. """ + card_push_transfer_instruction: Optional[SourceCardPushTransferInstruction] = None + """A Card Push Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_push_transfer_instruction`. + """ + category: Literal[ "account_transfer_instruction", "ach_transfer_instruction", @@ -646,7 +650,7 @@ class Source(BaseModel): "wire_transfer_instruction", "inbound_wire_transfer_reversal", "swift_transfer_instruction", - "outbound_card_push_transfer_instruction", + "card_push_transfer_instruction", "other", ] """The type of the resource. @@ -677,9 +681,8 @@ class Source(BaseModel): will be under the `inbound_wire_transfer_reversal` object. - `swift_transfer_instruction` - Swift Transfer Instruction: details will be under the `swift_transfer_instruction` object. - - `outbound_card_push_transfer_instruction` - Outbound Card Push Transfer - Instruction: details will be under the - `outbound_card_push_transfer_instruction` object. + - `card_push_transfer_instruction` - Card Push Transfer Instruction: details + will be under the `card_push_transfer_instruction` object. - `other` - The Pending Transaction was made for an undocumented or deprecated reason. """ @@ -722,13 +725,6 @@ class Source(BaseModel): contain an empty object, otherwise it will contain null. """ - outbound_card_push_transfer_instruction: Optional[SourceOutboundCardPushTransferInstruction] = None - """An Outbound Card Push Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `outbound_card_push_transfer_instruction`. - """ - real_time_payments_transfer_instruction: Optional[SourceRealTimePaymentsTransferInstruction] = None """A Real-Time Payments Transfer Instruction object. diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index 8cec9832d..eba8f0afe 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -50,7 +50,7 @@ class PendingTransactionListParams(TypedDict, total=False): "wire_transfer_instruction", "inbound_wire_transfer_reversal", "swift_transfer_instruction", - "outbound_card_push_transfer_instruction", + "card_push_transfer_instruction", "other", ] ], diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 600b5a037..406e5145b 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -15,6 +15,7 @@ "SourceACHTransferReturn", "SourceCardDisputeAcceptance", "SourceCardDisputeLoss", + "SourceCardPushTransferAcceptance", "SourceCardRefund", "SourceCardRefundCashback", "SourceCardRefundInterchange", @@ -57,7 +58,6 @@ "SourceInboundWireTransferReversal", "SourceInterestPayment", "SourceInternalSource", - "SourceOutboundCardPushTransferAcceptance", "SourceRealTimePaymentsTransferAcknowledgement", "SourceSampleFunds", "SourceSwiftTransferIntention", @@ -413,6 +413,14 @@ class SourceCardDisputeLoss(BaseModel): """ +class SourceCardPushTransferAcceptance(BaseModel): + amount: int + """The transfer amount in USD cents.""" + + transfer_id: str + """The identifier of the Card Push Transfer that led to this Transaction.""" + + class SourceCardRefundCashback(BaseModel): amount: str """The cashback amount given as a string containing a decimal number. @@ -2254,14 +2262,6 @@ class SourceInternalSource(BaseModel): """ -class SourceOutboundCardPushTransferAcceptance(BaseModel): - amount: int - """The transfer amount in USD cents.""" - - transfer_id: str - """The identifier of the Outbound Card Push Transfer that led to this Transaction.""" - - class SourceRealTimePaymentsTransferAcknowledgement(BaseModel): amount: int """The transfer amount in USD cents.""" @@ -2359,6 +2359,15 @@ class Source(BaseModel): equal to `card_dispute_loss`. Contains the details of a lost Card Dispute. """ + card_push_transfer_acceptance: Optional[SourceCardPushTransferAcceptance] = None + """A Card Push Transfer Acceptance object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_push_transfer_acceptance`. A Card Push Transfer Acceptance is + created when an Outbound Card Push Transfer sent from Increase is accepted by + the receiving bank. + """ + card_refund: Optional[SourceCardRefund] = None """A Card Refund object. @@ -2424,7 +2433,7 @@ class Source(BaseModel): "sample_funds", "wire_transfer_intention", "swift_transfer_intention", - "outbound_card_push_transfer_acceptance", + "card_push_transfer_acceptance", "other", ] """The type of the resource. @@ -2493,9 +2502,8 @@ class Source(BaseModel): `wire_transfer_intention` object. - `swift_transfer_intention` - Swift Transfer Intention: details will be under the `swift_transfer_intention` object. - - `outbound_card_push_transfer_acceptance` - Outbound Card Push Transfer - Acceptance: details will be under the `outbound_card_push_transfer_acceptance` - object. + - `card_push_transfer_acceptance` - Card Push Transfer Acceptance: details will + be under the `card_push_transfer_acceptance` object. - `other` - The Transaction was made for an undocumented or deprecated reason. """ @@ -2634,15 +2642,6 @@ class Source(BaseModel): contain an empty object, otherwise it will contain null. """ - outbound_card_push_transfer_acceptance: Optional[SourceOutboundCardPushTransferAcceptance] = None - """An Outbound Card Push Transfer Acceptance object. - - This field will be present in the JSON response if and only if `category` is - equal to `outbound_card_push_transfer_acceptance`. An Outbound Card Push - Transfer Acceptance is created when an Outbound Card Push Transfer sent from - Increase is accepted by the receiving bank. - """ - real_time_payments_transfer_acknowledgement: Optional[SourceRealTimePaymentsTransferAcknowledgement] = None """A Real-Time Payments Transfer Acknowledgement object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index f57878910..3502becb7 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -69,7 +69,7 @@ class TransactionListParams(TypedDict, total=False): "sample_funds", "wire_transfer_intention", "swift_transfer_intention", - "outbound_card_push_transfer_acceptance", + "card_push_transfer_acceptance", "other", ] ], diff --git a/tests/api_resources/simulations/test_account_statements.py b/tests/api_resources/simulations/test_account_statements.py index 69276d274..e1ca7c033 100644 --- a/tests/api_resources/simulations/test_account_statements.py +++ b/tests/api_resources/simulations/test_account_statements.py @@ -50,7 +50,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncAccountStatements: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_account_transfers.py b/tests/api_resources/simulations/test_account_transfers.py index 6f5818e11..6a2670592 100644 --- a/tests/api_resources/simulations/test_account_transfers.py +++ b/tests/api_resources/simulations/test_account_transfers.py @@ -57,7 +57,9 @@ def test_path_params_complete(self, client: Increase) -> None: class TestAsyncAccountTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_complete(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 75340d757..1e78f1f70 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -225,7 +225,9 @@ def test_path_params_submit(self, client: Increase) -> None: class TestAsyncACHTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_acknowledge(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_card_authorization_expirations.py b/tests/api_resources/simulations/test_card_authorization_expirations.py index a0a1f1316..40d0f69e5 100644 --- a/tests/api_resources/simulations/test_card_authorization_expirations.py +++ b/tests/api_resources/simulations/test_card_authorization_expirations.py @@ -50,7 +50,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncCardAuthorizationExpirations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py index 891bef151..8701d79dd 100644 --- a/tests/api_resources/simulations/test_card_authorizations.py +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -73,7 +73,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncCardAuthorizations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py index 15ed4aebc..aee1aa35b 100644 --- a/tests/api_resources/simulations/test_card_disputes.py +++ b/tests/api_resources/simulations/test_card_disputes.py @@ -70,7 +70,9 @@ def test_path_params_action(self, client: Increase) -> None: class TestAsyncCardDisputes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_action(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_card_fuel_confirmations.py b/tests/api_resources/simulations/test_card_fuel_confirmations.py index e7edbab71..905d30026 100644 --- a/tests/api_resources/simulations/test_card_fuel_confirmations.py +++ b/tests/api_resources/simulations/test_card_fuel_confirmations.py @@ -53,7 +53,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncCardFuelConfirmations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_card_increments.py b/tests/api_resources/simulations/test_card_increments.py index 188652e84..b702ba581 100644 --- a/tests/api_resources/simulations/test_card_increments.py +++ b/tests/api_resources/simulations/test_card_increments.py @@ -62,7 +62,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncCardIncrements: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_card_refunds.py b/tests/api_resources/simulations/test_card_refunds.py index ccbec8f1e..07bb1bb8d 100644 --- a/tests/api_resources/simulations/test_card_refunds.py +++ b/tests/api_resources/simulations/test_card_refunds.py @@ -50,7 +50,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncCardRefunds: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_card_reversals.py b/tests/api_resources/simulations/test_card_reversals.py index 0d7122ce7..42506f6b5 100644 --- a/tests/api_resources/simulations/test_card_reversals.py +++ b/tests/api_resources/simulations/test_card_reversals.py @@ -58,7 +58,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncCardReversals: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_card_settlements.py b/tests/api_resources/simulations/test_card_settlements.py index c994fdf29..ecd707010 100644 --- a/tests/api_resources/simulations/test_card_settlements.py +++ b/tests/api_resources/simulations/test_card_settlements.py @@ -62,7 +62,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncCardSettlements: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_check_deposits.py b/tests/api_resources/simulations/test_check_deposits.py index b77fa8782..d03ef3ac6 100644 --- a/tests/api_resources/simulations/test_check_deposits.py +++ b/tests/api_resources/simulations/test_check_deposits.py @@ -133,7 +133,9 @@ def test_path_params_submit(self, client: Increase) -> None: class TestAsyncCheckDeposits: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_reject(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_check_transfers.py b/tests/api_resources/simulations/test_check_transfers.py index 7afae4013..2976c2ca0 100644 --- a/tests/api_resources/simulations/test_check_transfers.py +++ b/tests/api_resources/simulations/test_check_transfers.py @@ -57,7 +57,9 @@ def test_path_params_mail(self, client: Increase) -> None: class TestAsyncCheckTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_mail(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_digital_wallet_token_requests.py b/tests/api_resources/simulations/test_digital_wallet_token_requests.py index f3e72d5cc..948ffcd51 100644 --- a/tests/api_resources/simulations/test_digital_wallet_token_requests.py +++ b/tests/api_resources/simulations/test_digital_wallet_token_requests.py @@ -54,7 +54,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncDigitalWalletTokenRequests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_documents.py b/tests/api_resources/simulations/test_documents.py index 189905342..27ff5d598 100644 --- a/tests/api_resources/simulations/test_documents.py +++ b/tests/api_resources/simulations/test_documents.py @@ -50,7 +50,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncDocuments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_inbound_ach_transfers.py b/tests/api_resources/simulations/test_inbound_ach_transfers.py index 27af42110..9c76d64f8 100644 --- a/tests/api_resources/simulations/test_inbound_ach_transfers.py +++ b/tests/api_resources/simulations/test_inbound_ach_transfers.py @@ -75,7 +75,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncInboundACHTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_inbound_check_deposits.py b/tests/api_resources/simulations/test_inbound_check_deposits.py index fdd11f49e..f51919de7 100644 --- a/tests/api_resources/simulations/test_inbound_check_deposits.py +++ b/tests/api_resources/simulations/test_inbound_check_deposits.py @@ -56,7 +56,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncInboundCheckDeposits: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_inbound_funds_holds.py b/tests/api_resources/simulations/test_inbound_funds_holds.py index 9a2285c51..e3dd90b01 100644 --- a/tests/api_resources/simulations/test_inbound_funds_holds.py +++ b/tests/api_resources/simulations/test_inbound_funds_holds.py @@ -57,7 +57,9 @@ def test_path_params_release(self, client: Increase) -> None: class TestAsyncInboundFundsHolds: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_release(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_inbound_mail_items.py b/tests/api_resources/simulations/test_inbound_mail_items.py index 85ffce184..cb86a0502 100755 --- a/tests/api_resources/simulations/test_inbound_mail_items.py +++ b/tests/api_resources/simulations/test_inbound_mail_items.py @@ -62,7 +62,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncInboundMailItems: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py b/tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py index 27adb507d..18108d7d2 100644 --- a/tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py +++ b/tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py @@ -66,7 +66,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncInboundRealTimePaymentsTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py b/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py index 56a206a95..181c8e96e 100644 --- a/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py @@ -97,7 +97,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncInboundWireDrawdownRequests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_inbound_wire_transfers.py b/tests/api_resources/simulations/test_inbound_wire_transfers.py index f1893dbe4..a2e63e0af 100644 --- a/tests/api_resources/simulations/test_inbound_wire_transfers.py +++ b/tests/api_resources/simulations/test_inbound_wire_transfers.py @@ -76,7 +76,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncInboundWireTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_interest_payments.py b/tests/api_resources/simulations/test_interest_payments.py index a84df20b3..6f7ebffad 100644 --- a/tests/api_resources/simulations/test_interest_payments.py +++ b/tests/api_resources/simulations/test_interest_payments.py @@ -65,7 +65,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncInterestPayments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py index fc3247413..967969afc 100644 --- a/tests/api_resources/simulations/test_physical_cards.py +++ b/tests/api_resources/simulations/test_physical_cards.py @@ -116,7 +116,9 @@ def test_path_params_tracking_updates(self, client: Increase) -> None: class TestAsyncPhysicalCards: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py index 618470552..68a7e9de7 100644 --- a/tests/api_resources/simulations/test_programs.py +++ b/tests/api_resources/simulations/test_programs.py @@ -58,7 +58,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncPrograms: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_real_time_payments_transfers.py b/tests/api_resources/simulations/test_real_time_payments_transfers.py index c9ec4eb72..f98b5538b 100644 --- a/tests/api_resources/simulations/test_real_time_payments_transfers.py +++ b/tests/api_resources/simulations/test_real_time_payments_transfers.py @@ -67,7 +67,9 @@ def test_path_params_complete(self, client: Increase) -> None: class TestAsyncRealTimePaymentsTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_complete(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/simulations/test_wire_transfers.py b/tests/api_resources/simulations/test_wire_transfers.py index a3a380865..c6ea7bc8b 100644 --- a/tests/api_resources/simulations/test_wire_transfers.py +++ b/tests/api_resources/simulations/test_wire_transfers.py @@ -95,7 +95,9 @@ def test_path_params_submit(self, client: Increase) -> None: class TestAsyncWireTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_reverse(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index 45d2e6ea9..5ecc54511 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -197,7 +197,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncAccountNumbers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py index bb8567116..e7eae1b44 100644 --- a/tests/api_resources/test_account_statements.py +++ b/tests/api_resources/test_account_statements.py @@ -99,7 +99,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncAccountStatements: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py index 10647a3db..8ec1389db 100644 --- a/tests/api_resources/test_account_transfers.py +++ b/tests/api_resources/test_account_transfers.py @@ -227,7 +227,9 @@ def test_path_params_cancel(self, client: Increase) -> None: class TestAsyncAccountTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 2a06214e3..f87c593ed 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -277,7 +277,9 @@ def test_path_params_close(self, client: Increase) -> None: class TestAsyncAccounts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index 67c8ab1f9..f1440ab9d 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -157,7 +157,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncACHPrenotifications: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index 71022037d..8b4a7b1db 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -254,7 +254,9 @@ def test_path_params_cancel(self, client: Increase) -> None: class TestAsyncACHTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_bookkeeping_accounts.py b/tests/api_resources/test_bookkeeping_accounts.py index 6b59f1696..e22057f1d 100644 --- a/tests/api_resources/test_bookkeeping_accounts.py +++ b/tests/api_resources/test_bookkeeping_accounts.py @@ -191,7 +191,9 @@ def test_path_params_balance(self, client: Increase) -> None: class TestAsyncBookkeepingAccounts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py index 4d48e6d38..958047447 100644 --- a/tests/api_resources/test_bookkeeping_entries.py +++ b/tests/api_resources/test_bookkeeping_entries.py @@ -92,7 +92,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncBookkeepingEntries: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py index c1ed6de1b..03cb63088 100644 --- a/tests/api_resources/test_bookkeeping_entry_sets.py +++ b/tests/api_resources/test_bookkeeping_entry_sets.py @@ -172,7 +172,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncBookkeepingEntrySets: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 9b3c3a074..4d84ea732 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -143,7 +143,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncCardDisputes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_card_payments.py b/tests/api_resources/test_card_payments.py index 64ce7f77d..1a7f8c963 100644 --- a/tests/api_resources/test_card_payments.py +++ b/tests/api_resources/test_card_payments.py @@ -100,7 +100,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncCardPayments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py index 172656d19..bd5318f3d 100644 --- a/tests/api_resources/test_card_purchase_supplements.py +++ b/tests/api_resources/test_card_purchase_supplements.py @@ -101,7 +101,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncCardPurchaseSupplements: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index ea7da68a8..c93eab95e 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -251,7 +251,9 @@ def test_path_params_details(self, client: Increase) -> None: class TestAsyncCards: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py index adab057c6..c90acadff 100644 --- a/tests/api_resources/test_check_deposits.py +++ b/tests/api_resources/test_check_deposits.py @@ -151,7 +151,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncCheckDeposits: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 4df220a95..a8fd171f8 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -51,6 +51,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "recipient_name": "Ian Crease", "attachment_file_id": "attachment_file_id", "note": "x", + "payer": [{"contents": "x"}], "return_address": { "city": "x", "line1": "x", @@ -301,7 +302,9 @@ def test_path_params_stop_payment(self, client: Increase) -> None: class TestAsyncCheckTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: @@ -333,6 +336,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "recipient_name": "Ian Crease", "attachment_file_id": "attachment_file_id", "note": "x", + "payer": [{"contents": "x"}], "return_address": { "city": "x", "line1": "x", diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py index f1d22abfe..45c805676 100644 --- a/tests/api_resources/test_declined_transactions.py +++ b/tests/api_resources/test_declined_transactions.py @@ -103,7 +103,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncDeclinedTransactions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index 555e2f7b5..20804cae1 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -259,7 +259,9 @@ def test_path_params_clone(self, client: Increase) -> None: class TestAsyncDigitalCardProfiles: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py index 368ff689c..abfb9e281 100644 --- a/tests/api_resources/test_digital_wallet_tokens.py +++ b/tests/api_resources/test_digital_wallet_tokens.py @@ -101,7 +101,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncDigitalWalletTokens: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index 078706b41..1f6c24678 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -143,7 +143,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncDocuments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index b584f970d..54fcbd14f 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -838,7 +838,9 @@ def test_path_params_update_industry_code(self, client: Increase) -> None: class TestAsyncEntities: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index b2edc3d62..3222bae25 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -181,7 +181,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncEventSubscriptions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index f15aa11db..16fbf1ebb 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -100,7 +100,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncEvents: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 28c52bf07..005b47caf 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -179,7 +179,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncExports: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py index 501b8a313..3700f7ddf 100644 --- a/tests/api_resources/test_external_accounts.py +++ b/tests/api_resources/test_external_accounts.py @@ -193,7 +193,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncExternalAccounts: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_file_links.py b/tests/api_resources/test_file_links.py index d742e2366..6c80129ad 100644 --- a/tests/api_resources/test_file_links.py +++ b/tests/api_resources/test_file_links.py @@ -59,7 +59,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncFileLinks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index aad0dedde..06f7bc080 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -143,7 +143,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncFiles: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_groups.py b/tests/api_resources/test_groups.py index 08e11a8db..51838c324 100644 --- a/tests/api_resources/test_groups.py +++ b/tests/api_resources/test_groups.py @@ -44,7 +44,9 @@ def test_streaming_response_retrieve(self, client: Increase) -> None: class TestAsyncGroups: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index 72670ef54..b25b7ed36 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -246,7 +246,9 @@ def test_path_params_transfer_return(self, client: Increase) -> None: class TestAsyncInboundACHTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index 54109446a..c96738eb0 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -186,7 +186,9 @@ def test_path_params_return(self, client: Increase) -> None: class TestAsyncInboundCheckDeposits: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py index eed29b796..f7e8a1c60 100644 --- a/tests/api_resources/test_inbound_mail_items.py +++ b/tests/api_resources/test_inbound_mail_items.py @@ -99,7 +99,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncInboundMailItems: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_inbound_real_time_payments_transfers.py b/tests/api_resources/test_inbound_real_time_payments_transfers.py index 017710247..ea67dc0e0 100755 --- a/tests/api_resources/test_inbound_real_time_payments_transfers.py +++ b/tests/api_resources/test_inbound_real_time_payments_transfers.py @@ -110,7 +110,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncInboundRealTimePaymentsTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_inbound_wire_drawdown_requests.py b/tests/api_resources/test_inbound_wire_drawdown_requests.py index 6fa65219f..c94b33829 100644 --- a/tests/api_resources/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/test_inbound_wire_drawdown_requests.py @@ -93,7 +93,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncInboundWireDrawdownRequests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index 4efa3a3e4..707135866 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -147,7 +147,9 @@ def test_path_params_reverse(self, client: Increase) -> None: class TestAsyncInboundWireTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_intrafi_account_enrollments.py b/tests/api_resources/test_intrafi_account_enrollments.py index 414163499..a6fc99827 100644 --- a/tests/api_resources/test_intrafi_account_enrollments.py +++ b/tests/api_resources/test_intrafi_account_enrollments.py @@ -172,7 +172,9 @@ def test_path_params_unenroll(self, client: Increase) -> None: class TestAsyncIntrafiAccountEnrollments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_intrafi_balances.py b/tests/api_resources/test_intrafi_balances.py index 6dd282615..c021f05ba 100644 --- a/tests/api_resources/test_intrafi_balances.py +++ b/tests/api_resources/test_intrafi_balances.py @@ -57,7 +57,9 @@ def test_path_params_intrafi_balance(self, client: Increase) -> None: class TestAsyncIntrafiBalances: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_intrafi_balance(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_intrafi_exclusions.py b/tests/api_resources/test_intrafi_exclusions.py index 46c12e185..f7930e990 100644 --- a/tests/api_resources/test_intrafi_exclusions.py +++ b/tests/api_resources/test_intrafi_exclusions.py @@ -165,7 +165,9 @@ def test_path_params_archive(self, client: Increase) -> None: class TestAsyncIntrafiExclusions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py index d101bf24f..29bc2015a 100644 --- a/tests/api_resources/test_lockboxes.py +++ b/tests/api_resources/test_lockboxes.py @@ -188,7 +188,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncLockboxes: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_oauth_applications.py b/tests/api_resources/test_oauth_applications.py index c9e04f15e..7fe1db78f 100644 --- a/tests/api_resources/test_oauth_applications.py +++ b/tests/api_resources/test_oauth_applications.py @@ -99,7 +99,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncOAuthApplications: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index 8c218df2f..cab23456d 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -93,7 +93,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncOAuthConnections: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_oauth_tokens.py b/tests/api_resources/test_oauth_tokens.py index 1ac7113db..6bef09ef4 100644 --- a/tests/api_resources/test_oauth_tokens.py +++ b/tests/api_resources/test_oauth_tokens.py @@ -61,7 +61,9 @@ def test_streaming_response_create(self, client: Increase) -> None: class TestAsyncOAuthTokens: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index 11a7b8a06..185106386 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -187,7 +187,9 @@ def test_path_params_release(self, client: Increase) -> None: class TestAsyncPendingTransactions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index c574c04a6..1a0ebb7af 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -250,7 +250,9 @@ def test_path_params_clone(self, client: Increase) -> None: class TestAsyncPhysicalCardProfiles: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index f26214336..bb65d8e39 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -242,7 +242,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncPhysicalCards: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_programs.py b/tests/api_resources/test_programs.py index e78fd1cdb..95d5e7627 100644 --- a/tests/api_resources/test_programs.py +++ b/tests/api_resources/test_programs.py @@ -91,7 +91,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncPrograms: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index d49e43316..1cbb666be 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -122,7 +122,9 @@ def test_path_params_action(self, client: Increase) -> None: class TestAsyncRealTimeDecisions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index 636ed4c4b..5bddfed46 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -243,7 +243,9 @@ def test_path_params_cancel(self, client: Increase) -> None: class TestAsyncRealTimePaymentsTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_routing_numbers.py b/tests/api_resources/test_routing_numbers.py index f635f5d1a..62e2949a1 100644 --- a/tests/api_resources/test_routing_numbers.py +++ b/tests/api_resources/test_routing_numbers.py @@ -60,7 +60,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncRoutingNumbers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_supplemental_documents.py b/tests/api_resources/test_supplemental_documents.py index e20cb1bb5..5e15c2880 100644 --- a/tests/api_resources/test_supplemental_documents.py +++ b/tests/api_resources/test_supplemental_documents.py @@ -97,7 +97,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncSupplementalDocuments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index d139afe7a..4d718608a 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -101,7 +101,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncTransactions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 4a4234ad0..3d7c33167 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -160,7 +160,9 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncWireDrawdownRequests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 409891d56..4fa783c00 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -239,7 +239,9 @@ def test_path_params_cancel(self, client: Increase) -> None: class TestAsyncWireTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: diff --git a/tests/conftest.py b/tests/conftest.py index f60bfe24a..23340d746 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,13 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + from __future__ import annotations import os import logging from typing import TYPE_CHECKING, Iterator, AsyncIterator +import httpx import pytest from pytest_asyncio import is_async_test -from increase import Increase, AsyncIncrease +from increase import Increase, AsyncIncrease, DefaultAioHttpClient +from increase._utils import is_dict if TYPE_CHECKING: from _pytest.fixtures import FixtureRequest # pyright: ignore[reportPrivateImportUsage] @@ -25,6 +29,19 @@ def pytest_collection_modifyitems(items: list[pytest.Function]) -> None: for async_test in pytest_asyncio_tests: async_test.add_marker(session_scope_marker, append=False) + # We skip tests that use both the aiohttp client and respx_mock as respx_mock + # doesn't support custom transports. + for item in items: + if "async_client" not in item.fixturenames or "respx_mock" not in item.fixturenames: + continue + + if not hasattr(item, "callspec"): + continue + + async_client_param = item.callspec.params.get("async_client") + if is_dict(async_client_param) and async_client_param.get("http_client") == "aiohttp": + item.add_marker(pytest.mark.skip(reason="aiohttp client is not compatible with respx_mock")) + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -43,9 +60,25 @@ def client(request: FixtureRequest) -> Iterator[Increase]: @pytest.fixture(scope="session") async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncIncrease]: - strict = getattr(request, "param", True) - if not isinstance(strict, bool): - raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {bool}") - - async with AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client: + param = getattr(request, "param", True) + + # defaults + strict = True + http_client: None | httpx.AsyncClient = None + + if isinstance(param, bool): + strict = param + elif is_dict(param): + strict = param.get("strict", True) + assert isinstance(strict, bool) + + http_client_type = param.get("http_client", "httpx") + if http_client_type == "aiohttp": + http_client = DefaultAioHttpClient() + else: + raise TypeError(f"Unexpected fixture parameter type {type(param)}, expected bool or dict") + + async with AsyncIncrease( + base_url=base_url, api_key=api_key, _strict_response_validation=strict, http_client=http_client + ) as client: yield client diff --git a/tests/test_client.py b/tests/test_client.py index 8d6ad45fc..1f7074e67 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -23,9 +23,7 @@ from increase import Increase, AsyncIncrease, APIResponseValidationError from increase._types import Omit -from increase._utils import maybe_transform from increase._models import BaseModel, FinalRequestOptions -from increase._constants import RAW_RESPONSE_HEADER from increase._exceptions import IncreaseError, APIStatusError, APITimeoutError, APIResponseValidationError from increase._base_client import ( DEFAULT_TIMEOUT, @@ -35,7 +33,6 @@ DefaultAsyncHttpxClient, make_request_options, ) -from increase.types.account_create_params import AccountCreateParams from .utils import update_env @@ -194,6 +191,7 @@ def test_copy_signature(self) -> None: copy_param = copy_signature.parameters.get(name) assert copy_param is not None, f"copy() signature is missing the {name} param" + @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12") def test_copy_build_request(self) -> None: options = FinalRequestOptions(method="get", url="/foo") @@ -756,52 +754,21 @@ def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, client: Increase) -> None: respx_mock.post("/accounts").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - self.client.post( - "/accounts", - body=cast( - object, - maybe_transform( - dict( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ), - AccountCreateParams, - ), - ), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) + client.accounts.with_streaming_response.create(name="New Account!").__enter__() assert _get_open_connections(self.client) == 0 @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client: Increase) -> None: respx_mock.post("/accounts").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - self.client.post( - "/accounts", - body=cast( - object, - maybe_transform( - dict( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ), - AccountCreateParams, - ), - ), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) - + client.accounts.with_streaming_response.create(name="New Account!").__enter__() assert _get_open_connections(self.client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @@ -1070,6 +1037,7 @@ def test_copy_signature(self) -> None: copy_param = copy_signature.parameters.get(name) assert copy_param is not None, f"copy() signature is missing the {name} param" + @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12") def test_copy_build_request(self) -> None: options = FinalRequestOptions(method="get", url="/foo") @@ -1646,52 +1614,25 @@ async def test_parse_retry_after_header(self, remaining_retries: int, retry_afte @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + async def test_retrying_timeout_errors_doesnt_leak( + self, respx_mock: MockRouter, async_client: AsyncIncrease + ) -> None: respx_mock.post("/accounts").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - await self.client.post( - "/accounts", - body=cast( - object, - maybe_transform( - dict( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ), - AccountCreateParams, - ), - ), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) + await async_client.accounts.with_streaming_response.create(name="New Account!").__aenter__() assert _get_open_connections(self.client) == 0 @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + async def test_retrying_status_errors_doesnt_leak( + self, respx_mock: MockRouter, async_client: AsyncIncrease + ) -> None: respx_mock.post("/accounts").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - await self.client.post( - "/accounts", - body=cast( - object, - maybe_transform( - dict( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ), - AccountCreateParams, - ), - ), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) - + await async_client.accounts.with_streaming_response.create(name="New Account!").__aenter__() assert _get_open_connections(self.client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4])